Skip to content

cam6_4_062: Phase 2 of GW development - #1117

Merged
cacraigucar merged 25 commits into
ESCOMP:cam_developmentfrom
JulioTBacmeister:gw_devel_b00
Feb 7, 2025
Merged

cacraigucar merged 25 commits into
ESCOMP:cam_developmentfrom
JulioTBacmeister:gw_devel_b00

Conversation

@cacraigucar

Copy link
Copy Markdown
Collaborator

Closes #1115

@cacraigucar cacraigucar added enhancement New feature or request answer changing answer changing tag CoupledEval3 chill labels Aug 5, 2024
@cacraigucar
cacraigucar marked this pull request as draft August 5, 2024 16:09
@cacraigucar
cacraigucar marked this pull request as ready for review January 27, 2025 21:38

@cacraigucar cacraigucar left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I might have a few more changes, but submitting it for now

Comment on lines +136 to +137
!!$OMP PARALLEL NUM_THREADS(horz_num_threads), DEFAULT(SHARED), PRIVATE(nets,nete,hybrid,ie,ncols,frontgf_thr,frontga_thr)
! hybrid = config_thread_region(par,'horizontal')

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Have these been tested?

Comment thread bld/build-namelist Resolved
Comment thread src/physics/cam/gw_drag.F90 Resolved
Comment thread src/physics/cam/gw_movmtn.F90 Resolved
Comment thread src/physics/cam/gw_movmtn.F90 Resolved
Comment thread src/physics/cam/gw_movmtn.F90 Resolved
Comment thread src/physics/cam/gw_movmtn.F90 Resolved
Comment thread src/dynamics/se/dp_coupling.F90 Resolved
@cacraigucar cacraigucar changed the title Phase 2 of GW development cam6_4_062: Phase 2 of GW development Jan 28, 2025
@nusbaume
nusbaume self-requested a review February 3, 2025 16:17

@nusbaume nusbaume 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.

Looks good! I realize that it appears to be a bunch of requests, but the vast majority are just code-cleanup or documentation requests. Of course if you have any questions or concerns with any of my questions or suggestions just let me know. Thanks!

Comment thread src/dynamics/se/dp_coupling.F90 Resolved
Comment thread src/physics/cam/gw_movmtn.F90 Resolved
Comment thread src/physics/cam/gw_movmtn.F90 Resolved
Comment thread src/physics/cam/gw_movmtn.F90 Resolved
Comment thread src/physics/cam/gw_rdg.F90 Resolved
Comment thread src/physics/cam/gw_rdg.F90 Resolved

<entry id="movmtn_plaunch" type="real" category="gw_drag"
group="gw_drag_nl" valid_values="" >
Global launch level (Pa) for moving mtns. If neg do something else

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Modify this comment as above

Comment thread src/physics/cam/gw_common.F90 Resolved
Comment thread src/physics/cam/gw_drag.F90 Resolved
Comment thread src/physics/cam/gw_drag.F90 Resolved
Comment thread src/physics/cam/gw_drag.F90 Resolved
Comment thread src/physics/cam/gw_rdg.F90 Resolved

@nusbaume nusbaume 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.

Everything looks great to me now!

Fix heating depth bug for gravity wave parameterization
@cacraigucar
cacraigucar merged commit 834379d into ESCOMP:cam_development Feb 7, 2025
gold2718 pushed a commit to gold2718/CAM that referenced this pull request Feb 13, 2025
Merge pull request ESCOMP#1117 from JulioTBacmeister/gw_devel_b00

cam6_4_062: Phase 2 of GW development

ESCOMP commit: 834379d
gold2718 pushed a commit to gold2718/CAM that referenced this pull request Feb 19, 2025
Merge pull request ESCOMP#1117 from JulioTBacmeister/gw_devel_b00

cam6_4_062: Phase 2 of GW development

ESCOMP commit: 834379d
gold2718 pushed a commit to gold2718/CAM that referenced this pull request Feb 23, 2025
Merge pull request ESCOMP#1117 from JulioTBacmeister/gw_devel_b00

cam6_4_062: Phase 2 of GW development

ESCOMP commit: 834379d
jtruesdal added a commit to NCAR/StormSPEED that referenced this pull request Oct 19, 2026
senh: catch up interface with se@cam6_4_211 (BFB), fix threaded builds, ne3pg2 test infrastructure
Brings the senh (E3SM HOMME nonhydrostatic) interface up to date with the ESCOMP se interface at cam6_4_211, fixes threaded senh builds, and adds a fast ne3pg2 BFB test. No answer changes. The two answer-changing parts of this work are separate PRs (IC tracer convention; pressure-surface frontogenesis default).

Interface catch-up (se PRs in cam6_3_085..cam6_4_211):

stepon: aerosol set_transported/get_transported as in se/fv/mpas, compute_adv_tends_xyz around dyn_run, dead E3SM_SCM_REPLAY code removed, tottnam (TA*) fields registered in dyn_init.
dyn_comp: cam6_4_180: Read water species from IC file in analytic configurations ESCOMP#1575 (water species skipped only for moist analytic ICs); dead set_phis_old removed.
dyn_grid: cam6_4_204: CAM misc PRs ESCOMP#1690 (unused ptimelevels).
dp_coupling: cam6_3_134: Update atmospheric_physics external ESCOMP#891 (CCPP update_dry_static_energy_run, cpairv), cam6_3_151: "Science optimize" SE-CSLAM dycore and stabilize WACCM ESCOMP#968 (qneg3 before geopotential and static energy, as in se), cam6_4_023: SCAM-SE feature addition plus bugfixes and some refactoring. ESCOMP#958 (phys_columns_on_task).
test_fvm_mapping: cam6_4_198: Fix constants that were missing . in _r8 declarations  ESCOMP#1661 (real literals; compiled out unless debug_coupling).
restart_dynamics: layout matched to se. Bug fix: read_elem read W/PHINH over nlev instead of nlevp, leaving the bottom interface unread.
gravity_waves_sources: frontogenesis from E3SM EAM with optional pressure- or height-surface correction (Charron and Manzini 2002), off here; gws_src_vort thread-region wrapper (se cam6_4_062: Phase 2 of GW development ESCOMP#1117 structure).
Not applicable to senh (no CSLAM, GLL tracer advection): cam6_3_127: Turn on HB where CLUBB is not active ESCOMP#849, cam6_4_199: Automatic dynamics-splitting defaults to the SE dycore + clean-up ESCOMP#1656,  cam6_4_200: Remove PS noise in SE-CSLAM, WACCM stability and other stuff ESCOMP#1664, the CSLAM parts of cam6_3_151: "Science optimize" SE-CSLAM dycore and stabilize WACCM ESCOMP#968, and the remaining dyn_grid and dp_coupling changes.
Deferred: cam6_3_109: Science and infrastructure changes to improve energy/mass budget reporting and closure. ESCOMP#761 (dycore_budget, not yet ported), SE-SCAM (compute_write_iop_fields), interp_mod.
Threading fixes:

compute_vorticity_4gw was called outside any OpenMP region. With hthreads>1, only thread 0's elements got vorticity and the rest of vort4gw was left unset. It's now wrapped in gws_src_vort.
ccs_config nh.02: threaded derecho intel/gnu builds enabled only the Kokkos OpenMP backend, but HOMME COMPOSE uses Kokkos::Serial, so threaded senh builds didn't compile. They now enable both. The tag also fixes the schema-element order for the ne1024 domains.
cam_mods/namelist_mod.F90 override: identical to HOMME's except for a dead #if defined(CAM) && !defined(MODEL_CESM) block containing use dyn_grid. CIME's dependency scan doesn't evaluate #if, so the block created a false namelist_mod <-> dyn_grid cycle. gmake dropped the false edge, so builds succeeded, but the build order was left to make's traversal.
Tests and infrastructure:

New fast stormbfb: ERP_Ln9 ne3pg2_ne3pg2_mt232 FHISTC_LTso, theta-l and theta-l_kokkos (cam7 physics with aerosols, pg2 physgrid, restart; fits the develop queue).
The ne16 and ne30 tests moved to stormbfb_prod. The broken F2000climo nochem_clubbmf entry is removed (CLUBB_MF requires cam7).
ne3pg2 topography default added.
Verification:

Every commit was built and BFB-checked on persistent ne3pg2 theta-l and theta-l_kokkos cases. The dp_coupling commits were also checked with 2 threads.
The full PR, clean-built, is BFB against a reference built from origin/stormspeed (ac5e75c) with the same topography (theta-l and Kokkos: h0a, h0i, cam.i).
The qneg3 reorder changes answers only where water vapor is below qmin before the geopotential. In these runs qneg3 clipped only aerosol number at D_P_COUPLING, never Q.
create_test stormbfb_prod --compare stormspeed_ac5e75c8: PASS (ne16 FKESSLER theta-l, theta-l_kokkos, ne30 F2000climo; BASELINE and ERP restart compare).
create_test stormbfb --generate stormspeed_senh_pr1: PASS (ne3pg2 theta-l and theta-l_kokkos; ERP restart compare), giving the new ne3pg2 baseline for PRs 2 and 3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

answer changing answer changing tag chill CoupledEval3 enhancement New feature or request

Projects

Status: Tag

Development

Successfully merging this pull request may close these issues.

4 participants