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

Global total air sea flux of CO2 removed #708

Closed
ledm opened this issue Jul 10, 2020 · 1 comment · Fixed by #2139
Closed

Global total air sea flux of CO2 removed #708

ledm opened this issue Jul 10, 2020 · 1 comment · Fixed by #2139
Assignees

Comments

@ledm
Copy link
Contributor

ledm commented Jul 10, 2020

The derived variable Global total air sera flux of CO2, gtfgco2, is a CRUCIAL measurement of the earth system, and was mistakenly removed in PR #418 during the Christmas break. The changes in pr #418 were pushed without testing their actual functionality.

This functionality is now missing and can't be reproduced using the previously suggested area_statistics and convert_units preprocessors. This is because area_statistics miscalculates the units, and iris's convert_units can't be used to change units with different dimensions.

This field is also included in the second v2 paper, so this problem really needs to be fixed.

Describe the bug
A clear and concise description of what the bug is. If you are developing a new diagnostic script, please provide a link to the code/branch on GitHub that you are working in.

Please attach

  • The recipe that you are trying to run, you can find a copy in the run directory in the output directory
  • The main_log_debug.txt file, this can also be found in the run directory in the output directory
@bouweandela
Copy link
Member

Just for reference, the proposed way to compute this was to use a preprocessor

preprocessors:
  global_total:
    area_statistics:
      operator: sum
      fx_variables: [areacello]

on input variable fgco2.

This is because area_statistics miscalculates the units

Does this mean that there is a bug in the area_statistics function?

Here is an earlier comment by you:

The area_statistics sum operation calculates the area-weighted sum. This means that it multiplies the value, either a concentration [per cubic meter] or a flux [per square meter] by the area [square meters]. This changes the units, which isn't reflected by the preprocessor at the moment.

This means that every preprocessor that uses the area_statistics sum operation with fx files is scientifically incorrect.

Is this the problem you are referring to? Would multiplying the cube units by the weight units, e.g. here:

if operator_accept_weights(operator):
return cube.collapsed(coord_names, operation, weights=grid_areas)

solve that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants