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

The sum operator for zonal, meridional, area and volume statistics preprocessors #442

Closed
ledm opened this issue Jan 22, 2020 · 2 comments
Closed
Assignees
Labels
preprocessor Related to the preprocessor

Comments

@ledm
Copy link
Contributor

ledm commented Jan 22, 2020

There is a wider issue with the sum operator for zonal, meridional, area and volume statistics. I don't fully understand how we are supposed to use this operator and whether it makes sense as it is currently implemented.

Some data comes in the form of the average concentration of the entire cell (for instance Chlorophyll per cubic meter) - it would not make sense to calculate the sum of this value without weighting it by the cell sizes. On the other hand, some data comes in the form of the cell total (ie, Total Chlorophyll per cell), and it doesn't make sense to weight this data according to the cell size.

I propose that we split the sum operator into two separate operations: a weighted_sum and a weightless_sum, where the weighted_sum operator requires the fx file and the weightless_sum does not. (Happy to change the names if you think of something better).

The problem that I encountered with this before is that the weighted_sum operator is likely to require the units to be changed. For instance, if you are looking at the sum of the Chlorophyll per cubic meter weighted by the total volume, your result will be the total chlorophyll, not a concentration. This will output a cube with different units, and this (used to, at least) breaks the ESMValTool preprocessor

@mattiarighi mattiarighi added the preprocessor Related to the preprocessor label Jan 22, 2020
@ledm
Copy link
Contributor Author

ledm commented Jan 23, 2020

Partially solved with PR #446.

@schlunma
Copy link
Contributor

schlunma commented Apr 2, 2024

Weightless sums can now be calculated with the weights: false in the statistics preprocessors (see https://docs.esmvaltool.org/projects/ESMValCore/en/latest/recipe/preprocessor.html#examples).

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
Development

No branches or pull requests

4 participants