unifhy-org / unifhy

A Unified Framework for Hydrology
https://unifhy-org.github.io/unifhy
BSD 3-Clause "New" or "Revised" License
11 stars 5 forks source link

Review strictness of comparison of coordinate conversion between `SpaceDomain` and `Variable` #54

Open ThibHlln opened 2 years ago

ThibHlln commented 2 years ago

When working with projected coordinate systems, e.g. BritishNationalGrid, coordinate conversion parameters are provided to allow for the projection of the cartesian coordinates onto standard spherical coordinates (i.e. latitude/longitude in WGS84). At the moment, the list of conversion parameters checked is the one specified in the SpaceDomain itself, which may be more (or less) exhaustive than the list of parameters in the Variable. As soon as there is one parameter in one list that is missing in the other, the Variable will be deemed incompatible with the SpaceDomain.

We need to make sure that the list of parameters we specify in the SpaceDomain is strictly limited to the essential ones, i.e. the ones without which the projection cartesian-to-spherical would not be possible. We could keep the other ones as optional, and only check them if they are in the Variable as well.

In addition to the list, the name of the parameters themselves may be another cause of artificial incompatibility between Variable and SpaceDomain because of the existence of aliases. If the CF-conventions are not specific about the name of those parameters, we may also need to support the use of aliases for the expected conversion parameter names to be more flexible.