Skip to content
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

Cellmethod tolerance #5126

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Cellmethod tolerance #5126

wants to merge 5 commits into from

Conversation

pp-mo
Copy link
Member

@pp-mo pp-mo commented Jan 4, 2023

Addresses #5119

f"NetCDF variable cell_methods of {nc_cell_methods!r} "
"contains no valid cell methods."
)
warnings.warn(msg, UserWarning)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be an Error

#5067 (comment)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well I disagree, for all the reasons listed there.
I think it's just unhelpful to refuse to load a file, if the problem can be stepped around.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to work with data from ESGF, it is important for ESMValTool that we can load malformed data and correct the iris cube after loading the bits that are fine. The alternatives are less attractive:

  1. Copy the malformed file, fix it and then load that with iris. This is computationally very inefficient because it requires a lot of writing to disk.
  2. Use xarray to load the malformed file, fix the issues, and convert the DataArray to an iris cube. This would be a good alternative if the conversion reliably worked.

Copy link
Member Author

@pp-mo pp-mo Jan 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also recalling this passionate appeal ...
#4506 (comment)
!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But... we are really serious now about the approach (2.) "Use xarray ... convert"
Relating to #4994, proposals are still working up : see here

Current status : I have functional code, and we have pretty much decided now on a plan...

  • set up a separate scitools repo
  • generic python classes for handling netcdf-data
  • free+fast conversion between these and any of : netcdf file data / iris cubes / xarray datasets

Frankly though, this will take a while to establish properly : I have as yet no home repo, no tests written + plenty of other priorities getting in the way.

@trexfeathers
Copy link
Contributor

Might not be clear publicly, but this is blocked by the much wider issue: #5165. #5165 is being assessed alongside SciTools' other large and important issues, but we can of course only progress a few of those each year.

@trexfeathers trexfeathers marked this pull request as draft February 19, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
3 participants