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

Added weightless_mean, weightless_sum operators to volume_statistics preprocessor #456

Closed
wants to merge 5 commits into from

Conversation

ledm
Copy link
Contributor

@ledm ledm commented Feb 4, 2020

Before you start, please read CONTRIBUTING.md.

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

If you need help with any of the tasks above, please do not hesitate to ask by commenting in the issue or pull request.


Closes {442} in part. This issue was raised to address the problems in sum in area_statistics, but these same issues appear i nthe volume_statistics preprocessor.

@ledm ledm requested a review from valeriupredoi February 4, 2020 09:57
@mattiarighi mattiarighi added the preprocessor Related to the preprocessor label Feb 4, 2020
@ledm ledm requested a review from LisaBock February 4, 2020 10:01
@valeriupredoi
Copy link
Contributor

when you run python setup.py test you can find the bits that not tested in eg file:///home/valeriu/ESMValCore/test-reports/coverage_html/esmvalcore_preprocessor__volume_py.html - have a look in yours and see there are a couple statements that are not tested, it'd be great if you could write a test or two on those 🍺

@bouweandela
Copy link
Member

Wouldn't it make more sense to add an extra keyword argument weightless that can be true or false instead of absorbing this in the kind of statistic to compute? And support all iris statistics, like the other statistics functions do?

@schlunma
Copy link
Contributor

schlunma commented Apr 2, 2024

This is now possible with the weights: false keyword in the recipe (see https://docs.esmvaltool.org/projects/ESMValCore/en/latest/recipe/preprocessor.html#examples).

@schlunma schlunma closed this Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preprocessor Related to the preprocessor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants