-
Notifications
You must be signed in to change notification settings - Fork 33
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
Adding/augmenting functions to write a CF Coordinate Reference System (CRS) "container variable" #774
Comments
I will be interested in following and possibly contribute to this discussion. My main motivation is that the (observational) data I am responsible for are in polar-focused grids (mainly 6931 and 6932). The pyresample python library, part of the pytroll ecosystem is another software handling map projections that might help convert to/from CF Conventions. It is noteworthy that having a |
@TomLav great, it would be really useful to have broad coverage on this so we can implement a solution that satisfies CF requirements, and also captures all required grid mapping flavours that CMOR users will need. |
Just linking parallel CF discussions - https://github.com/orgs/cf-convention/discussions/404 |
Collating this comprehensive list of grid mappings, might be easier than I thought - the CF "Appendix H: Annotated Examples of Discrete Geometries" lists 16, both gridded, point data etc. |
@durack1, I know nothing of the CMOR software and if it is cumbersome to make it depend on other python modules. But if CMOR can have a dependency on a fairly recent version of the pyproj module (>=3.0.0) then writing the |
@TomLav thanks for this, really useful. We've been trying to keep dependencies to a minimum, so will ponder this suggestion. The CMOR software doesn't need to be built from source, you should be able to install it into a conda/mamba environment for your single (or multiple) dataset preparation - https://anaconda.org/conda-forge/cmor |
The DRCDP project has anticipated regional contributions (mainly for the CONUS) many of which in their native output include grid mapping criterion. While no obvious and extensive specification exists, some samples are available, including 3 defining a CRS WKT (CRS Well-Known Text format; also known as OGC WKT) within the CF Conventions that define the specifications for the
"latitude_longitude"
,"transverse_mercator"
using several common datums. Theint crs
variable written to a netCDF file has no associated data, but contains variable attributes which define characteristics of the grid mapping, .e.g., see here and example belowIn some parallel discussions see PCMDI/obs4MIPs-cmor-tables#375, there may also be a need to account for "Equal-Area Scalable Earth" EASE grids (see here). Ongoing discussions about the DRCDP targeted MACAv3 dataset (thanks @khegewisch) have noted the following datums:
CMOR3 has a couple of functions
cmor.set_grid_mapping
andcmor.grid
that appear to provide some functionality, but currently do not support thelatitude_longitude
example. There is also a CMOR test which provides apolar_stereographic
projection example. We'll need to do a little more investigation to more clearly define what projections/grid_mappings need support before acting to CMOR changes to enable an appropriatecrs
variable to be written.And just to collapse email links into this issue, a couple of GIS software packages have vague docs pages on coordinate reference systems (the CRS acronym) QGIS, including a demo of how to use NCO tools to add the
crs
attribute after the fact, thanks StackExchange, also ESRI ArcGIS, GDAL "there is no universal way of storing georeferencing in NetCDF files", and finally rioxarray. It would be useful to ascertain whether a formal standard, other than the example defined in the CF Conventions (link up top).Also adding the augmented CF to/from WKT/PROJ.4 translation spec - http://cfconventions.org/wkt-proj-4.html
ping @taylor13 @gleckler1 @paullric
The text was updated successfully, but these errors were encountered: