-
Notifications
You must be signed in to change notification settings - Fork 37
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
[Bug]: xr.DataArray.from_cdms2() deprecated in newer versions of xarray #1004
Comments
It looks like the cdms component is still remaining here only for land sea mask generation in this line. As a part of ENSO code conversion I have made a land sea mask generation function using xarray, which could be applied here. I will work on it, thank you for reporting it! |
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happened?
Running the precipitation variability metrics with xarray version > 2023.06.0 leads to a failure with the following message:
This is due to the following calls to 'to_cdms2' and 'from_cdms2':
https://github.com/acordonez/pcmdi_metrics/blob/variability_fixes/pcmdi_metrics/precip_variability/lib/lib_variability_across_timescales.py#L393
https://github.com/acordonez/pcmdi_metrics/blob/variability_fixes/pcmdi_metrics/precip_variability/lib/lib_variability_across_timescales.py#L395C12-L395C41
What did you expect to happen? Are there are possible answers you came across?
The driver should not fail here. The calls to 'to_cdms' and 'from_cdms' need to be removed, and ideally the call to cdutil to generate the land sea mask should also be removed.
Minimal Complete Verifiable Example (MVCE)
No response
Relevant log output
Anything else we need to know?
No response
Environment
xarray 2023.11.0 pyhd8ed1ab_0 conda-forge
I am using a dev version of PCMDI Metrics I believe this error will occur in any recent version.
The text was updated successfully, but these errors were encountered: