Skip to content

Commit a1dcf88

Browse files
authored
Merge pull request #1522 from jimmielin/hplin/cldfrc2m
cam6_4_183: Complete CCPPization of cloud fraction for two-moment microphys (cldfrc2m)
2 parents 65d4bcf + edda54c commit a1dcf88

13 files changed

Lines changed: 509 additions & 1285 deletions

File tree

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
[submodule "atmos_phys"]
3030
path = src/atmos_phys
3131
url = https://github.com/ESCOMP/atmospheric_physics
32-
fxtag = atmos_phys0_22_003
32+
fxtag = atmos_phys0_23_000
3333
fxrequired = AlwaysRequired
3434
fxDONOTUSEurl = https://github.com/ESCOMP/atmospheric_physics
3535

bld/namelist_files/namelist_definition.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3268,7 +3268,7 @@ Default: 700.e2 for CAM5, CAM6 and CAM7; all others=> 750.e2
32683268
<entry id="cldfrc_iceopt" type="integer" category="conv"
32693269
group="cldfrc_nl" valid_values="" >
32703270
Scheme for ice cloud fraction: 1=wang &amp; sassen, 2=schiller (iciwc),
3271-
3=wood &amp; field, 4=Wilson (based on smith), 5=modified slingo (ssat &amp; empyt cloud)
3271+
3=wood &amp; field, 4=Wilson (based on smith), 5=modified slingo (ssat &amp; empty cloud)
32723272
Default: set by build-namelist
32733273
</entry>
32743274

@@ -3304,7 +3304,7 @@ Default: set by build-namelist
33043304

33053305
<entry id="cldfrc2m_qist_min" type="real" category="conv"
33063306
group="cldfrc2m_nl" valid_values="" >
3307-
Minimum in-stratus IWC constraint [ kg/kg ]
3307+
Minimum in-stratus IWC constraint greater than 0 [ kg/kg ]
33083308
Default: set by build-namelist
33093309
</entry>
33103310

cime_config/testdefs/testlist_cam.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,14 +334,14 @@
334334
</options>
335335
</test>
336336

337-
<test compset="FCARMA2000climo" grid="f19_f19_mg17" name="SMS_D_Ln9" testmods="cam/outfrq9s" supported="false">
337+
<test compset="FCARMA2000climo" grid="f19_f19_mg17" name="SMS_D_Ln9" testmods="cam/outfrq9s_carma_rad_diag" supported="false">
338338
<machines>
339339
<machine name="derecho" compiler="intel" category="aux_cam"/>
340340
<machine name="derecho" compiler="intel" category="carma"/>
341341
</machines>
342342
<options>
343343
<option name="wallclock">00:40:00</option>
344-
<option name="comment">CARMA trop_strat model test</option>
344+
<option name="comment">CARMA trop_strat, rad_diag w/ sectional CARMA bins</option>
345345
</options>
346346
</test>
347347
<test compset="FWmaCARMAHIST" grid="f19_f19_mg17" name="SMS_D_Ln9" testmods="cam/outfrq9s" supported="false">
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
./xmlchange ROF_NCPL=\$ATM_NCPL
2+
./xmlchange GLC_NCPL=\$ATM_NCPL
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
mfilt=1,1,1,1,1,1
2+
ndens=1,1,1,1,1,1
3+
nhtfrq=9,9,9,9,9,9
4+
write_nstep0=.true.
5+
inithist='ENDOFRUN'
6+
7+
rad_diag_1 = 'A:Q:H2O', 'N:O2:O2', 'A:CO2:CO2', 'A:O3:O3', 'A:N2O:N2O', 'A:CH4:CH4',
8+
'N:CFC11:CFC11', 'N:CFC12:CFC12'
9+
10+
rad_diag_2 = 'A:Q:H2O', 'N:O2:O2', 'A:CO2:CO2', 'A:O3:O3', 'A:N2O:N2O', 'A:CH4:CH4',
11+
'N:CFC11:CFC11', 'N:CFC12:CFC12',
12+
'B:MXAER01:$DIN_LOC_ROOT/atm/cam/chem/carma/rrtmg/aerosol_cld_CRMIX01_rrtmg.nc',
13+
'B:MXAER02:$DIN_LOC_ROOT/atm/cam/chem/carma/rrtmg/aerosol_cld_CRMIX02_rrtmg.nc',
14+
'B:MXAER03:$DIN_LOC_ROOT/atm/cam/chem/carma/rrtmg/aerosol_cld_CRMIX03_rrtmg.nc',
15+
'B:MXAER04:$DIN_LOC_ROOT/atm/cam/chem/carma/rrtmg/aerosol_cld_CRMIX04_rrtmg.nc',
16+
'B:MXAER05:$DIN_LOC_ROOT/atm/cam/chem/carma/rrtmg/aerosol_cld_CRMIX05_rrtmg.nc',
17+
'B:MXAER06:$DIN_LOC_ROOT/atm/cam/chem/carma/rrtmg/aerosol_cld_CRMIX06_rrtmg.nc',
18+
'B:MXAER07:$DIN_LOC_ROOT/atm/cam/chem/carma/rrtmg/aerosol_cld_CRMIX07_rrtmg.nc',
19+
'B:MXAER08:$DIN_LOC_ROOT/atm/cam/chem/carma/rrtmg/aerosol_cld_CRMIX08_rrtmg.nc',
20+
'B:MXAER09:$DIN_LOC_ROOT/atm/cam/chem/carma/rrtmg/aerosol_cld_CRMIX09_rrtmg.nc',
21+
'B:MXAER10:$DIN_LOC_ROOT/atm/cam/chem/carma/rrtmg/aerosol_cld_CRMIX10_rrtmg.nc',
22+
'B:MXAER11:$DIN_LOC_ROOT/atm/cam/chem/carma/rrtmg/aerosol_cld_CRMIX11_rrtmg.nc',
23+
'B:MXAER12:$DIN_LOC_ROOT/atm/cam/chem/carma/rrtmg/aerosol_cld_CRMIX12_rrtmg.nc',
24+
'B:MXAER13:$DIN_LOC_ROOT/atm/cam/chem/carma/rrtmg/aerosol_cld_CRMIX13_rrtmg.nc',
25+
'B:MXAER14:$DIN_LOC_ROOT/atm/cam/chem/carma/rrtmg/aerosol_cld_CRMIX14_rrtmg.nc',
26+
'B:MXAER15:$DIN_LOC_ROOT/atm/cam/chem/carma/rrtmg/aerosol_cld_CRMIX15_rrtmg.nc',
27+
'B:MXAER16:$DIN_LOC_ROOT/atm/cam/chem/carma/rrtmg/aerosol_cld_CRMIX16_rrtmg.nc',
28+
'B:MXAER17:$DIN_LOC_ROOT/atm/cam/chem/carma/rrtmg/aerosol_cld_CRMIX17_rrtmg.nc',
29+
'B:MXAER18:$DIN_LOC_ROOT/atm/cam/chem/carma/rrtmg/aerosol_cld_CRMIX18_rrtmg.nc',
30+
'B:MXAER19:$DIN_LOC_ROOT/atm/cam/chem/carma/rrtmg/aerosol_cld_CRMIX19_rrtmg.nc',
31+
'B:MXAER20:$DIN_LOC_ROOT/atm/cam/chem/carma/rrtmg/aerosol_cld_CRMIX20_rrtmg.nc'
32+
33+
! rad_diag_3 uses the aerosol optics files generated by CARMA in the run
34+
! directory at initialization when carma_do_optics is enabled.
35+
carma_do_optics = .true.
36+
37+
rad_diag_3 = 'A:Q:H2O', 'N:O2:O2', 'A:CO2:CO2', 'A:O3:O3', 'A:N2O:N2O', 'A:CH4:CH4',
38+
'N:CFC11:CFC11', 'N:CFC12:CFC12',
39+
'B:MXAER01:trop_strat_soa5_MXAER01_rrtmg.nc',
40+
'B:MXAER02:trop_strat_soa5_MXAER02_rrtmg.nc',
41+
'B:MXAER03:trop_strat_soa5_MXAER03_rrtmg.nc',
42+
'B:MXAER04:trop_strat_soa5_MXAER04_rrtmg.nc',
43+
'B:MXAER05:trop_strat_soa5_MXAER05_rrtmg.nc',
44+
'B:MXAER06:trop_strat_soa5_MXAER06_rrtmg.nc',
45+
'B:MXAER07:trop_strat_soa5_MXAER07_rrtmg.nc',
46+
'B:MXAER08:trop_strat_soa5_MXAER08_rrtmg.nc',
47+
'B:MXAER09:trop_strat_soa5_MXAER09_rrtmg.nc',
48+
'B:MXAER10:trop_strat_soa5_MXAER10_rrtmg.nc',
49+
'B:MXAER11:trop_strat_soa5_MXAER11_rrtmg.nc',
50+
'B:MXAER12:trop_strat_soa5_MXAER12_rrtmg.nc',
51+
'B:MXAER13:trop_strat_soa5_MXAER13_rrtmg.nc',
52+
'B:MXAER14:trop_strat_soa5_MXAER14_rrtmg.nc',
53+
'B:MXAER15:trop_strat_soa5_MXAER15_rrtmg.nc',
54+
'B:MXAER16:trop_strat_soa5_MXAER16_rrtmg.nc',
55+
'B:MXAER17:trop_strat_soa5_MXAER17_rrtmg.nc',
56+
'B:MXAER18:trop_strat_soa5_MXAER18_rrtmg.nc',
57+
'B:MXAER19:trop_strat_soa5_MXAER19_rrtmg.nc',
58+
'B:MXAER20:trop_strat_soa5_MXAER20_rrtmg.nc',
59+
'B:PRSUL01:trop_strat_soa5_PRSUL01_rrtmg.nc',
60+
'B:PRSUL02:trop_strat_soa5_PRSUL02_rrtmg.nc',
61+
'B:PRSUL03:trop_strat_soa5_PRSUL03_rrtmg.nc',
62+
'B:PRSUL04:trop_strat_soa5_PRSUL04_rrtmg.nc',
63+
'B:PRSUL05:trop_strat_soa5_PRSUL05_rrtmg.nc',
64+
'B:PRSUL06:trop_strat_soa5_PRSUL06_rrtmg.nc',
65+
'B:PRSUL07:trop_strat_soa5_PRSUL07_rrtmg.nc',
66+
'B:PRSUL08:trop_strat_soa5_PRSUL08_rrtmg.nc',
67+
'B:PRSUL09:trop_strat_soa5_PRSUL09_rrtmg.nc',
68+
'B:PRSUL10:trop_strat_soa5_PRSUL10_rrtmg.nc',
69+
'B:PRSUL11:trop_strat_soa5_PRSUL11_rrtmg.nc',
70+
'B:PRSUL12:trop_strat_soa5_PRSUL12_rrtmg.nc',
71+
'B:PRSUL13:trop_strat_soa5_PRSUL13_rrtmg.nc',
72+
'B:PRSUL14:trop_strat_soa5_PRSUL14_rrtmg.nc',
73+
'B:PRSUL15:trop_strat_soa5_PRSUL15_rrtmg.nc',
74+
'B:PRSUL16:trop_strat_soa5_PRSUL16_rrtmg.nc',
75+
'B:PRSUL17:trop_strat_soa5_PRSUL17_rrtmg.nc',
76+
'B:PRSUL18:trop_strat_soa5_PRSUL18_rrtmg.nc',
77+
'B:PRSUL19:trop_strat_soa5_PRSUL19_rrtmg.nc',
78+
'B:PRSUL20:trop_strat_soa5_PRSUL20_rrtmg.nc'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
hist_nhtfrq = 9
2+
hist_mfilt = 1
3+
hist_ndens = 1

doc/ChangeLog

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,101 @@
11
===============================================================
22

3+
Tag name: cam6_4_183
4+
Originator(s): jimmielin
5+
Date: 22 Jun 2026
6+
One-line Summary: Complete CCPPization of cloud fraction for two-moment microphys (cldfrc2m); Add rad_diag CARMA testmod to existing Derecho FCARMA2000climo test
7+
Github PR URL: https://github.com/ESCOMP/CAM/pull/1522
8+
9+
Purpose of changes (include the issue number and title text for each relevant GitHub issue):
10+
- Closes #1521 - Move two-moment cloud fraction scheme (cldfrc2m) to atmos_phys as compute_cloud_fraction_two_moment.
11+
- cldfrc2m is used broadly across CAM physics (cldwat2m_macro, clubb_intr, CARMA cirrus models) and its namelist parameters are pulled in via USE statements in many places. Moving the computational routines to atmos_phys and making cldfrc2m a thin CAM shim for namelist I/O and parameter distribution facilitates CCPP port of CLUBB, PUMAS, etc. as these namelist parameters will cleanly flow via standard names
12+
- Added keyword arguments calling into cldfrc for rh threshold etc. for clarity
13+
- Closes #1560 - Extend CARMA test on Derecho/Intel with rad_diag testing
14+
15+
Describe any changes made to build system: N/A
16+
17+
Describe any changes made to the namelist: N/A
18+
19+
List any changes to the defaults for the boundary datasets: N/A
20+
21+
Describe any substantial timing or memory changes: N/A
22+
23+
Code reviewed by: nusbaume, fvitt (CARMA fix), peverwhee (atmos_phys)
24+
25+
List all files eliminated: N/A
26+
27+
List all files added and what they do:
28+
A cime_config/testdefs/testmods_dirs/cam/outfrq9s_carma_rad_diag/shell_commands
29+
A cime_config/testdefs/testmods_dirs/cam/outfrq9s_carma_rad_diag/user_nl_cam
30+
A cime_config/testdefs/testmods_dirs/cam/outfrq9s_carma_rad_diag/user_nl_clm
31+
- new testmod that exercises rad_diag for CARMA (prev only Izumi for MAM)
32+
- new testmod that exercises carma_do_optics for CARMA to write out optics files
33+
34+
List all existing files that have been modified, and describe the changes:
35+
36+
M .gitmodules
37+
M src/atmos_phys
38+
- update atmos_phys to atmos_phys0_23_000.
39+
40+
M bld/namelist_files/namelist_definition.xml
41+
- fix typo
42+
43+
M cime_config/testdefs/testlist_cam.xml
44+
- update Derecho Intel FCARMA test to use the new outfrq9s_carma_rad_diag testmod.
45+
46+
M src/physics/cam/cldfrc2m.F90
47+
- Move computational subroutines (astG_PDF, astG_RHU, astG_PDF_single,
48+
astG_RHU_single, aist_single, aist_vector) to atmos_phys
49+
compute_cloud_fraction_two_moment.
50+
- Keep readnl, init, and public namelist-derived constants
51+
(rhmini_const, rhmaxi_const, rhminis_const, rhmaxis_const,
52+
rhminl_const, rhminl_adj_land_const, rhminh_const).
53+
- init now calls compute_cloud_fraction_two_moment_init and
54+
cldfrc_getparams to distribute parameters.
55+
- Newly exposes rhminl_const, rhminl_adj_land_const, rhminh_const
56+
(previously internal) so callers can pass them in explicitly.
57+
58+
M src/physics/cam/cldwat2m_macro.F90
59+
- USE compute_cloud_fraction_two_moment directly for subroutines;
60+
USE cldfrc2m shim only for rh constants.
61+
62+
M src/physics/cam/clubb_intr.F90
63+
- USE compute_cloud_fraction_two_moment for aist_vector;
64+
USE cldfrc2m shim for rh constants including newly-exposed rhminl_const,
65+
rhminl_adj_land_const, rhminh_const.
66+
67+
M src/physics/carma/models/cirrus/carma_cloudfraction.F90
68+
M src/physics/carma/models/cirrus_dust/carma_cloudfraction.F90
69+
- USE compute_cloud_fraction_two_moment for subroutines;
70+
USE cldfrc2m shim for rh constants.
71+
72+
If there were any failures reported from running test_driver.sh on any test
73+
platform, and checkin with these failures has been OK'd by the gatekeeper,
74+
then copy the lines from the td.*.status files for the failed tests to the
75+
appropriate machine below. All failed tests must be justified.
76+
77+
derecho/intel/aux_cam:
78+
SMS_D_Ln9.f19_f19_mg17.FCARMA2000climo.derecho_intel.cam-outfrq9s_carma_rad_diag (Overall: DIFF) details:
79+
- the testmod for this test changed to "outfrq9s_carma_rad_diag".
80+
I cprnc'd the baseline files manually against
81+
/glade/campaign/cesm/community/amwg/cam_baselines/cam6_4_182_intel/
82+
SMS_D_Ln9.f19_f19_mg17.FCARMA2000climo.derecho_intel.cam-outfrq9s
83+
The cam.h0a file differs only in the field lists due to new variables introduced in rad_diag_2 and 3.
84+
The other files are IDENTICAL.
85+
86+
derecho/nvhpc/aux_cam: All PASS
87+
88+
izumi/nag/aux_cam:
89+
ERC_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_nag.cam-outfrq3s_subcol (Overall: FAIL) details:
90+
FAIL ERC_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_nag.cam-outfrq3s_subcol COMPARE_base_rest
91+
- pre-existing failure.
92+
93+
izumi/gnu/aux_cam: All PASS
94+
95+
Summarize any changes to answers: All B4B
96+
97+
===============================================================
98+
399
Tag name: cam6_4_182
4100
Originator(s): fvitt
5101
Date: 16 Jun 2026

0 commit comments

Comments
 (0)