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

Fix the downsampled diagnostics that have to be summed but are averaged instead #1022

Merged

Conversation

nikizadehgfdl
Copy link
Contributor

  • @StephenGriffies and @adcroft noticed that the downsampled2 umo,vmo in 1/8 degree runs
    are smaller than the corresponding 1/4 degree run diagnostics by almost a factor of 2.
    I have confirmed this discrepancy for the magnitudes of umo,vmo in
    the same 1/8 degree run between the downsampled and original vars (gist).

  • The issue stems from calculating the mean rather the sum for diagnostic cases PSS and SPS (sum_x-point_y-sum_z)
    where the quantities have to be summed over the two fine cells.

  • This bug also affects all sums (SSS) d2 diagnostics such as volcello.

  • Also, I deleted the suspect logic for PSM cases which I think are non-existent in MOM6 anyway.

  • For the present lack of compute resources I have tested this in a low resolution model run and it seems to have worked (see the gist).

  • Please review.

- Steve and Mike noticed that the downsampled2  umo,vmo in 1/8 degree runs
  are smaller than the corresponding  1/4 degree run diagnostics by almost a factor of 2.
  I have confirmed this discrepancy for the magnitudes of umo,vmo in
  the same 1/8 degree run between the downsampled and original.
- The issue stems from calculating the mean rather the sum for diagnostics PSS and SPS
  where the quantities have to be summed over the two fine cells.
- This bug also affects SSS d2 diagnostics such as volcello.
- Also, I deleted the suspect logic for PSM diagnostics which I think are non-existant in MOM6.
- I have tested this in a low resolution model run and it seems to have worked.
@codecov-io
Copy link

codecov-io commented Oct 18, 2019

Codecov Report

Merging #1022 into dev/gfdl will increase coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##           dev/gfdl    #1022      +/-   ##
============================================
+ Coverage      43.6%   43.61%   +0.01%     
============================================
  Files           212      212              
  Lines         62191    62173      -18     
============================================
  Hits          27116    27116              
+ Misses        35075    35057      -18
Impacted Files Coverage Δ
src/framework/MOM_diag_mediator.F90 62.9% <0%> (+0.63%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 802f830...cafd3e8. Read the comment docs.

Copy link
Collaborator

@adcroft adcroft 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 correct. Extensive variables are simply masked and summed.

Copy link
Collaborator

@adcroft adcroft left a comment

Choose a reason for hiding this comment

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

@adcroft adcroft merged commit 9a44252 into mom-ocean:dev/gfdl Nov 8, 2019
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 this pull request may close these issues.

3 participants