Skip to content

cam6_4_198: Fix constants that were missing . in _r8 declarations - #1661

Merged
cacraigucar merged 3 commits into
ESCOMP:cam_developmentfrom
cacraigucar:cam_fix_r8_ints
Aug 26, 2026
Merged

cacraigucar merged 3 commits into
ESCOMP:cam_developmentfrom
cacraigucar:cam_fix_r8_ints

Conversation

@cacraigucar

@cacraigucar cacraigucar commented Aug 25, 2026 •

Copy link
Copy Markdown
Collaborator

Any constant that is declared without a . or e is defined as an integer even when it it has _r8 as its kind type. This can lead to integer arithmetic if other variables are integers as well.

Closes #1659

@cacraigucar cacraigucar self-assigned this Aug 25, 2026

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

Thanks @cacraigucar! The CAM .F90 changes look good to me, but I had some suggestions on the script's robustness.

Comment thread test/system/TR8_enhanced.sh Resolved
Comment thread test/system/TR8_enhanced.sh Resolved
Comment thread test/system/TR8_enhanced.sh Resolved
Comment thread test/system/TR8_enhanced.sh Resolved
echo "${sepstr}" | tee -a ${logfile}
ark_file="/fs/cgd/csm/tools/addrealkind/addrealkind"
tr8_script="${CAM_ROOT}/test/system/TR8.sh"
tr8_script="${CAM_ROOT}/test/system/TR8_enhanced.sh"

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.

I wonder if we should remove TR8.sh now that it is unused or replace it entirely with the "enhanced" version.

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

thanks @cacraigucar !

Reminder to remove the TR8.sh script.

@cacraigucar
cacraigucar merged commit c0e044b into ESCOMP:cam_development Aug 26, 2026
2 checks passed
@cacraigucar
cacraigucar deleted the cam_fix_r8_ints branch August 26, 2026 18:22
@cacraigucar cacraigucar changed the title Fix constants that were missing . in _r8 declarations am6_4_198: Fix constants that were missing . in _r8 declarations Aug 26, 2026
@cacraigucar cacraigucar changed the title am6_4_198: Fix constants that were missing . in _r8 declarations cam6_4_198: Fix constants that were missing . in _r8 declarations Aug 27, 2026
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

None yet

Projects

Status: Tag

Development

Successfully merging this pull request may close these issues.

3 participants