Skip to content
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

Updated derivation test recipe #1790

Merged
merged 4 commits into from
Oct 16, 2020
Merged

Conversation

schlunma
Copy link
Contributor

@schlunma schlunma commented Aug 21, 2020

Updated the derivation test recipe with new variables and CMIP6 data for testing of ESMValGroup/ESMValCore#754.


Tasks

  • Create an issue to discuss what you are going to do, if you haven't done so already (and add the link at the bottom)
  • Give this pull request a descriptive title that can be used as a one line summary in a changelog
  • Make sure your code is composed of functions of no more than 50 lines and uses meaningful names for variables
  • Circle/CI tests pass. Status can be seen below your pull request. If the tests are failing, click the link to find out why.
  • Preferably Codacy code quality checks pass, however a few remaining hard to solve Codacy issues are still acceptable. Status can be seen below your pull request. If there is an error, click the link to find out why. If you suspect Codacy may be wrong, please ask by commenting.
  • Please use yamllint to check that your YAML files do not contain mistakes
  • (Only if really necessary) Add any additional dependencies needed for the diagnostic script to setup.py, esmvaltool/install/R/r_requirements.txt or esmvaltool/install/Julia/Project.toml (depending on the language of your script) and also to package/meta.yaml for conda dependencies (includes Python and others, but not R/Julia)
  • If new dependencies are introduced, check that the license is compatible with Apache2.0

Related to ESMValGroup/ESMValCore#754

@schlunma schlunma requested a review from bouweandela August 21, 2020 10:06
@schlunma schlunma self-assigned this Aug 21, 2020
@schlunma schlunma changed the title Updated derivation test recipes Updated derivation test recipe Aug 21, 2020
@bouweandela
Copy link
Member

Do you know if there is a reason why the variables are in separate diagnostics sections? I think they could simply be merged. Or maybe just two diagnostic sections, one for CMIP5 and one for CMIP6?

@schlunma
Copy link
Contributor Author

I think we had some issues back then when two different derived variables needed the same variables as requirement within the same diagnostic, but I'm not 100% sure. I merged all the diagnostics and the recipe still works, so it is much simpler now.

Copy link
Member

@bouweandela bouweandela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! @mattiarighi Could you please test?

@axel-lauer
Copy link
Contributor

I am running this recipe now and will take a look at the output.

@axel-lauer
Copy link
Contributor

axel-lauer commented Oct 2, 2020

I ran the recipe_preprocessor_derive_test.yml and as far as I can tell the output looks fine. But I noticed 2 things that look like bugs to me. These two bugs are not related to this PR or ESMValGroup/ESMValCore#754, but would probably be best addressed in ESMValGroup/ESMValCore#754 as it contains already several fixes to other derivation scripts. The 2 bugs are:

  1. vegfrac: the derivation script calculates "vegfrac = 1. - baresoilfrac" with baresoilfrac given in % (according to CMIP5/6 CMOR tables). This seems wrong and should be "vegfrac = 100. - baresoilfrac" instead.
  2. ohc: in CMIP5, the input variable thetao is given in K while in CMIP6 it is given in degC (according to the CMOR tables). Given how ohc is calculated, I think a conversion from degC to K is needed for CMIP6 data before calculating the ocean heat content.

@schlunma : Maybe you could briefly look into those two bugs? That does not look like a big thing to fix.

Other than that, thumbs up for this PR and ESMValGroup/ESMValCore#754!

@schlunma
Copy link
Contributor Author

schlunma commented Oct 2, 2020

Thanks for testing @axel-lauer! I will include the small changes into ESMValGroup/ESMValCore#754.

Copy link
Contributor

@axel-lauer axel-lauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks all good, just 1 small suggestion to make testing of variable ohc easier.

@bouweandela
Copy link
Member

This was reviewed/tested as part of ESMValGroup/ESMValCore#754.

@bouweandela
Copy link
Member

@axel-lauer I think this can be merged, right? If so, can you please approve?

Copy link
Contributor

@axel-lauer axel-lauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thumbs up for merging.

@bouweandela bouweandela merged commit 112b70b into master Oct 16, 2020
@bouweandela bouweandela deleted the expand_derive_vars_recipe branch October 16, 2020 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants