-
Notifications
You must be signed in to change notification settings - Fork 38
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
Smarter removal of coordinate metadata in multi_model_statistics
preprocessor
#1813
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1813 +/- ##
==========================================
+ Coverage 92.03% 92.05% +0.02%
==========================================
Files 234 234
Lines 12042 12074 +32
==========================================
+ Hits 11083 11115 +32
Misses 959 959
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
nice indeed, bar one (mostly philosophical) question: are we looking for full uniformity in metadata, or we can do something smart like: if 90% of datasets have a certain value for an attribute, then we'll use that (see inline comment specific to this question)
@ESMValGroup/technical-lead-development-team can one of you lovlies have a last look and merge this please? 🍺 |
Description
This PR makes the removal of coordinate metadata in
multi_model_statistics
preprocessor smarter, i.e., it uses common names (var_name
,standard_name
,long_name
) for coordinates whosename()
andunits
match.Prior to that change, the code removed the
long_name
attribute for all coordinates that did not exactly match, which caused problems for coordinates that only had a long name (e.g., the ones coming out ofiris.coord_categorisation
).Note that this does not apply if two or more coordinates of a cube have the same
name()
.In addition, now also the
circular
attribute is removed for all dimensional coordinates (this may be set by some models and by some not, which preventedmulti_model_statistics
to run).name()
andunits
long_name
andattributes
var_name
,standard_name
,long_name
, deleteattributes
, and setcircular=False
for dimensional coordinateslong_name
andattributes
long_name
andattributes
, and setcircular=False
for dimensional coordinatesCloses #1807
Link to documentation:
Before you get started
Checklist
It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.
To help with the number pull requests: