Explore Xarray and CF Xarray features related to CF Convention #484
tomvothecoder
started this conversation in
3. Ideas
Replies: 1 comment
-
If somebody can investigate, I'll be interested to know how When wondering about this and preparing my question, I have just discovered that I did not know either how CF handled the periodicity, and I have asked about it: Can the longitude axis 360 degrees periodicity be described in CF ? Some of my earlier questions (in other issues) about periodicity assumed that periodicity metadata existed in CF. Theses questions may have seemed strange or obscure (if there is no way to describe periodicity). oops! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@xCDAT/core-developers we should explore CF Xarray and Xarray features focused on CF Convention. We can think about citing useful features in the xCDAT documentation. This exploration is important is because we want to make sure that we aren't duplicating functionalities that already exist and that first-time xCDAT/Xarray users are aware of them.
Xarray provides various CF features in the
conventions.py
file.decode_cf
cf_decoder
encode_dataset_coordinates
cf_encoder
decode_cf_variable
decode_cf_variables
encode_cf_variable
CF_RELATED_DATA
CF_RELATED_DATA_NEEDS_PARSING
CF Xarray, which is an xCDAT dependency, is a package focused on CF Convention. We use the
Dataset.cf.axes
,xr.Dataset.cf.coordinates
, andxr.Dataset.cf.bounds
attribute maps to interpret CF metadata in various parts of the xCDAT codebase.xarray.Dataset.cf.guess_coord_axis
API, which "Automagically guesses X, Y, Z, T, latitude, longitude, and adds appropriate attributes. Uses regexes from Metpy and inspired by Iris function of same name." I definitely don't think xCDAT should call this behind the scenes, but I can see it being very useful for users to call in their own code in cases where datasets are not CF compliant.Beta Was this translation helpful? Give feedback.
All reactions