-
Notifications
You must be signed in to change notification settings - Fork 289
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
Adds a warning for iris.coord_categorisation.add_season_membership
that this is not saveable as a boolean coordinate.
#6305
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6305 +/- ##
=======================================
Coverage 89.80% 89.80%
=======================================
Files 90 90
Lines 23752 23755 +3
Branches 4418 4418
=======================================
+ Hits 21331 21334 +3
Misses 1672 1672
Partials 749 749 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @HGWright; I think we can increase this warning's value by widening its scope.
"The 'season_membership' coordinate is a boolean and will not be" | ||
"saveable to a NetCDF file. If you need to save the file you can" | ||
"convert them to integers using coord.points = coord.points.astype(int)", | ||
category=iris.warnings.IrisCfSaveWarning, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
category=iris.warnings.IrisCfSaveWarning, | |
category=iris.warnings.IrisSaveWarning, |
This does not relate to CF itself, but to the NetCDF file format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please can you add a What's New entry?
🚀 Pull Request
Description
This addresses #5909, by raising a warning that since this adds a boolean, the result will not be saveable to a Netcdf file since it contains a boolean coordinate.
Note for reviewer:
I was not 100% sure on the type of error to raise either
iris.warnings.IrisSaveWarning
oriris.warnings.IrisCfSaveWarning
since this a problem with Netcdf files.