-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upstream modifications to cf_xarray #186
Comments
Thanks @dcherian. I'll check with the rest of the team. |
Hi @dcherian, thanks for your interest! We've found cf_xarray to be an invaluable tool for working with climate data in practice, especially in our project's use case, where the data is coming from a third party and can be organized in a way we don't fully know ahead of time. The top priority of our project is supporting the in-house needs of our funding institutions, with general support for all aspects of the CF standard secondary to that. As you saw in the code, this means that the customizations I made to the accessors are specialized to our use case (and/or hacky), but we'd be happy to contribute any aspects that cf_xarray could benefit from! Responses to your remarks:
|
Hi,
I am very excited to see MDTF use cf_xarray.
I think it would make sense to upstream many of the modifications you make in https://github.com/NOAA-GFDL/MDTF-diagnostics/blob/main/src/xr_parser.py.
.cf.calendar
.cf.formula_terms
and use it in our.cf.decode_vertical_coords()
.axes_vars
, and.cf.coordinates_vars
asMapping[str, xr.DataArray]
etc. to replaceMDTF-diagnostics/src/xr_parser.py
Lines 190 to 192 in 70622b2
axis
attribute in that case when parsing metadata rather than monkey patchingMDTF-diagnostics/src/xr_parser.py
Line 47 in 70622b2
EDIT: We could even add this as an opt-in heuristic to
.cf.guess_coord_axis()
MDTF-diagnostics/src/xr_parser.py
Lines 124 to 130 in 70622b2
ds.cf.axes
?MDTF-diagnostics/src/xr_parser.py
Lines 117 to 121 in 70622b2
If there are other utility functions that could be upstream, we are definitely happy to discuss that too.
Do you have time to send a few PRs?
Deepak
cc @malmans2 @aulemahal
The text was updated successfully, but these errors were encountered: