Skip to content

* Fixed sign error in thickness diffuse work#1050

Merged
adcroft merged 2 commits into
mom-ocean:dev/gfdlfrom
marshallward:meke_worku_fix
Jan 7, 2020
Merged

* Fixed sign error in thickness diffuse work#1050
adcroft merged 2 commits into
mom-ocean:dev/gfdlfrom
marshallward:meke_worku_fix

Conversation

@marshallward
Copy link
Copy Markdown
Collaborator

This patch fixes a bug in the sign of the tendency of the work by
thickness diffusion in the top layer along the u-points.

This resolves a variance in model runs after a 90-degree rotation, and
results are now consistent with the work_v calculation.

This patch will change answers for any runs using work-based thickness
diffusion.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Jan 2, 2020

Codecov Report

Merging #1050 into dev/gfdl will decrease coverage by <.01%.
The diff coverage is 62.5%.

Impacted file tree graph

@@             Coverage Diff              @@
##           dev/gfdl    #1050      +/-   ##
============================================
- Coverage     45.06%   45.06%   -0.01%     
============================================
  Files           212      212              
  Lines         62624    62629       +5     
============================================
+ Hits          28224    28226       +2     
- Misses        34400    34403       +3
Impacted Files Coverage Δ
...arameterizations/lateral/MOM_thickness_diffuse.F90 63.08% <62.5%> (-0.14%) ⬇️
...rc/parameterizations/vertical/MOM_tidal_mixing.F90 9.81% <0%> (-0.07%) ⬇️
src/user/RGC_initialization.F90 0% <0%> (ø) ⬆️
src/user/ISOMIP_initialization.F90 0% <0%> (ø) ⬆️
src/user/DOME_initialization.F90 0% <0%> (ø) ⬆️
src/user/DOME2d_initialization.F90 0% <0%> (ø) ⬆️
src/user/dumbbell_initialization.F90 0% <0%> (ø) ⬆️
src/user/dense_water_initialization.F90 0% <0%> (ø) ⬆️
src/user/BFB_initialization.F90 0% <0%> (ø) ⬆️

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 9676443...b598a2d. Read the comment docs.

This patch fixes a bug in the sign of the tendency of the work by
thickness diffusion in the top layer along the u-points.

This resolves a variance in model runs after a 90-degree rotation, and
results are now consistent with the work_v calculation.

This patch will change answers for any runs using work-based thickness
diffusion.
@marshallward
Copy link
Copy Markdown
Collaborator Author

Via @adcroft, I need to add a flag to reproduce the old behavior before merging this.

@StephenGriffies
Copy link
Copy Markdown
Contributor

Does this bug fix resolve the issues raised by @gustavo-marques with negative GM work term?

@adcroft
Copy link
Copy Markdown
Collaborator

adcroft commented Jan 6, 2020

We expect so but don't know yet.

Added a flag to reproduce the old GM work calculation in the top layer
with the incorrect sign.

The flag is currently enabled on default, which uses the old incorrect
expression.
Copy link
Copy Markdown
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.

@gustavo-marques
Copy link
Copy Markdown
Collaborator

gustavo-marques commented Jan 7, 2020

This patch does not fix NOAA-GFDL#965. GMwork is still positive at high latitudes, see figure below. This can be reproduced by the following changes in MOM6-examples/ice_ocean_SIS2/OM4_05:

  1. cp diag_table.MOM diag_table
  2. add "ocean_model", "GMwork", "GMwork", "ocean_daily", "all", "mean", "none",2 into diag_table
  3. add #override USE_GM_WORK_BUG=False into MOM_override
  4. set days = 10 in input.nml

image

@adcroft
Copy link
Copy Markdown
Collaborator

adcroft commented Jan 7, 2020

Is that the same color scale as for the figures in #965 ? If so then it does appear to be better.

@gustavo-marques
Copy link
Copy Markdown
Collaborator

Is that the same color scale as for the figures in #965 ? If so then it does appear to be better.

No, it is not the same scale. Below is a comparison between before (A) and after (B) this fix. The maximum value is larger after the fix but it does seem to reduce locations with positive values.

image

Mininum= -0.17472036 Maximum= 0.0049198894
Mininum= -0.1757154 Maximum= 0.009520339
Mininum= -0.013858554 Maximum= 0.009868649

@adcroft adcroft merged commit b598a2d into mom-ocean:dev/gfdl Jan 7, 2020
@marshallward marshallward deleted the meke_worku_fix branch February 13, 2020 16:40
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.

5 participants