Removed scalar coordinates p0 and ptop prior to merge in multi_model_statistics#1471
Removed scalar coordinates p0 and ptop prior to merge in multi_model_statistics#1471
p0 and ptop prior to merge in multi_model_statistics#1471Conversation
schlunma
left a comment
There was a problem hiding this comment.
I like it!
In my opinion we could even go further and completely ignore scalar coordinates altogether (i.e., removing them before the merge and re-adding them later if necessary). I've had so many troubles with them (e.g., SciTools/iris#3584, just today!)...
However this might be a topic for another pull request. As far as I understood there might be also better support by iris in the future SciTools/iris#4446).
Co-authored-by: Manuel Schlund <32543114+schlunma@users.noreply.github.com>
p0 and ptop prior to merge in multi_model_statistics
Codecov Report
@@ Coverage Diff @@
## main #1471 +/- ##
=======================================
Coverage 89.84% 89.84%
=======================================
Files 196 196
Lines 10473 10477 +4
=======================================
+ Hits 9409 9413 +4
Misses 1064 1064
Continue to review full report at Codecov.
|
|
Just tested this again and it works nicely. This can be merged now. |
|
Great, thanks Axel! Just merged the main into this to make the tests pass, will merge afterwards. |
This is a solution for the issue described in #1222.
Description
Variables on hybrid vertical levels (e.g. clw) have to be converted to pressure or height levels to be able to be processed by some diagnostics and to be able to calculate meaningful multi-model statistics across different models. For this conversion, some models provide an auxiliary coordinate 'p0'. Calculating the multi-model mean over such datasets converted to pressure or height levels fails because 'p0' is kept after converting the vertical levels but (as expected) not identical in all models. This problem is solved by deleting the scalar auxiliary coordinates p0 and ptop (if present) after converting to pressure or altitude levels.
Closes #1222
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: