Bugfix on total column thickness for wetting#975
Merged
Conversation
53d92c3 to
61039e2
Compare
adcroft
requested changes
Oct 1, 2025
Member
adcroft
left a comment
There was a problem hiding this comment.
These fixes make sense to me. I have just one suggest about a re-calculation in the barotropic solver. I've not tested yet...
61039e2 to
a67ff8e
Compare
a67ff8e to
0764738
Compare
Hallberg-NOAA
approved these changes
Dec 3, 2025
Member
Hallberg-NOAA
left a comment
There was a problem hiding this comment.
These changes should avoid encountering nonsensical values (e.g., NaNs or negative total thicknesses) when unmasked points have topography above the mean sea-level. Moreover all of the altered blocks of code have runtime options that could avoid their use. It may be worthwhile revisiting these spots in the code later to see whether a better solution is available, but for now these changes do correct some obvious problems with the code.
0764738 to
ba48d40
Compare
adcroft
approved these changes
Dec 3, 2025
In a number of cases, total resting column thickness is calucated as
G%bathyT + G%Z_ref, which is largely correct but for wetting, i.e.
G%bathyT < 0. This commit makes a correction for seven cases with this
potential bug.
There is no answer changes if no wetting points are used and G%Z_ref is
zero.
List of modules/processes affected:
* MOM_barotropic
* affects only surface stress when BT_NONLIN_STRESS is False.
* MOM_wave_speed
* h2 calculations in
* subroutine internal_tides_init
* subroutine int_tide_input_int
* subroutine tidal_mixing_init
* MOM_lateral_mixing_coeffs
* MOM_MEKE
ba48d40 to
f325a37
Compare
Member
|
This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/29417. |
Hallberg-NOAA
added a commit
that referenced
this pull request
Dec 9, 2025
The CHANNEL_DRAG option was using a harmonic mean to interpolate adjacent bottom depths at velocity points to vorticity points. However, this is not well behaved when the bottom depth is negative (i.e., above sea level), as was noted as a part of PR #975. This commit adds the new runtime parameter CHANNEL_DRAG_SHELFBREAK_DEPTH to set a depth below which a harmonic mean bottom depth is still used to mimic a continental shelfbreak profile, but above which a simple arithmetic mean is used to interpolate bathymetry to vorticity points for use with CHANNEL_DRAG. The expressions vary continuously with depth and avoid the previous problems with division by zero or a badly formed harmonic mean. By default, all answers are bitwise identical in any cases that worked previously, but cases with oceans (or Great Lakes) in basins with bottoms that are above sea-level should now work sensibly when CHANNEL_DRAG is enabled. There is a new runtime parameter in some cases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In a number of cases, total resting column thickness is calucated as
G%bathyT + G%z_ref, which is largely correct but for wetting, i.e.G%bathyT + G%z_ref< 0. This commit makes a correction for seven cases with this potential bug.List of modules/processes affected:
MOM_barotropicBT_NONLIN_STRESSis False.MOM_wave_speedh2calculations ininternal_tides_initint_tide_input_inttidal_mixing_initMOM_lateral_mixing_coeffsMOM_MEKEThere is no answer changes if no wetting points are used and G%Z_ref is zero.