Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions bld/namelist_files/namelist_definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2339,7 +2339,7 @@ COSP will not run unless this is set to .true. in the namelist!
Turn on the desired simulators using lXXX_sim namelist vars
If no specific simulators are specified, all of the simulators
are run on all columns and all output is saved. (useful for testing).
COSP is available with CAM4, CAM5 and CAM6 physics.
COSP is available with CAM4, CAM5, CAM6 and CAM7 physics.
This default logical is set in cospsimulator_intr.F90.
Default: FALSE
</entry>
Expand Down Expand Up @@ -2576,7 +2576,7 @@ Default: .true., except for carma=cirrus and carma=carma_dust
group="micro_mg_nl" valid_values="" >
Version number for MG microphysics. This value is set automatically based
on settings in configure and passed to build-namelist
Default: 1 for CAM5 and 2 for CAM6
Default: 1 for CAM5, 2 for CAM6 and 3 for CAM7
</entry>

<entry id="micro_mg_sub_version" type="integer" category="microphys"
Expand Down Expand Up @@ -2949,7 +2949,7 @@ Default: 0.05
<entry id="use_preexisting_ice" type="logical" category="microphys"
group="nucleate_ice_nl" valid_values="" >
Switch to turn on treatment of pre-existing ice in the ice nucleation code.
Default: .false., except .true. for CAM6
Default: .false., except .true. for CAM6 and CAM7
</entry>

<entry id="hist_preexisting_ice" type="logical" category="microphys"
Expand Down Expand Up @@ -2980,7 +2980,7 @@ Default: set by build-namelist
Switch to determine whether ice nucleation happens using the incloud (true) or
the gridbox average (false) relative humidity. When true, it is assumed that
the incloud relative humidity for nucleation is 1.
Default: .true., except .false. for CAM6
Default: .true., except .false. for CAM6 and CAM7
</entry>

<entry id="nucleate_ice_strat" type="real" category="microphys"
Expand Down Expand Up @@ -3036,7 +3036,7 @@ Default: .true.
<entry id="cldfrc_ice" type="logical" category="cldfrc"
group="cldfrc_nl" valid_values="" >
Switch for ice cloud fraction calculation.
Default: .true. for CAM5 and CAM6, otherwise .false.
Default: .true. for CAM5, CAM6 and CAM7, otherwise .false.
</entry>

<entry id="cldfrc_rhminl" type="real" category="cldfrc"
Expand All @@ -3048,7 +3048,7 @@ Default: set by build-namelist
<entry id="cldfrc_rhminl_adj_land" type="real" category="conv"
group="cldfrc_nl" valid_values="" >
Adjustment to rhminl for land without snow cover.
Default: 0.0 for CAM6;
Default: 0.0 for CAM6 and CAM7;
all others =&gt; 0.10
</entry>

Expand Down Expand Up @@ -3091,7 +3091,7 @@ Default: set by build-namelist
<entry id="cldfrc_premib" type="real" category="conv"
group="cldfrc_nl" valid_values="" >
Bottom height (Pa) for mid-level liquid stratus fraction.
Default: 700.e2 for CAM5 and CAM6; all others=&gt; 750.e2
Default: 700.e2 for CAM5, CAM6 and CAM7; all others=&gt; 750.e2
</entry>

<entry id="cldfrc_iceopt" type="integer" category="conv"
Expand Down Expand Up @@ -3147,7 +3147,7 @@ Default: set by build-namelist
group="cldfrc2m_nl" valid_values="" >
Use cloud fraction to determine whether to do growth of ice clouds below
RHice of 1 down to RHice = rhmini.
Default: .true. for CAM6; all others =&gt; .false.
Default: .true. for CAM6 and CAM7; all others =&gt; .false.
</entry>

<entry id="cldfrc2m_do_avg_aist_algs" type="logical" category="conv"
Expand Down Expand Up @@ -3196,7 +3196,7 @@ Default: set by build-namelist
<entry id="zmconv_num_cin" type="integer" category="conv"
group="zmconv_nl" valid_values="" >
The number of negative buoyancy regions that are allowed before the convection top and CAPE calculations are completed.
Default: =&gt; 1 for CAM6;
Default: =&gt; 1 for CAM6 and CAM7;
=&gt; 5 for all other
</entry>

Expand Down Expand Up @@ -5132,7 +5132,7 @@ Default: TRUE
<!-- Physics control -->

<entry id="cam_physpkg" type="char*16" category="build"
group="phys_ctl_nl" valid_values="cam4,cam5,cam6,adiabatic,held_suarez,kessler,frierson" >
group="phys_ctl_nl" valid_values="cam4,cam5,cam6,cam7,adiabatic,held_suarez,kessler,frierson" >
Name of the CAM physics package. N.B. this variable may not be set by
the user. It is set by build-namelist via information in the configure
cache file to be consistent with how CAM was built.
Expand Down
58 changes: 58 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,64 @@

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

Tag name: cam6_4_139
Originator(s): cacraigucar, kuanchihwang, gold2718, jedwards4b
Date: Dec 24, 2025
One-line Summary: Misc tag leading into CESM3
Github PR URL: https://github.com/ESCOMP/CAM/pull/1464

Purpose of changes (include the issue number and title text for each relevant GitHub issue):
- Move pressure variables to dry diagnostics: https://github.com/ESCOMP/CAM/pull/1427
- Long lines in cam_diagnostics.F90: https://github.com/ESCOMP/CAM/issues/1448
- Large domains require a change in data type for se dynamics restarts: https://github.com/ESCOMP/CAM/issues/1459
- Update little obsolete/incorrect items: https://github.com/ESCOMP/CAM/issues/1177

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

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 bld/namelist_files/namelist_definition.xml
- Update comments to include CAM7

M src/dynamics/se/restart_dynamics.F90
- Change a variable to i8 which needed a larger type for large domains

M src/physics/cam/cam_diagnostics.F90
- move pressure variables to dry diagnostics
- break up long lines

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: (not run as nothing has changed with the file system)

izumi/nag/aux_cam: all BFB except:
ERC_D_Ln9.mpasa480_mpasa480_mt232.FHS94.izumi_nag.cam-outfrq9s (Overall: DIFF) details:
FAIL ERC_D_Ln9.mpasa480_mpasa480_mt232.FHS94.izumi_nag.cam-outfrq9s BASELINE /fs/cgd/csm/models/atm/cam/pretag_bl/cam6_4_138_nag: FIELDLIST field lists differ (otherwise bit-for-bit)
ERC_D_Ln9_P1x1.ne3pg3_ne3pg3_mt232.FADIAB.izumi_nag.cam-outfrq9s (Overall: DIFF) details:
FAIL ERC_D_Ln9_P1x1.ne3pg3_ne3pg3_mt232.FADIAB.izumi_nag.cam-outfrq9s BASELINE /fs/cgd/csm/models/atm/cam/pretag_bl/cam6_4_138_nag: FIELDLIST field lists differ (otherwise bit-for-bit)
- added pressure variables to output file

izumi/gnu/aux_cam: all BFB

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

Tag name: cam6_4_138
Originator(s): dmleung, fvitt, cacraigucar
Date: Dec 22, 2025
Expand Down
14 changes: 8 additions & 6 deletions src/dynamics/se/restart_dynamics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module restart_dynamics
! grid format may also be used for an initial run.

use shr_kind_mod, only: r8 => shr_kind_r8
use shr_kind_mod, only: i8 => shr_kind_i8
use spmd_utils, only: iam, masterproc

use constituents, only: cnst_name
Expand Down Expand Up @@ -284,9 +285,9 @@ subroutine write_restart_dynamics(File, dyn_out)
subroutine write_elem()

! local variables
integer :: i, ie, j, k
integer :: ierr
integer, pointer :: ldof(:)
integer :: i, ie, j, k
integer :: ierr
integer(i8), pointer :: ldof(:)

type(io_desc_t) :: iodesc2d, iodesc3d

Expand Down Expand Up @@ -707,7 +708,7 @@ subroutine read_elem()
integer :: ncol
integer :: i, ie, ii, j, k, m

integer, pointer :: ldof(:)
integer(i8), pointer :: ldof(:)

type(io_desc_t) :: iodesc2d, iodesc3d
real(r8), allocatable :: var3d(:), var2d(:)
Expand Down Expand Up @@ -999,13 +1000,14 @@ end subroutine read_restart_dynamics

function get_restart_decomp(elem, lev) result(ldof)


! Get the integer mapping of a variable in the dynamics decomp in memory.
! The canonical ordering is as on the file. A 0 value indicates that the
! variable is not on the file (eg halo or boundary values)

type(element_t), intent(in) :: elem(:)
integer, intent(in) :: lev
integer, pointer :: ldof(:)
integer(i8), pointer :: ldof(:)

integer :: i, j, k, ie
!----------------------------------------------------------------------------
Expand All @@ -1030,7 +1032,7 @@ function get_restart_decomp_fvm(elem, lev) result(ldof)

type(element_t), intent(in) :: elem(:)
integer, intent(in) :: lev
integer, pointer :: ldof(:)
integer(i8), pointer :: ldof(:)

integer :: i, j, k, ie
!----------------------------------------------------------------------------
Expand Down
72 changes: 44 additions & 28 deletions src/physics/cam/cam_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,12 @@ subroutine diag_init_dry(pbuf2d)
call register_vector_field('UTEND_TOT','VTEND_TOT')

! Debugging negative water output fields
call addfld ('INEGCLPTEND ', (/ 'lev' /), 'A', 'kg/kg/s', 'Cloud ice tendency due to clipping neg values after microp', sampled_on_subcycle=.true.)
call addfld ('LNEGCLPTEND ', (/ 'lev' /), 'A', 'kg/kg/s', 'Cloud liq tendency due to clipping neg values after microp', sampled_on_subcycle=.true.)
call addfld ('VNEGCLPTEND ', (/ 'lev' /), 'A', 'kg/kg/s', 'Vapor tendency due to clipping neg values after microp', sampled_on_subcycle=.true.)
call addfld ('INEGCLPTEND ', (/ 'lev' /), 'A', 'kg/kg/s', &
'Cloud ice tendency due to clipping neg values after microp', sampled_on_subcycle=.true.)
call addfld ('LNEGCLPTEND ', (/ 'lev' /), 'A', 'kg/kg/s', &
'Cloud liq tendency due to clipping neg values after microp', sampled_on_subcycle=.true.)
call addfld ('VNEGCLPTEND ', (/ 'lev' /), 'A', 'kg/kg/s', &
'Vapor tendency due to clipping neg values after microp', sampled_on_subcycle=.true.)

call addfld ('Z3', (/ 'lev' /), 'A', 'm', 'Geopotential Height (above sea level)')
call addfld ('Z1000', horiz_only, 'A', 'm', 'Geopotential Z at 1000 mbar pressure surface')
Expand Down Expand Up @@ -263,7 +266,10 @@ subroutine diag_init_dry(pbuf2d)
call addfld ('OMEGA850', horiz_only, 'A', 'Pa/s', 'Vertical velocity at 850 mbar pressure surface')
call addfld ('OMEGA500', horiz_only, 'A', 'Pa/s', 'Vertical velocity at 500 mbar pressure surface')

call addfld ('PSL', horiz_only, 'A', 'Pa','Sea level pressure')
call addfld ('PSL', horiz_only, 'A', 'Pa', 'Sea level pressure')
call addfld ('PMID', (/ 'lev' /), 'A', 'Pa', 'Pressure at layer midpoints')
call addfld ('PINT', (/ 'ilev' /), 'A', 'Pa', 'Pressure at layer interfaces')
call addfld ('PDEL', (/ 'lev' /), 'A', 'Pa', 'Pressure difference between levels')

call addfld ('T1000', horiz_only, 'A', 'K','Temperature at 1000 mbar pressure surface')
call addfld ('T925', horiz_only, 'A', 'K','Temperature at 925 mbar pressure surface')
Expand Down Expand Up @@ -325,6 +331,16 @@ subroutine diag_init_dry(pbuf2d)
call add_default ('PSL ', 1, ' ')
end if

if (dycore_is('SE')) then
call add_default ('PMID', 1, ' ')
end if

if (dycore_is('MPAS')) then
call add_default ('PMID', 1, ' ')
call add_default ('PINT', 1, ' ')
call add_default ('PDEL', 1, ' ')
end if

if (history_vdiag) then
call add_default ('U200', 2, ' ')
call add_default ('V200', 2, ' ')
Expand Down Expand Up @@ -402,16 +418,26 @@ subroutine diag_init_dry(pbuf2d)

! Create budgets that are a sum/dif of 2 stages

call cam_budget_em_register('dEdt_param_efix_physE','phAP','phBF','phy','dif',longname='dE/dt CAM physics + energy fixer using physics E formula (phAP-phBF)')
call cam_budget_em_register('dEdt_param_efix_dynE' ,'dyAP','dyBF','phy','dif',longname='dE/dt CAM physics + energy fixer using dycore E formula (dyAP-dyBF)')
call cam_budget_em_register('dEdt_param_physE' ,'phAP','phBP','phy','dif',longname='dE/dt CAM physics using physics E formula (phAP-phBP)')
call cam_budget_em_register('dEdt_param_dynE' ,'dyAP','dyBP','phy','dif',longname='dE/dt CAM physics using dycore E (dyAP-dyBP)')
call cam_budget_em_register('dEdt_dme_adjust_physE','phAM','phAP','phy','dif',longname='dE/dt dry mass adjustment using physics E formula (phAM-phAP)')
call cam_budget_em_register('dEdt_dme_adjust_dynE' ,'dyAM','dyAP','phy','dif',longname='dE/dt dry mass adjustment using dycore E (dyAM-dyAP)')
call cam_budget_em_register('dEdt_efix_physE' ,'phBP','phBF','phy','dif',longname='dE/dt energy fixer using physics E formula (phBP-phBF)')
call cam_budget_em_register('dEdt_efix_dynE' ,'dyBP','dyBF','phy','dif',longname='dE/dt energy fixer using dycore E formula (dyBP-dyBF)')
call cam_budget_em_register('dEdt_phys_tot_physE' ,'phAM','phBF','phy','dif',longname='dE/dt physics total using physics E formula (phAM-phBF)')
call cam_budget_em_register('dEdt_phys_tot_dynE' ,'dyAM','dyBF','phy','dif',longname='dE/dt physics total using dycore E (dyAM-dyBF)')
call cam_budget_em_register('dEdt_param_efix_physE','phAP','phBF','phy','dif',&
longname='dE/dt CAM physics + energy fixer using physics E formula (phAP-phBF)')
call cam_budget_em_register('dEdt_param_efix_dynE' ,'dyAP','dyBF','phy','dif',&
longname='dE/dt CAM physics + energy fixer using dycore E formula (dyAP-dyBF)')
call cam_budget_em_register('dEdt_param_physE' ,'phAP','phBP','phy','dif',&
longname='dE/dt CAM physics using physics E formula (phAP-phBP)')
call cam_budget_em_register('dEdt_param_dynE' ,'dyAP','dyBP','phy','dif',&
longname='dE/dt CAM physics using dycore E (dyAP-dyBP)')
call cam_budget_em_register('dEdt_dme_adjust_physE','phAM','phAP','phy','dif',&
longname='dE/dt dry mass adjustment using physics E formula (phAM-phAP)')
call cam_budget_em_register('dEdt_dme_adjust_dynE' ,'dyAM','dyAP','phy','dif',&
longname='dE/dt dry mass adjustment using dycore E (dyAM-dyAP)')
call cam_budget_em_register('dEdt_efix_physE' ,'phBP','phBF','phy','dif',&
longname='dE/dt energy fixer using physics E formula (phBP-phBF)')
call cam_budget_em_register('dEdt_efix_dynE' ,'dyBP','dyBF','phy','dif',&
longname='dE/dt energy fixer using dycore E formula (dyBP-dyBF)')
call cam_budget_em_register('dEdt_phys_tot_physE' ,'phAM','phBF','phy','dif',&
longname='dE/dt physics total using physics E formula (phAM-phBF)')
call cam_budget_em_register('dEdt_phys_tot_dynE' ,'dyAM','dyBF','phy','dif',&
longname='dE/dt physics total using dycore E (dyAM-dyBF)')
endif
end subroutine diag_init_dry

Expand Down Expand Up @@ -461,10 +487,7 @@ subroutine diag_init_moist(pbuf2d)
call addfld ('QBOT', horiz_only, 'A', 'kg/kg','Lowest model level water vapor mixing ratio')

call addfld ('PSDRY', horiz_only, 'A', 'Pa', 'Dry surface pressure')
call addfld ('PMID', (/ 'lev' /), 'A', 'Pa', 'Pressure at layer midpoints')
call addfld ('PINT', (/ 'ilev' /), 'A', 'Pa', 'Pressure at layer interfaces')
call addfld ('PDELDRY', (/ 'lev' /), 'A', 'Pa', 'Dry pressure difference between levels')
call addfld ('PDEL', (/ 'lev' /), 'A', 'Pa', 'Pressure difference between levels')

! outfld calls in diag_conv

Expand Down Expand Up @@ -603,13 +626,6 @@ subroutine diag_init_moist(pbuf2d)

if (dycore_is('SE')) then
call add_default ('PSDRY', 1, ' ')
call add_default ('PMID', 1, ' ')
end if

if (dycore_is('MPAS')) then
call add_default ('PINT', 1, ' ')
call add_default ('PMID', 1, ' ')
call add_default ('PDEL', 1, ' ')
end if

if (history_eddy) then
Expand Down Expand Up @@ -1067,6 +1083,10 @@ subroutine diag_phys_writeout_dry(state, pbuf, p_surf_t)
call cpslec(ncol, state%pmid, state%phis, state%ps, state%t, psl, gravit, rair)
call outfld('PSL', psl, pcols, lchnk)

call outfld('PMID', state%pmid, pcols, lchnk)
call outfld('PINT', state%pint, pcols, lchnk)
call outfld('PDEL', state%pdel, pcols, lchnk)

! Output T,u,v fields on pressure surfaces
!
if (hist_fld_active('T850')) then
Expand Down Expand Up @@ -1282,11 +1302,7 @@ subroutine diag_phys_writeout_moist(state, pbuf, p_surf_t)
call constituent_burden_comp(state)

call outfld('PSDRY', state%psdry, pcols, lchnk)
call outfld('PMID', state%pmid, pcols, lchnk)
call outfld('PINT', state%pint, pcols, lchnk)
call outfld('PDELDRY', state%pdeldry, pcols, lchnk)
call outfld('PDEL', state%pdel, pcols, lchnk)


ftem(:ncol,:) = state%u(:ncol,:)*state%q(:ncol,:,ixq)
call outfld ('UQ ',ftem ,pcols ,lchnk )
Expand Down