NOAA-GFDL / xwmt

Python package for water mass transformation analysis that leverages xarray functionality
https://xwmt.readthedocs.io/
MIT License
7 stars 5 forks source link

Naming convention conflicts when `lat` and `lon` are dimension names in the loaded dataset #6

Open gmacgilchrist opened 2 years ago

gmacgilchrist commented 2 years ago

For many datasets, e.g. JRA55, the dimensions may have names like lat and lon, as opposed to e.g. xh and yh.

First, the preprocessing step currently does not pick up on and rename these. That's an easy fix. However, it also introduces a naming clash with the grid naming conventions, wherein latitude and longitude are also required (as part of the thermodynamics calculations).

This issue is posted just to flag that certain naming conventions are in conflict with one another, and will need to be addressed.

jetesdal commented 2 years ago

What if we remove the preprocessing routine and add instructions that the package requires indices as x and y and the actual coordinates as lon and lat? See suggestion in #15

hdrake commented 1 year ago

This is no longer a problem in https://github.com/hdrake/xwmt/commit/5c6b0806d5007d5f50d06fffc5a0866876684fd5 because the names of grid coordinates are taken from the required xgcm.Grid arguments to xwmt.wmt.WaterMass.__init__.