Skip to content

Commit d9fcdbb

Browse files
authored
Merge pull request #1464 from cacraigucar/cam_misc_tag3
cam6_4_139: Misc tag leading into CESM3
2 parents cae37a9 + 8cd5263 commit d9fcdbb

File tree

4 files changed

+120
-44
lines changed

4 files changed

+120
-44
lines changed

bld/namelist_files/namelist_definition.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2339,7 +2339,7 @@ COSP will not run unless this is set to .true. in the namelist!
23392339
Turn on the desired simulators using lXXX_sim namelist vars
23402340
If no specific simulators are specified, all of the simulators
23412341
are run on all columns and all output is saved. (useful for testing).
2342-
COSP is available with CAM4, CAM5 and CAM6 physics.
2342+
COSP is available with CAM4, CAM5, CAM6 and CAM7 physics.
23432343
This default logical is set in cospsimulator_intr.F90.
23442344
Default: FALSE
23452345
</entry>
@@ -2576,7 +2576,7 @@ Default: .true., except for carma=cirrus and carma=carma_dust
25762576
group="micro_mg_nl" valid_values="" >
25772577
Version number for MG microphysics. This value is set automatically based
25782578
on settings in configure and passed to build-namelist
2579-
Default: 1 for CAM5 and 2 for CAM6
2579+
Default: 1 for CAM5, 2 for CAM6 and 3 for CAM7
25802580
</entry>
25812581

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

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

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

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

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

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

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

@@ -5132,7 +5132,7 @@ Default: TRUE
51325132
<!-- Physics control -->
51335133

51345134
<entry id="cam_physpkg" type="char*16" category="build"
5135-
group="phys_ctl_nl" valid_values="cam4,cam5,cam6,adiabatic,held_suarez,kessler,frierson" >
5135+
group="phys_ctl_nl" valid_values="cam4,cam5,cam6,cam7,adiabatic,held_suarez,kessler,frierson" >
51365136
Name of the CAM physics package. N.B. this variable may not be set by
51375137
the user. It is set by build-namelist via information in the configure
51385138
cache file to be consistent with how CAM was built.

doc/ChangeLog

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,64 @@
11

22
===============================================================
33

4+
Tag name: cam6_4_139
5+
Originator(s): cacraigucar, kuanchihwang, gold2718, jedwards4b
6+
Date: Dec 24, 2025
7+
One-line Summary: Misc tag leading into CESM3
8+
Github PR URL: https://github.com/ESCOMP/CAM/pull/1464
9+
10+
Purpose of changes (include the issue number and title text for each relevant GitHub issue):
11+
- Move pressure variables to dry diagnostics: https://github.com/ESCOMP/CAM/pull/1427
12+
- Long lines in cam_diagnostics.F90: https://github.com/ESCOMP/CAM/issues/1448
13+
- Large domains require a change in data type for se dynamics restarts: https://github.com/ESCOMP/CAM/issues/1459
14+
- Update little obsolete/incorrect items: https://github.com/ESCOMP/CAM/issues/1177
15+
16+
Describe any changes made to build system: N/A
17+
18+
Describe any changes made to the namelist: N/A
19+
20+
List any changes to the defaults for the boundary datasets: N/A
21+
22+
Describe any substantial timing or memory changes: N/A
23+
24+
Code reviewed by: jimmielin
25+
26+
List all files eliminated: N/A
27+
28+
List all files added and what they do: N/A
29+
30+
List all existing files that have been modified, and describe the changes:
31+
M bld/namelist_files/namelist_definition.xml
32+
- Update comments to include CAM7
33+
34+
M src/dynamics/se/restart_dynamics.F90
35+
- Change a variable to i8 which needed a larger type for large domains
36+
37+
M src/physics/cam/cam_diagnostics.F90
38+
- move pressure variables to dry diagnostics
39+
- break up long lines
40+
41+
If there were any failures reported from running test_driver.sh on any test
42+
platform, and checkin with these failures has been OK'd by the gatekeeper,
43+
then copy the lines from the td.*.status files for the failed tests to the
44+
appropriate machine below. All failed tests must be justified.
45+
46+
derecho/intel/aux_cam: all BFB
47+
48+
derecho/nvhpc/aux_cam: (not run as nothing has changed with the file system)
49+
50+
izumi/nag/aux_cam: all BFB except:
51+
ERC_D_Ln9.mpasa480_mpasa480_mt232.FHS94.izumi_nag.cam-outfrq9s (Overall: DIFF) details:
52+
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)
53+
ERC_D_Ln9_P1x1.ne3pg3_ne3pg3_mt232.FADIAB.izumi_nag.cam-outfrq9s (Overall: DIFF) details:
54+
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)
55+
- added pressure variables to output file
56+
57+
izumi/gnu/aux_cam: all BFB
58+
59+
===============================================================
60+
===============================================================
61+
462
Tag name: cam6_4_138
563
Originator(s): dmleung, fvitt, cacraigucar
664
Date: Dec 22, 2025

src/dynamics/se/restart_dynamics.F90

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module restart_dynamics
1212
! grid format may also be used for an initial run.
1313

1414
use shr_kind_mod, only: r8 => shr_kind_r8
15+
use shr_kind_mod, only: i8 => shr_kind_i8
1516
use spmd_utils, only: iam, masterproc
1617

1718
use constituents, only: cnst_name
@@ -284,9 +285,9 @@ subroutine write_restart_dynamics(File, dyn_out)
284285
subroutine write_elem()
285286

286287
! local variables
287-
integer :: i, ie, j, k
288-
integer :: ierr
289-
integer, pointer :: ldof(:)
288+
integer :: i, ie, j, k
289+
integer :: ierr
290+
integer(i8), pointer :: ldof(:)
290291

291292
type(io_desc_t) :: iodesc2d, iodesc3d
292293

@@ -707,7 +708,7 @@ subroutine read_elem()
707708
integer :: ncol
708709
integer :: i, ie, ii, j, k, m
709710

710-
integer, pointer :: ldof(:)
711+
integer(i8), pointer :: ldof(:)
711712

712713
type(io_desc_t) :: iodesc2d, iodesc3d
713714
real(r8), allocatable :: var3d(:), var2d(:)
@@ -999,13 +1000,14 @@ end subroutine read_restart_dynamics
9991000

10001001
function get_restart_decomp(elem, lev) result(ldof)
10011002

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

10061008
type(element_t), intent(in) :: elem(:)
10071009
integer, intent(in) :: lev
1008-
integer, pointer :: ldof(:)
1010+
integer(i8), pointer :: ldof(:)
10091011

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

10311033
type(element_t), intent(in) :: elem(:)
10321034
integer, intent(in) :: lev
1033-
integer, pointer :: ldof(:)
1035+
integer(i8), pointer :: ldof(:)
10341036

10351037
integer :: i, j, k, ie
10361038
!----------------------------------------------------------------------------

src/physics/cam/cam_diagnostics.F90

Lines changed: 44 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,12 @@ subroutine diag_init_dry(pbuf2d)
230230
call register_vector_field('UTEND_TOT','VTEND_TOT')
231231

232232
! Debugging negative water output fields
233-
call addfld ('INEGCLPTEND ', (/ 'lev' /), 'A', 'kg/kg/s', 'Cloud ice tendency due to clipping neg values after microp', sampled_on_subcycle=.true.)
234-
call addfld ('LNEGCLPTEND ', (/ 'lev' /), 'A', 'kg/kg/s', 'Cloud liq tendency due to clipping neg values after microp', sampled_on_subcycle=.true.)
235-
call addfld ('VNEGCLPTEND ', (/ 'lev' /), 'A', 'kg/kg/s', 'Vapor tendency due to clipping neg values after microp', sampled_on_subcycle=.true.)
233+
call addfld ('INEGCLPTEND ', (/ 'lev' /), 'A', 'kg/kg/s', &
234+
'Cloud ice tendency due to clipping neg values after microp', sampled_on_subcycle=.true.)
235+
call addfld ('LNEGCLPTEND ', (/ 'lev' /), 'A', 'kg/kg/s', &
236+
'Cloud liq tendency due to clipping neg values after microp', sampled_on_subcycle=.true.)
237+
call addfld ('VNEGCLPTEND ', (/ 'lev' /), 'A', 'kg/kg/s', &
238+
'Vapor tendency due to clipping neg values after microp', sampled_on_subcycle=.true.)
236239

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

266-
call addfld ('PSL', horiz_only, 'A', 'Pa','Sea level pressure')
269+
call addfld ('PSL', horiz_only, 'A', 'Pa', 'Sea level pressure')
270+
call addfld ('PMID', (/ 'lev' /), 'A', 'Pa', 'Pressure at layer midpoints')
271+
call addfld ('PINT', (/ 'ilev' /), 'A', 'Pa', 'Pressure at layer interfaces')
272+
call addfld ('PDEL', (/ 'lev' /), 'A', 'Pa', 'Pressure difference between levels')
267273

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

334+
if (dycore_is('SE')) then
335+
call add_default ('PMID', 1, ' ')
336+
end if
337+
338+
if (dycore_is('MPAS')) then
339+
call add_default ('PMID', 1, ' ')
340+
call add_default ('PINT', 1, ' ')
341+
call add_default ('PDEL', 1, ' ')
342+
end if
343+
328344
if (history_vdiag) then
329345
call add_default ('U200', 2, ' ')
330346
call add_default ('V200', 2, ' ')
@@ -402,16 +418,26 @@ subroutine diag_init_dry(pbuf2d)
402418

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

405-
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)')
406-
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)')
407-
call cam_budget_em_register('dEdt_param_physE' ,'phAP','phBP','phy','dif',longname='dE/dt CAM physics using physics E formula (phAP-phBP)')
408-
call cam_budget_em_register('dEdt_param_dynE' ,'dyAP','dyBP','phy','dif',longname='dE/dt CAM physics using dycore E (dyAP-dyBP)')
409-
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)')
410-
call cam_budget_em_register('dEdt_dme_adjust_dynE' ,'dyAM','dyAP','phy','dif',longname='dE/dt dry mass adjustment using dycore E (dyAM-dyAP)')
411-
call cam_budget_em_register('dEdt_efix_physE' ,'phBP','phBF','phy','dif',longname='dE/dt energy fixer using physics E formula (phBP-phBF)')
412-
call cam_budget_em_register('dEdt_efix_dynE' ,'dyBP','dyBF','phy','dif',longname='dE/dt energy fixer using dycore E formula (dyBP-dyBF)')
413-
call cam_budget_em_register('dEdt_phys_tot_physE' ,'phAM','phBF','phy','dif',longname='dE/dt physics total using physics E formula (phAM-phBF)')
414-
call cam_budget_em_register('dEdt_phys_tot_dynE' ,'dyAM','dyBF','phy','dif',longname='dE/dt physics total using dycore E (dyAM-dyBF)')
421+
call cam_budget_em_register('dEdt_param_efix_physE','phAP','phBF','phy','dif',&
422+
longname='dE/dt CAM physics + energy fixer using physics E formula (phAP-phBF)')
423+
call cam_budget_em_register('dEdt_param_efix_dynE' ,'dyAP','dyBF','phy','dif',&
424+
longname='dE/dt CAM physics + energy fixer using dycore E formula (dyAP-dyBF)')
425+
call cam_budget_em_register('dEdt_param_physE' ,'phAP','phBP','phy','dif',&
426+
longname='dE/dt CAM physics using physics E formula (phAP-phBP)')
427+
call cam_budget_em_register('dEdt_param_dynE' ,'dyAP','dyBP','phy','dif',&
428+
longname='dE/dt CAM physics using dycore E (dyAP-dyBP)')
429+
call cam_budget_em_register('dEdt_dme_adjust_physE','phAM','phAP','phy','dif',&
430+
longname='dE/dt dry mass adjustment using physics E formula (phAM-phAP)')
431+
call cam_budget_em_register('dEdt_dme_adjust_dynE' ,'dyAM','dyAP','phy','dif',&
432+
longname='dE/dt dry mass adjustment using dycore E (dyAM-dyAP)')
433+
call cam_budget_em_register('dEdt_efix_physE' ,'phBP','phBF','phy','dif',&
434+
longname='dE/dt energy fixer using physics E formula (phBP-phBF)')
435+
call cam_budget_em_register('dEdt_efix_dynE' ,'dyBP','dyBF','phy','dif',&
436+
longname='dE/dt energy fixer using dycore E formula (dyBP-dyBF)')
437+
call cam_budget_em_register('dEdt_phys_tot_physE' ,'phAM','phBF','phy','dif',&
438+
longname='dE/dt physics total using physics E formula (phAM-phBF)')
439+
call cam_budget_em_register('dEdt_phys_tot_dynE' ,'dyAM','dyBF','phy','dif',&
440+
longname='dE/dt physics total using dycore E (dyAM-dyBF)')
415441
endif
416442
end subroutine diag_init_dry
417443

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

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

469492
! outfld calls in diag_conv
470493

@@ -603,13 +626,6 @@ subroutine diag_init_moist(pbuf2d)
603626

604627
if (dycore_is('SE')) then
605628
call add_default ('PSDRY', 1, ' ')
606-
call add_default ('PMID', 1, ' ')
607-
end if
608-
609-
if (dycore_is('MPAS')) then
610-
call add_default ('PINT', 1, ' ')
611-
call add_default ('PMID', 1, ' ')
612-
call add_default ('PDEL', 1, ' ')
613629
end if
614630

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

1086+
call outfld('PMID', state%pmid, pcols, lchnk)
1087+
call outfld('PINT', state%pint, pcols, lchnk)
1088+
call outfld('PDEL', state%pdel, pcols, lchnk)
1089+
10701090
! Output T,u,v fields on pressure surfaces
10711091
!
10721092
if (hist_fld_active('T850')) then
@@ -1282,11 +1302,7 @@ subroutine diag_phys_writeout_moist(state, pbuf, p_surf_t)
12821302
call constituent_burden_comp(state)
12831303

12841304
call outfld('PSDRY', state%psdry, pcols, lchnk)
1285-
call outfld('PMID', state%pmid, pcols, lchnk)
1286-
call outfld('PINT', state%pint, pcols, lchnk)
12871305
call outfld('PDELDRY', state%pdeldry, pcols, lchnk)
1288-
call outfld('PDEL', state%pdel, pcols, lchnk)
1289-
12901306

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

0 commit comments

Comments
 (0)