Extended fix for cl-like variables of CESM2 models#604
Conversation
axel-lauer
left a comment
There was a problem hiding this comment.
Just tested these fixes for the CESM2 model family with variables "cli" and "clw". It works! Nice!
|
Are the failing tests related to #189? @bouweandela @valeriupredoi |
|
can you merge the latest |
|
I did (one hour ago). |
|
|
|
Ready to merge from my side |
|
@mattiarighi Could you please test? @schlunma Is there no other way to fix the formula terms than changing the file? Because this is really inefficient and I was hoping to get rid of that function at some point.. |
|
@mattiarighi I'll rerun the tests and merge this PR in case the tests are successful. |
I invested quite some time in this and came to the following conclusion: It is possible without modifying the file, but the code necessary for this is considerably longer (it involves adding all coordinates, their bounds and manually adding the coordinate factory). Since the attribute |
Maybe there is some code in iris that you could copy/paste? It would be a lot faster, since file fixes copy the entire file before starting to do anything. If you don't have the time right now, maybe keep it as an idea for the future? |
|
Yes, I agree that this is slower. I will keep it in mind, but as I already said, it's way more complicated and also doesn't feel like the right fix. |
|
Tests were successful, PR is read to be merged... |
This PR extends the fixes for
cl,cliandclwfor the CESM2 models (the original fix only flips the vertical coords, but not the data itself).I also had to move the function
var_name_constraintto a new module (iris_helpers) because of circular dependencies inesmvaltool.cmor._fixes.sharedandesmvaltool.preprocessor.shared. I'm happy to rename that module if anybody knows a better name.Tasks
yamllintto check that your YAML files do not contain mistakesIf you need help with any of the tasks above, please do not hesitate to ask by commenting in the issue or pull request.
Related to #538 and #539.