xcdat icon indicating copy to clipboard operation
xcdat copied to clipboard

[Feature]: Enable recognition of vertical axes if Z-axis is not defined

Open pochedls opened this issue 2 years ago • 1 comments

Is your feature request related to a problem?

If the latitude axis doesn't have axis=Y set, we should still be able to recognize it as a latitude axis if it is called lat or latitude. This is similarly true for longitude (recognized as lon or longitude). At the same time, if a dataset has a unique name for latitude (e.g., g4_lat_2 in the JRA reanalysis), we probably should not hard code that into xcdat as it is overly specific to one dataset.

This ticket is spurred from this PR [see discussion therein]. We should carefully consider what we want to recognize as "standard" names for vertical axes.

Describe the solution you'd like

Inclusion of "standard" vertical level names into xcdat.

Describe alternatives you've considered

No response

Additional context

No response

pochedls avatar Feb 10 '24 01:02 pochedls

Thanks for opening for this Steve.

If the latitude axis doesn't have axis=Y set, we should still be able to recognize it as a latitude axis if it is called lat or latitude. This is similarly true for longitude (recognized as lon or longitude). At the same time, if a dataset has a unique name for latitude (e.g., g4_lat_2 in the JRA reanalysis), we probably should not hard code that into xcdat as it is overly specific to one dataset.

We try to do this now, but we haven't more carefully defined what the generally accepted "common" names are for the Z-axis. I incorrectly assumed the ones proposed in #584 were generally accepted common axis names for Z and prematurely merged that PR.

Here's the current map for more context: https://github.com/xCDAT/xcdat/blob/94271f151b182c6b8dd4cb726df1dcc2658e2b4d/xcdat/axis.py#L41-L60

tomvothecoder avatar Feb 12 '24 18:02 tomvothecoder