Skip to content
Merged
8 changes: 4 additions & 4 deletions .config_files.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<entry_id>

<!-- This is the same as the default entry in
cime/config/cesm/config_files.xml except for the value for clm:
cime/config/cesm/config_files.xml except for the value for cam:
In a standalone cam checkout, COMP_ROOT_DIR_CAM is $SRCROOT
rather than $SRCROOT/components/cam.
However, because of the way overrides are handled, we need to
Expand All @@ -17,9 +17,9 @@
<default_value>unset</default_value>
<values>
<value component="cam" >$SRCROOT</value>
<value component="dlnd" >$CIMEROOT/src/components/data_comps/dlnd</value>
<value component="slnd" >$CIMEROOT/src/components/stub_comps/slnd</value>
<value component="xlnd" >$CIMEROOT/src/components/xcpl_comps/xlnd</value>
<value component="datm" >$SRCROOT/components/cdeps/datm</value>
<value component="satm" >$CIMEROOT/CIME/non_py/src/components/stub_comps_$COMP_INTERFACE/satm</value>
<value component="xatm" >$SRCROOT/components/cmeps/med_test_comps/xatm</value>
</values>
<group>case_comps</group>
<file>env_case.xml</file>
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/mizuRoute
[submodule "ccs_config"]
path = ccs_config
url = https://github.com/ESMCI/ccs_config_cesm.git
fxtag = ccs_config_cesm1.0.79
fxtag = ccs_config_cesm1.0.81
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git

Expand Down
2 changes: 1 addition & 1 deletion cime_config/testdefs/testlist_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2498,7 +2498,7 @@
<machine name="derecho" compiler="intel" category="aux_cam"/>
</machines>
<options>
<option name="wallclock">00:40:00</option>
<option name="wallclock">00:50:00</option>
<option name="comment" >WACCM7 with MA chemistry</option>
</options>
</test>
Expand Down
68 changes: 68 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,71 @@

===============================================================

Tag name: cam6_4_164
Originator(s): cacraigucar, billsacks, sjsprecious, nusbaume, jimmielin
Date: April 15, 2026
One-line Summary: Misc tag before CESM3 release
Github PR URL: https://github.com/ESCOMP/CAM/pull/1530

Purpose of changes (include the issue number and title text for each relevant GitHub issue):
- Fixes for snapshot output in GNU debug: https://github.com/ESCOMP/CAM/pull/1503
- Point to correct locations for datm, satm, and xatm: https://github.com/ESCOMP/CAM/pull/1492
- nvhpc test fails since update to match alphaa08l externals: https://github.com/ESCOMP/CAM/issues/1513
- Wrong function used in SE dycore "prim_printstate": https://github.com/ESCOMP/CAM/issues/1491

Describe any changes made to build system: N/A

Describe any changes made to the namelist: N/A

List any changes to the defaults for the boundary datasets: N/A

Describe any substantial timing or memory changes: N/A

Code reviewed by: jimmielin, cacraigucar

List all files eliminated: N/A

List all files added and what they do: N/A

List all existing files that have been modified, and describe the changes:
M .config_files.xml
- mods for datm, satm and xatm locations

M .gitmodules
M ccs_config
- update ccs_config tag to get fix for GPU test

M cime_config/testdefs/testlist_cam.xml
- increase time for WACCM test which ran past its time limit

M src/control/cam_snapshot_common.F90
M src/physics/cam/physpkg.F90
M src/physics/cam7/physpkg.F90
- fixes for snapshot output

M src/dynamics/se/dycore/prim_state_mod.F90
- "MINVAL" needed to be "MAXVAL" for a calculation


If there were any failures reported from running test_driver.sh on any test
platform, and checkin with these failures has been OK'd by the gatekeeper,
then copy the lines from the td.*.status files for the failed tests to the
appropriate machine below. All failed tests must be justified.

derecho/intel/aux_cam: all BFB

derecho/nvhpc/aux_cam:
ERS_Ln9.ne30pg3_ne30pg3_mt232.FHISTC_LTso.derecho_nvhpc.cam-outfrq9s_gpu_default (Overall: DIFF) details:
- Baseline difference expected per jimmielin

izumi/nag/aux_cam:
ERC_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_nag.cam-outfrq3s_subcol (Overall: FAIL) details:
FAIL ERC_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_nag.cam-outfrq3s_subcol COMPARE_base_rest
- pre-existing failure -- see https://github.com/ESCOMP/CAM/issues/1514

izumi/gnu/aux_cam: all BFB

===============================================================
===============================================================

Tag name: cam6_4_163
Expand Down
9 changes: 8 additions & 1 deletion src/control/cam_snapshot_common.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,14 @@ subroutine cam_pbuf_snapshot_all_outfld(lchnk, file_num, pbuf)

! Retrieve the pbuf data. Special handling for certain
! integer-type fields.
if( trim(pbuf_snapshot(i)%ddt_string) == 'clubbtop') then
! This will allow data written out to not be mangled,
! and also allow writing out snapshots with debug on in GNU compiler.
if( trim(pbuf_snapshot(i)%ddt_string) == 'clubbtop' .or. &
trim(pbuf_snapshot(i)%ddt_string) == 'ZM_JT' .or. &
trim(pbuf_snapshot(i)%ddt_string) == 'ZM_MAXG' .or. &
trim(pbuf_snapshot(i)%ddt_string) == 'ZM_IDEEP' .or. &
trim(pbuf_snapshot(i)%ddt_string) == 'NMXRGN' .or. &
trim(pbuf_snapshot(i)%ddt_string) == 'ACNUNM') then
call pbuf_get_field(pbuf, pbuf_idx, tmpptr2d_int)
! copy into real
allocate(tmpptr2d(size(tmpptr2d_int, 1), size(tmpptr2d_int, 2)))
Expand Down
2 changes: 1 addition & 1 deletion src/dynamics/se/dycore/prim_state_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ subroutine prim_printstate(elem, tl,hybrid,nets,nete, fvm, omega_cn)
min_local(ie,6) = MINVAL(SUM(fvm(ie)%dp_fvm(1:nc,1:nc,:),DIM=3))+hyai(1)*ps0
max_local(ie,6) = MAXVAL(SUM(fvm(ie)%dp_fvm(1:nc,1:nc,:),DIM=3))+hyai(1)*ps0
min_local(ie,7) = MINVAL(moist_ps_fvm(:,:,ie))
max_local(ie,7) = MINVAL(moist_ps_fvm(:,:,ie))
max_local(ie,7) = MAXVAL(moist_ps_fvm(:,:,ie))
min_local(ie,8) = MINVAL(elem(ie)%state%psdry(:,:))
max_local(ie,8) = MAXVAL(elem(ie)%state%psdry(:,:))
min_local(ie,9) = MINVAL(moist_ps(:,:,ie))
Expand Down
23 changes: 19 additions & 4 deletions src/physics/cam/physpkg.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1536,6 +1536,12 @@ subroutine tphysac (ztodt, cam_in, &
ifld = pbuf_get_index('AST')
call pbuf_get_field(pbuf, ifld, ast, start=(/1,1,itim_old/), kount=(/pcols,pver,1/) )

! zero out local variables that may be written to snapshot for safety.
fh2o(:) = 0._r8 ! used in chem_timestep_tend.
surfric(:) = 0._r8 ! out from vertical_diffusion_tend.
obklen(:) = 0._r8 ! out from vertical_diffusion_tend.
flx_heat(:) = 0._r8 ! first out from gw_drag_cam.

!
! accumulate fluxes into net flux array for spectral dycores
! jrm Include latent heat of fusion for snow
Expand Down Expand Up @@ -2376,6 +2382,19 @@ subroutine tphysbc (ztodt, state, &

call t_stopf('bc_init')

! Zero-initialize subroutine-level variables for snapshot
cmfmc(:,:) = 0._r8
cmfcme(:,:) = 0._r8
zdu(:,:) = 0._r8
rliq(:) = 0._r8
rice(:) = 0._r8
dlf(:,:) = 0._r8
dlf2(:,:) = 0._r8
rliq2(:) = 0._r8
det_s(:) = 0._r8
det_ice(:) = 0._r8
net_flx(:) = 0._r8

!===================================================
! Global mean total energy fixer
!===================================================
Expand Down Expand Up @@ -2533,10 +2552,6 @@ subroutine tphysbc (ztodt, state, &
dlf(:,:) = 0._r8
end if

! Zero-initialize subroutine-level variables for snapshot
dlf2(:,:) = 0._r8
rliq2(:) = 0._r8

if (trim(cam_take_snapshot_before) == "convect_shallow_tend") then
call cam_snapshot_all_outfld_tphysbc(cam_snapshot_before_num, state, tend, cam_in, cam_out, pbuf, &
flx_heat, cmfmc, cmfcme, zdu, rliq, rice, dlf, dlf2, rliq2, det_s, det_ice, net_flx)
Expand Down
20 changes: 20 additions & 0 deletions src/physics/cam7/physpkg.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1641,6 +1641,15 @@ subroutine tphysac (ztodt, cam_in, &
call pbuf_get_field(pbuf, rliqbc_idx, rliqbc)
rliq(:ncol) = rliqbc(:ncol)

! zero out local variables that may be written to snapshot for safety.
fh2o(:) = 0._r8 ! used in chem_timestep_tend.
surfric(:) = 0._r8 ! out from vertical_diffusion_tend.
obklen(:) = 0._r8 ! out from vertical_diffusion_tend.
flx_heat(:) = 0._r8 ! first out from gw_drag_cam.
det_s(:) = 0._r8 ! out from clubb_tend_cam.
det_ice(:) = 0._r8 ! out from clubb_tend_cam.
net_flx(:) = 0._r8 ! out from radiation_tend.

!
! accumulate fluxes into net flux array for spectral dycores
! jrm Include latent heat of fusion for snow
Expand Down Expand Up @@ -2832,6 +2841,17 @@ subroutine tphysbc (ztodt, state, &

call t_stopf('bc_init')

! Zero-initialize subroutine-level variables for snapshot
cmfmc(:,:) = 0._r8
cmfcme(:,:) = 0._r8
zdu(:,:) = 0._r8
rliq(:) = 0._r8
rice(:) = 0._r8
dlf(:,:) = 0._r8
dlf2(:,:) = 0._r8
rliq2(:) = 0._r8
net_flx(:) = 0._r8

!===================================================
! Global mean total energy fixer
!===================================================
Expand Down
Loading