xCDAT / xcdat

An extension of xarray for climate data analysis on structured grids.
https://xcdat.readthedocs.io/en/latest/
Apache License 2.0
101 stars 11 forks source link

[Enhancement]: Improve error message when mapping to multiple axes based on CF attributes #610

Open tomvothecoder opened 4 months ago

tomvothecoder commented 4 months ago

Is your feature request related to a problem?

We use cf-xarray to interpret CF metadata in a dataset. cf-xarray can interpret different CF metadata to map to axes. For example, the Z axis can be mapped to either by axis, standard_name, long_name, positive, etc (link).

There might be cases where a dataset sets a CF attribute on an incorrect variable/coordinate. For example, in this discussion, the dataset has plev7 and tau being mapped to the Z axis. cf-xarray maps the positive attribute set on tau to the Z axis (which is probably not correct).

Describe the solution you'd like

Improve the error message and link to cf-xarray mapping tables.

Describe alternatives you've considered

No response

Additional context

No response