hdrake / xwmb

xWMB is a Python package that provides a efficient and lazy computation of Water Mass Budgets in arbitrary sub-domains of C-grid ocean models.
7 stars 2 forks source link

Making xwmt and xwmb conventions consistent. #2

Closed hdrake closed 1 year ago

hdrake commented 1 year ago

We need to think a bit more carefully about coordinate naming conventions for xwmb than for xwmt. First of all, we use variables on all four different C-grid grids (suffix h or t for tracers, u for zonal velocity, v for meridional velocity, and c or q for tracer cell corners, or vorticity). This is further complicated because we also need to pass datasets to sectionate, which has its own requirements for coordinate conventions.

I think the more straight forward approach is to following the default MOM6 grid suffix conventions: -(xh,yh) for tracer cells centers

I think all this would mean is changing all of the x and y in xwmt to xh and yh.

What do you think, @gmacgilchrist and @jetesdal?

gmacgilchrist commented 1 year ago

I agree that keeping everything consistent with standard MOM6 conventions will allow us to make the fastest progress for now, which I think is important.

Ultimately, we may consider refactoring all of these packages to adopt the CMOR conventions. Is it CMOR conventions that you have adopted in xwmt thus far, @jetesdal?

hdrake commented 1 year ago

Where can I find an explanation of what the CMOR conventions imply for naming of coordinates and new variable names?

I tried googling but couldn't find anything specific about things like names for different grids. I understand there are standards for coordinates like longitude, but how does CMOR handle there being different grids (like geolon vs. geolon_c in MOM6)? Also relevant to https://github.com/NOAA-GFDL/xwmt/issues/6

gmacgilchrist commented 1 year ago

That might be a question for @jkrasting ?

jkrasting commented 1 year ago

I honestly get lost in the standards myself. I rely on @aradhakrishnanGFDL to help make sense of them.

aradhakrishnanGFDL commented 1 year ago

Sorry, I missed this. The CMIP6 grids table may be useful for this discussion. CMOR specific questions/issues can go here.

hdrake commented 1 year ago

This issue is side-stepped by inferring dimension and coordinate names directly from xgcm.Grid.axis metadata.