Description
Feature Request: Support crs_wkt
grid_mapping syntax (CF1.8) in Iris.
As of version 1.8 of the CF Conventions, the use of Well Known Text for Coordinate Reference Systems encodings with standardised variable referencing is supported for CF netCDF files.
The adoption of the ISO/OGC standard for CRS definitions is a major step forward for CF, enabling enhanced interoperability and providing new capabilities.
It would be beneficial for Iris to support this capability effectively to enhance users' ability to effectively provide referencing information for coordinates.
The OGC publishes the joint ISO/OGC standard in the public domain at:
http://docs.opengeospatial.org/is/18-010r7/18-010r7.html
It is worth noting that recent version of Proj support WKT, including parsing of WKT CRS strings.
The use of WKT CRS strings is easily supported, as it just involves the use of the CF attribute name crs_wkt
on a variable.
There are minor issues to note on escape characters, particularly the need to escape "
characters within the string as \"
. This is likely easy to handle in software.
The challenge for Iris is the enhancements made to the grid_mapping
data variable attribute to enable the references between the data variable, and by implication the associated coordinates.
This enhanced syntax is detailed in the CF Conventions:
http://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html#grid-mappings-and-projections
The grid mapping variables are associated with the data and coordinate variables by the grid_mapping attribute. This attribute is attached to data variables so that variables with different mappings may be present in a single file. The attribute takes a string value with two possible formats. In the first format, it is a single word, which names a grid mapping variable. In the second format, it is a blank-separated list of words ": [ …] [: …]" , which identifies one or more grid mapping variables, and with each grid mapping associates one or more coordinatesVariables, i.e. coordinate variables or auxiliary coordinate variables.
Where an extended ": []" entity is defined, then the order of the references within the definition provides an explicit order for these coordinate value variables, which is used if they are to be combined into individual coordinate tuples.
This order is only significant if crs_wkt is also specified within the referenced grid mapping variable. Explicit 'axis order' is important when the grid_mapping_variable contains an attribute crs_wkt as it is mandated by the OGC CRS-WKT standard that coordinate tuples with correct axis order are provided as part of the reference to a Coordinate Reference System.
Iris does not recognise this syntax and does not interpret any coordinate reference system referencing where it is used.
The enhanced syntax has particular value to users using Iris to create data sets in CF-netCDF for sharing with wider communities.
The adoption of the CF syntax for these relations and their interpretation in the Iris data model brings valuable opportunities for improved referencing by coordinates and coordinate reference system definitions for data specification.
Please may we develop this ticket into a full enhancement proposal and aim to plan work to deliver this capability in an Iris release?