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

Fixed derivation of co2s #594

Merged
merged 1 commit into from Mar 31, 2020
Merged

Fixed derivation of co2s #594

merged 1 commit into from Mar 31, 2020

Conversation

schlunma
Copy link
Contributor

@schlunma schlunma commented Mar 30, 2020

This PR fixes an error in the derivation script of co2s. In order to represent the true CO2 mole fraction at surface, it is necessary to interpolate the data on the surface air pressure. A recipe to test these changes can be found in #587.

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)
  • This pull request has a descriptive title that can be used in a changelog
  • Add unit tests
  • Public functions should have a numpy-style docstring so they appear properly in the API documentation. For all other functions a one line docstring is sufficient.
  • If writing a new/modified preprocessor function, please update the documentation
  • Circle/CI tests pass. Status can be seen below your pull request. If the tests are failing, click the link to find out why.
  • Codacy code quality checks pass. 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
  • If you make backward incompatible changes to the recipe format, make a new pull request in the ESMValTool repository and add the link below.

Closes #600.

@schlunma schlunma added bug Something isn't working variable derivation Related to variable derivation functions labels Mar 30, 2020
@schlunma schlunma self-assigned this Mar 30, 2020
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.

Code looks good to me, but this would need scientific review too. Could you please always create issues for bugs, because that way people can find out that there was a bug (and it is now solved). Not everyone might notice a merged pull request.

Copy link
Contributor

@bettina-gier bettina-gier 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 to me now!
Tested it with both a CMIP5 and CMIP6 model, ran without issues and result looks plausible.

@mattiarighi mattiarighi merged commit 8e694c0 into master Mar 31, 2020
@mattiarighi mattiarighi deleted the fix_co2s_derivation branch March 31, 2020 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working variable derivation Related to variable derivation functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Derivation of co2s is not correct
4 participants