Skip to content

Gravity wave moving mountain bug fixes and roo diagnostic - #478

Open
jimmielin wants to merge 8 commits into
ESCOMP:mainfrom
jimmielin:hplin/gw_nov26_1
Open

jimmielin wants to merge 8 commits into
ESCOMP:mainfrom
jimmielin:hplin/gw_nov26_1

Conversation

@jimmielin

Copy link
Copy Markdown
Collaborator

Tag name (The PR title should also include the tag name):
Originator(s): @JulioTBacmeister and @jimmielin co-authored with Claude Opus 5, 5.5

Description (include issue title and the keyword ['closes', 'fixes', 'resolves'] and issue number):

  • Moving mountain momentum bug fix
  • roo diagnostic

List all namelist files that were added or changed:

List all files eliminated and why:

List all files added and what they do:

List all existing files that have been modified, and describe the changes:
(Helpful git command: git diff --name-status main...<your_branch_name>)

List all automated tests that failed, as well as an explanation for why they weren't fixed:

Is this an answer-changing PR? If so, is it a new physics package, algorithm change, tuning change, etc?

If yes to the above question, describe how this code was validated with the new/modified features:

JulioTBacmeister and others added 3 commits November 9, 2026 12:43
… with ubm at the source level

Passes calc_taucd a corrected copy of ubi with the source-interface element
replaced by ubm(src_level), so the momentum flux sign matches the drag
gw_drag_prof actually applied. Previously the midpoint-interpolated
ubi(src_level+1) could carry the opposite sign, making momentum_fixer double the
column momentum change instead of cancelling it. gw_drag_prof and the UBI_MOVMTN
diagnostic are unchanged, so the legacy source-level critical-level behavior is
preserved bit-for-bit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…d bounds to moving-mountain GWD

Adds the 'roo' (near-surface tilt-dominance) criterion to tilt_centroid_levels,
with terrain-following centroid bounds scaled by local surface pressure instead
of a fixed 800 hPa cutoff, and a roo_block output flagging columns whose source
was zeroed for that reason. Threads zm through the source routines. Only
gw_movmtn_source 3, 4 and 5 run the centroid search, so the default source
type is unaffected.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…SIMA diagnostics

No answer changes. Removes the unused z_steer/z_launch outputs of
vorticity_centroid_levels, names the 100 hPa centroid floor in weighted_centroid,
makes the centroid-bound comments self-contained, and documents the momentum
fixer sign fix in terms of what calc_taucd and momentum_flux read.

gravity_wave_drag_moving_mountain_diagnostics gains ROO_BLOCK_MOVMTN so CAM-SIMA
writes the same history field as CAM.

Assisted-by: claude-fable:5.1
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

This PR: 1 new standard name and 0 removed

Updated every push. Comparing head 2d8e67c with main at merge-base 176292e.

New standard name Units Introduced in Also seen in Notes
flag_for_near_surface_tilt_dominance_blocking_of_moving_mountain_gravity_wave_drag_source flag schemes/gravity_wave_drag/gravity_wave_drag_moving_mountain.meta:423 schemes/sima_diagnostics/gravity_wave_drag_moving_mountain_diagnostics.meta:175

@jimmielin
jimmielin requested a review from cacraigucar November 9, 2026 20:37
hplin-ucar and others added 3 commits November 9, 2026 20:54
…ll ridges

gw_rdg_calc solved the implicit vertical diffusion of constituents and
dry static energy once per ridge (and residual), each from the same
input state, and summed the increments. Each solve alone is stable, but
the sum over-mixes the column: a 2dz mode is multiplied by
1 - sum_n(1 - f_n) < -1 when several ridges mix strongly, so it flips
sign and grows every step (ESCOMP/CAM issue #1753).

Fix: keep each ridge's diffusivity, drag and kinetic-energy heating;
drop its own q/DSE diffusion; after the ridge loop, do one implicit
solve with the diffusivity summed over all ridges and the residual.
All edits are tagged "! SUMK". This is the version used in the
WACCM-MA ne30pg3 L135 validation runs.

@cacraigucar cacraigucar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Still would like to know if there is a citation for what is the "roo criterion" and maybe roo in general. If there is none, we can note that.

@jimmielin

Copy link
Copy Markdown
Collaborator Author

Thanks @cacraigucar, now cleaned up in 2d8e67c

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