Moving-mountain GWD: MMTAUE/W/S/N diagnostics and atmos_phys bump for tilt/precip source options - #1684
Draft
JulioTBacmeister wants to merge 2 commits into
Draft
Moving-mountain GWD: MMTAUE/W/S/N diagnostics and atmos_phys bump for tilt/precip source options#1684JulioTBacmeister wants to merge 2 commits into
JulioTBacmeister wants to merge 2 commits into
Conversation
- Add local arrays and outfld/addfld calls for MMTAUE, MMTAUW, MMTAUS, MMTAUN: cardinal-direction Reynolds stresses for the moving-mountain gravity wave source, named by direct analogy to Beres's existing 'B'-prefixed outputs (manually named, not routed through the generic scheme-prefix infrastructure). - Wire the 4 new taucd_west/east/south/north intent(out) args from gravity_wave_drag_moving_mountain_run into gw_drag_cam.F90. - Update namelist_definition.xml doc string for movmtn_source to describe all 5 valid values (1=vorticity, 2=PBL momentum flux, 3=tilt-layer-mean, 4/5=tilt+precip fits); default and valid_values unchanged. - Bump src/atmos_phys submodule pointer to the branch tip on JulioTBacmeister/atmospheric_physics as a temporary placeholder, pending merge of the companion atmos_phys PR: ESCOMP/atmospheric_physics#448 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
gw_drag_cam_init requested the TTEND_DP pbuf index whenever (use_gw_convect_dp .or. use_gw_movmtn_pbl), but convect_deep.F90 only ever registers that field when use_gw_convect_dp .and. deep_scheme=='ZM'. Running with the moving-mountain source on and use_gw_convect_dp=.false. therefore failed at init looking up a field that was never added to pbuf. gravity_wave_drag_moving_mountain.F90 confirms ttend_dp/netdt is only read in the use_gw_movmtn_pbl=.false. (legacy, non-PBL) branch of gw_movmtn_src; every currently-supported movmtn_source path requires use_gw_movmtn_pbl=.true. and never touches it. So the fix is simply to stop requesting the index unless the actual producer (deep convection GW) is enabled; the existing "if (ttend_dp_idx > 0)" fallback already zero-fills the array otherwise. Verified: case.build (0 warnings/errors) and a 5-day case.submit run with use_gw_convect_dp=.false. + use_gw_movmtn_pbl=.true. completed successfully (CaseStatus: "model execution success"), where it previously failed at init. Also bumps the src/atmos_phys submodule pointer to 2a5b2df (the comment-restoration commit already pushed to atmospheric_physics#448), which had been left stale after that push. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
Adds directional (E/W/S/N) Reynolds-stress history diagnostics
(
MMTAUE/MMTAUW/MMTAUS/MMTAUN) for the moving-mountain gravity wavesource, and bumps
src/atmos_physto pick up new opt-in flow-dependenttilt/precipitation source formulations for that scheme.
This PR is blocked on, and must not be merged before, the companion
atmos_phys PR: ESCOMP/atmospheric_physics#448
The
src/atmos_physsubmodule pointer here currently points at the tip ofthat PR's branch on my personal fork (a temporary placeholder) rather than
a real upstream commit, since that PR hasn't merged yet. It will be
updated to the real, tagged upstream commit once #448 merges.
gw_drag_cam.F90: wires the scheme's newtaucd_west/east/south/northoutputs into 4 new history fields (
MMTAUE/W/S/N, interface levels,units Pa), named by direct analogy to the existing Beres
BTAUE/W/S/Ndiagnostics but with a plain
MMprefix, manually added rather thanrouted through the generic scheme-prefix infrastructure (per author
preference — the existing infra was judged more general than needed
here). Also adds
TILT_MOVMTN/PSTEER_MOVMTN/PLAUNCH_MOVMTNdiagnostics and threads a new
prectinput to the scheme.outfldcalls that passedncolinstead of
pcolsas the array-bound argument (CAM convention);affects only fill values in unused padding columns of those diagnostic
fields, not the prognostic state.
namelist_definition.xml: doc-string-only update formovmtn_sourcedescribing the new valid values 3-5; default (1) and
valid_valuesunchanged.
movmtn_sourcedefaults to 1, which exercises only the pre-existing, unchanged
vorticity_flux_srcpath; new outputs are write-only diagnostics.AI involvement disclosure
This PR was produced through heavy, sustained collaboration with Claude
(Anthropic's Claude Code), across every stage: reconciling two weeks of
local development against current
cam_developmentvia 3-way merge,diagnosing and fixing a merge-introduced compile error via an actual test
build, adding the new diagnostics, and drafting this PR/ChangeLog text.
All changes were reviewed and directed by the human author (Julio
Bacmeister) throughout, but the mechanical and drafting work was
substantially done by Claude, not just lightly assisted.
Test plan
ne3pg3_ne3pg3_mt232grid, caspermachine): 0 warnings/errors in the modified files.
aux_camregression suite (derecho/intel, derecho/nvhpc,izumi/nag, izumi/gnu) has not yet been run against this branch —
opening as draft pending that and pending part of cam6_3_033: Increase default number of tasks on cheyenne for WACCMX #448.
git merge-file3-way merge against the true upstreambase; confirmed the only real upstream drift was two cosmetic/
precision-suffix changes unrelated to this branch.
🤖 Generated with Claude Code