-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NetCDF Projection Handling and EuroCordex test #208
Conversation
…ndling for auxiliary coordinate variables.
} | ||
} else { | ||
ret <- st_crs(NULL) | ||
ret <- try(st_crs(ncmeta::nc_gm_to_prj(nc_grid_mapping))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the try()
fails here, ret
will be of class try-error
. Is that what you intent to return?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh. No. Will fix.
If I understand you correctly: for raster files that have a CRS that can be understood, we return the raster with appropriate CRS; for files without understandable CRS but with long/lat rasters, we return them as curvilinear grids. My request: can we also make this optional, so that in the first case we can get the curviilinear long/lat raster returned? This may be helpful to understand the intention of the creators. Or is this already optional right now with using the |
I think this is a good idea. There are potentially three options here.
I'll make sure that option 1 occurs if the curvilinear input is supplied. As an unrelated side note - I expect much of the functionality that is being factored out of the main |
I'll work on rewriting |
I'll add more test coverage and clean this up a bit later on. Don't merge yet. |
Great work! |
Awesome step forward, cant wait to have some time to test this out! |
This PR includes:
I've made some opinionated choices in here but I think they are reasonable.
rep_var
variable..get_nc_projection
, I return WGS84 (as EPSG:4326) if no CRS is declared but the coordinate variable units are degrees. A warning is issued in this case.I think we can say that, with this PR, #89 is fixed.