Added fixes for hybrid level coordinates of CESM2 models#882
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
axel-lauer
left a comment
There was a problem hiding this comment.
Looks fine to me. This is a good approach to be able to work with the affected model datasets as we are not able to provide "fixes" for this issue for the affected models. Without this fix, some variables from these models could not be processed.
zklaus
left a comment
There was a problem hiding this comment.
I am still in the process of evaluation. My findings so far: The data from the CESM models are all broken. The lev coordinate has an invalid standard name that does not refer to a parametric coordinate, the lev bounds use a different coordinate system from the lev coordinate itself.
As such, those models need to be fixed independently from any action suggested in this PR.
That leaves us with only the CAS model. I have not finished looking into that.
As such, at the moment it is unclear if this PR will address an actual problem.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
If this is an issue with the data which could (potentially) be solved by the modelling group it should be reported to them. We have done this in the past and the modelling groups are generally happy to be informed and try to fix things if they can. They then also add the information here https://errata.es-doc.org/static/index.html so other people have a chance of knowing these issues. |
|
I think I found a solution to this problem: As stated in Appendix D of the CF conventions, "the hybrid sigma-pressure coordinate for level k is defined as a(k)+b(k) or ap(k)/p0+b(k), as appropriate". I checked this, and it is true for most CMIP6 models (the ones differing are the CESM2 models, the CAS model and 1 other model where there are numerical inconsistencies). This should allow us to calculate the correct values for the However, I really think that in some very specific cases it might not be useful or user-friendly to check all nitty gritty aspects of the CMOR table when there is a scientific justification. In this specific case, the height information was always given (by the formula which does NOT depend on |
That was pointed out in #840. Back in the day I tried summing a+b and I got coordinate values that match those of other models, so if that works for you, we can add this type of fix instead of skipping them. Copying the values from a model with the right coordinate as a fix would not be that bad either. |
f0a061d to
2966f54
Compare
|
Will re-open soon, this was automatically closed by force-pushing the current master to it (so I can have a fresh start on this branch). |
|
I added the fix for the CESM2 models according to the link that @sloosvel (I didn't see that back then, sorry). Unfortunately the CAS model is not available on mistral anymore, so I cannot test this. @sloosvel can you do a technical review, please? @axel-lauer can you do a scientific review, please? I used this recipe for testing: |
sloosvel
left a comment
There was a problem hiding this comment.
I could only run the CESM2 dataset, as the others are missing on jasmin, but the fix looks good to me.
axel-lauer
left a comment
There was a problem hiding this comment.
I have tried this fix and it produces results that look good when using no preprocessor. When using e.g. the following preprocessor to convert the data to altitude levels (same happens for pressure levels), only the lowermost level contains valid values while all other levels contain only missing values:
extract_levels:
levels: {cmor_table: CMIP6, coordinate: alt40}
coordinate: altitude
scheme: linear
This behavior differs from the results obtained using the current master branch (with --check_level=ignore to get the tool to process cl, cli or clw from CESM2). With the master branch, all altitude / pressure levels contain valid values.
I currently do not understand why this happens, but I think this might need some more investigation before this fix can be merged.
|
That is really strange....having a look at this right now! |
axel-lauer
left a comment
There was a problem hiding this comment.
After talking to @schlunma I redid the tests with a clean version of this branch (fix_hybrid_lev_coords). This solved the problem, the results now look good and as expected. It seems the problem I reported yesterday was caused by a somewhat screwed up version of my local repository copy. Sorry about that. This fix can be merged now!
|
@zklaus can you either approve the changes or dismiss you review? Merging is blocked because you requested changes on the original version of this PR which is completely outdated now. |
|
We have positive reviews and we need this PR now for further work. Since the PR changed in a way that the changes requested by @zklaus for an earlier version do not apply any more, I think merging this now is fine. |
This PR adds fixes for
cl,cliandclwfor the CESM2 models.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.
Closes ESMValGroup/ESMValTool#1903.