-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add plev/altitude conversion to extract_levels #892
Conversation
Is there a specific reason why you don't calculate the altitude |
Calculating altitude bounds did not work for the MPI-ESM1-2-LR model (variable clw)... |
I guess that model also needs a fix similar to |
@schlunma Sounds good! |
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.
Scientific review: Successfully tested the new function on real data (about 20 CMIP6 models) and on synthetic data (see tests) 👍
Technical review: Fine from my side, but since I wrote parts of the code myself maybe @valeriupredoi can have a brief look on the changes?
@axel-lauer I think it would be nice to have one sentence about this functionality in the documentation? And maybe also the docstring of extract_levels
?
@schlunma good point! I just added some documentation. |
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.
Looks good to me, apart from the minor technical improvement mentioned in the comment that could be made.
It would also be nice to mention the functionality here: https://docs.esmvaltool.org/projects/esmvalcore/en/latest/recipe/preprocessor.html#vertical-interpolation |
I thought the information in https://docs.esmvaltool.org/projects/esmvalcore/en/latest/recipe/preprocessor.html#vertical-interpolation is taken from the docstrings. These have been updated accordingly... |
No, that's the info here: https://docs.esmvaltool.org/projects/esmvalcore/en/latest/api/esmvalcore.preprocessor.html#esmvalcore.preprocessor.extract_levels The preprocessor as it can be used in the recipe has it's own documentation page: |
@bouweandela Thanks for pointing me to the documentation page. I added a brief description of the new functionality. |
This pull requests extends the existing preprocessor function extract_levels. The possibility to convert pressure levels (air_pressure) into height (altitude) and vice versa is added. For the conversion, existing code in cmor/_fixes/shared.py is used that uses the US standard atmosphere to convert from height to pressure. A similar function has been implemented to also allow conversion from pressure to height.
Tasks