You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On general principles, since a MeshCoord is designed to be a "window" on other data, it should probably "have" the coord-system of the underlying coordinates from which it takes its values + metadata.
However, Iris considers the coord-system to be part of a Coord. So, it should make perfectly good sense for a coordinate of a Mesh to have one (though there is currently an apparent bug preventing it).
Likewise, it probably makes sense for the coord-system of a MeshCoord to always follow that of the associated node coordinates, as established for the other metadata.
Desired implementation:
Since a face- or edge-located MeshCoord takes its bounds from the (re-indexed) node_coordinates, and its points from the face_coordinates or edge_coordinates (which however are technically optional), it makes sense that the MeshCoord should inherit a coord_system from either of those -- and if different, that should probably be an error.
For now, the coord_system of a MeshCoord is always None, and must always be so.
We expect that in many cases UGRID files will be loaded with no coordinate systems, since there is little detail about grid_mapping in relation to UGRID. There is some debate between Iris developers about whether we should assume a standard GeogCS coordinate system in these cases, since that appears to be UGRID's assumption.
However UGRID is flexible enough that coordinates could really be anything - XY / XYZ / spherical coordinates / S2 indices / ... - and we have already made Iris more rigid than it should be in this regard, so I am personally uncomfortable with baking in even more assumptions.
Therefore, in addition to MeshCoord inheriting the underlying coordinate system, I would also advocate for a new method: Mesh.add_default_coord_system(), which would modify all the Mesh's coordinates by adding GeogCS(iris.analysis.cartography.DEFAULT_SPHERICAL_EARTH_RADIUS). My reasoning being that it would be better for the user to opt-in, rather than obliging them to opt-out.
On general principles, since a MeshCoord is designed to be a "window" on other data, it should probably "have" the coord-system of the underlying coordinates from which it takes its values + metadata.
context in UGRID
At present, there is no agreed way of attaching a coordinate-system (i.e. grid-mapping) to coordinates of a mesh, since in CF that may only occur via a data-variable.
context in Iris
However, Iris considers the coord-system to be part of a Coord. So, it should make perfectly good sense for a coordinate of a Mesh to have one (though there is currently an apparent bug preventing it).
Likewise, it probably makes sense for the coord-system of a MeshCoord to always follow that of the associated node coordinates, as established for the other metadata.
Desired implementation:
Since a face- or edge-located MeshCoord takes its bounds from the (re-indexed)
node_coordinates
, and its points from theface_coordinates
oredge_coordinates
(which however are technically optional), it makes sense that the MeshCoord should inherit a coord_system from either of those -- and if different, that should probably be an error.For now, the coord_system of a MeshCoord is always None, and must always be so.
Related
The text was updated successfully, but these errors were encountered: