-
Notifications
You must be signed in to change notification settings - Fork 7
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
Esmval fixes #40
base: master
Are you sure you want to change the base?
Esmval fixes #40
Conversation
@ellesmith88 this all looks good to me. (Sorry for taking so long). The one thing that we might be able to generalise more is the Could it be written as It could then build an arbitrary slice to reverse across whichever dimensions are specified. E.g.:
NOTE: my understanding of Xarray dimension slicing might not be correct so please double-check. |
@agstephens At the moment I think this might take me too long to implement this, but I would like to come back to it. Should I include the fixes as they are in the new release of |
@ellesmith88 I think we should progress this with the ESMValTool team rather than spending time refactoring at this stage. Are you happy to contact them to start the conversation? |
There's a few fixes that I've added that I'm not 100% sure they're doing the same thing as the fixes in ESMValTool.
daops/daops/data_utils/array_utils.py
Lines 4 to 10 in 05f7fdb
equivalent ESMVal fix: https://github.com/ESMValGroup/ESMValCore/blob/ea6618c3fd014d32f29931853cc16c22453c4e09/esmvalcore/cmor/_fixes/cmip5/cesm1_bgc.py#L8-L26
Mine changes the values to NAN but I wondered whether it should return a masked array?
daops/daops/data_utils/var_utils.py
Lines 4 to 15 in 29f139b
daops/daops/data_utils/coord_utils.py
Lines 35 to 43 in 29f139b
equivalent ESMVal fixes:
https://github.com/ESMValGroup/ESMValCore/blob/ea6618c3fd014d32f29931853cc16c22453c4e09/esmvalcore/cmor/_fixes/cmip6/cesm2.py#L11-L76
I found their fix a bit confusing so it would be good to check I'm doing the right thing here