-
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
Automatically fix small deviations in vertical levels #1177
Conversation
this is cool! maybe we should make the tolerances a user tunable parameter? I can see uses for in a configuration file |
I'm not sure. Do you think the values that I've chosen now make sense? |
I think in this case it's better if we control the tolerances. Note also that it might be tempting to do a similar thing for horizontal coordinates, where e.g. in CORDEX very small deviations can occur. The difference is that there is no "right" value in CORDEX, this is decided by the model, whereas here we have an authoritative value from the CMIP tables. This is also what allows us to decide on tolerances, imho. |
Indeed, this was implemented in #507 with the default tolerances. The default relative tolerance might be a bit lax (rtol 1e-5, atol 1e-8). |
I could add that for |
I think the current values look fine to me, but let's have another look for the next release. |
Codecov Report
@@ Coverage Diff @@
## main #1177 +/- ##
==========================================
+ Coverage 87.47% 87.74% +0.27%
==========================================
Files 193 193
Lines 9649 9683 +34
==========================================
+ Hits 8440 8496 +56
+ Misses 1209 1187 -22
Continue to review full report at Codecov.
|
The remaining Codacy issue is about too many arguments for the |
@zklaus I added the option to tweak the parameters as requested. Could you have another look, please? |
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 add-on @bouweandela - do you want to add a couple words about it in the documentation (other than the API documentation)?
Thank you for reviewing @valeriupredoi! @zklaus Do you have any further comments on this? |
Description
This pull request aims to make working with vertical levels that have tiny errors in the coordinate values easier. It does this by:
extract_levels
when cube slicing is used instead of interpolationThis will make it easier to compute multi-model statististics, which now need exactly matching coordinates.
See #956 (comment)
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: