Skip to content

Support CRS datum information #4619

Closed
@vsherratt

Description

@vsherratt

✨ Feature Request

Support for the datum attribute of a coordinate reference system.

Motivation

Higher resolution modelling is now revealing slight discrepancies when transforming between different coordinate systems. Through various discussions, including on met office yammer, the key underlying issue appears to be that iris.coord_system.CoordSystem has no concept of a "datum", so are therefore missing information about positions on the surface of the earth relative to an ellipsoid (see this document for details).

It seems that the easiest way to support this, from where iris currently stands is to:

  • Add a datum attribute to iris.coord_system.CoordSystem subclasses.

  • Modify these methods to pass the datum to cartopy.

    Most code that does any kind of coordinate transformation with iris (including plotting and regridding) goes via at least one of these methods, either explicitly or implicitly, so fixing it here is crucial. Cartopy can handle datum shifts (it uses PROJ via pyproj, which does support this), but it is (almost) never told about the datum by iris.

  • Allow loading this from a file. The CF conventions do specify how to represent a datum in a netCDF file. Though I suspect that many files in practice do not have this information, so it should also be easy for the user to set one manually, and ideally this should be made clear in the documentation somewhere.

  • Ensure the new datum information is saved to a (netCDF) file, to minimise the chance of related issues arising in the future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions