Skip to content

Commit ab9c0e6

Browse files
authored
Merge pull request #1271 from jimmielin/hplin/rk_stratiform
cam6_4_085: Phase 1 of rk_stratiform CCPPization; CCPPize cldfrc
2 parents 1a86954 + f6dd844 commit ab9c0e6

19 files changed

Lines changed: 921 additions & 3211 deletions

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
[submodule "atmos_phys"]
3737
path = src/atmos_phys
3838
url = https://github.com/ESCOMP/atmospheric_physics
39-
fxtag = atmos_phys0_11_000
39+
fxtag = atmos_phys0_12_000
4040
fxrequired = AlwaysRequired
4141
fxDONOTUSEurl = https://github.com/ESCOMP/atmospheric_physics
4242

bld/build-namelist

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5288,6 +5288,11 @@ sub check_snapshot_settings {
52885288
push (@validList_bc, ("'microp_driver_tend_subcol'"));
52895289
}
52905290
}
5291+
5292+
if ($microphys eq 'rk') {
5293+
push (@validList_bc, ("'rk_stratiform_tend'"));
5294+
}
5295+
52915296
push (@validList_bc, ("'aero_model_wetdep'", "'radiation_tend'"));
52925297
}
52935298
if ($user_set_after) {

bld/configure

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2168,13 +2168,14 @@ sub write_filepath
21682168
print $fh "$camsrcdir/src/atmos_phys/to_be_ccppized\n";
21692169
print $fh "$camsrcdir/src/atmos_phys/phys_utils\n";
21702170

2171-
#Add the CCPP'ized subdirectories
2171+
# Add the CCPP'ized subdirectories
21722172
print $fh "$camsrcdir/src/atmos_phys/schemes/tropopause_find\n";
21732173
print $fh "$camsrcdir/src/atmos_phys/schemes/zhang_mcfarlane\n";
21742174
print $fh "$camsrcdir/src/atmos_phys/schemes/dry_adiabatic_adjust\n";
21752175
print $fh "$camsrcdir/src/atmos_phys/schemes/conservation_adjust/check_energy\n";
21762176
print $fh "$camsrcdir/src/atmos_phys/schemes/conservation_adjust/dme_adjust\n";
21772177
print $fh "$camsrcdir/src/atmos_phys/schemes/hack_shallow\n";
2178+
print $fh "$camsrcdir/src/atmos_phys/schemes/rasch_kristjansson\n";
21782179
print $fh "$camsrcdir/src/atmos_phys/schemes/utilities\n";
21792180

21802181
print $fh "$camsrcdir/src/atmos_phys/schemes/cloud_fraction\n";

bld/namelist_files/namelist_definition.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5665,15 +5665,15 @@ Default:
56655665
</entry>
56665666

56675667
<entry id="cam_take_snapshot_before" type="char*32" category="diagnostics"
5668-
group="phys_ctl_nl" valid_values="chem_emissions,aoa_tracers_timestep_tend,co2_cycle_set_ptend,chem_timestep_tend,vertical_diffusion_section,aero_model_drydep,gw_tend,qbo_relax,iondrag_calc_section,physics_dme_adjust,physics_dme_adjust,dadadj_tend,convect_deep_tend,convect_shallow_tend,convect_diagnostics_calc,macrop_driver_tend,clubb_tend_cam,microp_section,microp_driver_tend_subcol,aero_model_wetdep,radiation_tend,held_suarez_tend,kessler_tend,thatcher_jablonowski_precip_tend,user_set" >
5668+
group="phys_ctl_nl" valid_values="chem_emissions,aoa_tracers_timestep_tend,co2_cycle_set_ptend,chem_timestep_tend,vertical_diffusion_section,aero_model_drydep,gw_tend,qbo_relax,iondrag_calc_section,physics_dme_adjust,physics_dme_adjust,dadadj_tend,convect_deep_tend,convect_shallow_tend,convect_diagnostics_calc,macrop_driver_tend,clubb_tend_cam,microp_section,microp_driver_tend_subcol,aero_model_wetdep,radiation_tend,held_suarez_tend,kessler_tend,thatcher_jablonowski_precip_tend,rk_stratiform_tend,user_set" >
56695669
Name of parameterization to take snapshot before running
56705670
user_set is used when a user inserts a call to cam_snapshot_all_outfld
56715671
using cam_snapshot_before_num as the first argument.
56725672
Default: Unused
56735673
</entry>
56745674

56755675
<entry id="cam_take_snapshot_after" type="char*32" category="diagnostics"
5676-
group="phys_ctl_nl" valid_values="chem_emissions,aoa_tracers_timestep_tend,co2_cycle_set_ptend,chem_timestep_tend,vertical_diffusion_section,aero_model_drydep,gw_tend,qbo_relax,iondrag_calc_section,physics_dme_adjust,physics_dme_adjust,dadadj_tend,convect_deep_tend,convect_shallow_tend,convect_diagnostics_calc,macrop_driver_tend,clubb_tend_cam,microp_section,microp_driver_tend_subcol,aero_model_wetdep,radiation_tend,held_suarez_tend,kessler_tend,thatcher_jablonowski_precip_tend,user_set" >
5676+
group="phys_ctl_nl" valid_values="chem_emissions,aoa_tracers_timestep_tend,co2_cycle_set_ptend,chem_timestep_tend,vertical_diffusion_section,aero_model_drydep,gw_tend,qbo_relax,iondrag_calc_section,physics_dme_adjust,physics_dme_adjust,dadadj_tend,convect_deep_tend,convect_shallow_tend,convect_diagnostics_calc,macrop_driver_tend,clubb_tend_cam,microp_section,microp_driver_tend_subcol,aero_model_wetdep,radiation_tend,held_suarez_tend,kessler_tend,thatcher_jablonowski_precip_tend,rk_stratiform_tend,user_set" >
56775677
Name of parameterization to take snapshot after running
56785678
user_set is used when a user inserts a call to cam_snapshot_all_outfld
56795679
using cam_snapshot_after_num as the first argument.

doc/ChangeLog

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

3+
Tag name: cam6_4_085
4+
Originator(s): jimmielin
5+
Date: 11 April 2025
6+
One-line Summary: Phase 1 of rk_stratiform CCPPization; CCPPize cldfrc
7+
Github PR URL: https://github.com/ESCOMP/CAM/pull/1271
8+
9+
Purpose of changes (include the issue number and title text for each relevant GitHub issue):
10+
- Closes #1267 - Convert cloud_fraction/cldfrc to CCPP and move to atmospheric_physics
11+
- Fixes #1274 for incorrect vertical dimension of `tphysbc_cmfmc` in snapshots
12+
- Partial completion of #1225 - Convert rk_stratiform_tend (CAM4) to CCPP and move to atmos_phys; most code has been moved to atmospheric_physics.
13+
14+
Describe any changes made to build system: N/A
15+
16+
Describe any changes made to the namelist:
17+
- build-namelist updated to add `rk_stratiform_tend` snapshot point
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, cacraig
24+
25+
List all files eliminated:
26+
D src/physics/cam/cldwat.F90
27+
D src/physics/cam/pkg_cldoptics.F90
28+
- moved to atmospheric_physics: prognostic_cloud_water CCPPized scheme
29+
- moved to atmospheric_physics: cloud_optical_properties to-be-ccppized library; dechunkized
30+
31+
List all files added and what they do: N/A
32+
33+
List all existing files that have been modified, and describe the changes:
34+
M .gitmodules
35+
M src/atmos_phys
36+
- new atmos_phys external atmos_phys0_12_000 to include CCPPized schemes
37+
38+
M bld/configure
39+
- include atmos_phys/schemes/rasch_kristjansson
40+
41+
M bld/build-namelist
42+
M bld/namelist_files/namelist_definition.xml
43+
M src/physics/cam/physpkg.F90
44+
- add rk_stratiform_tend snapshot point
45+
46+
R066 src/physics/cam/rk_stratiform.F90 src/physics/cam/rk_stratiform_cam.F90
47+
M src/control/runtime_opts.F90
48+
M src/physics/cam/const_init.F90
49+
- rename CAM interface to rk_stratiform_cam
50+
- CCPPize most logic and moved into atmos_phys
51+
52+
M src/physics/cam/cloud_diagnostics.F90
53+
- changes to support move of pkg_cldoptics to atmos_phys
54+
55+
M src/physics/cam/cloud_fraction.F90
56+
- CCPPized cldfrc and moved to atmos_phys: compute_cloud_fraction
57+
- shallow and deep convective cloud cover logic separated into CCPPized scheme in atmos_phys: convective_cloud_cover
58+
59+
M src/physics/cam/macrop_driver.F90
60+
- changes to support CCPPization of cldfrc
61+
62+
M src/physics/cam/pkg_cld_sediment.F90
63+
- CCPPized logic and moved into atmos_phys: cloud_particle_sedimendation
64+
65+
M src/physics/cam7/cam_snapshot.F90
66+
M src/physics/cam/cam_snapshot.F90
67+
- fix #1274 vertical dimension of tphysbc_cmfmc
68+
69+
M src/utils/physconst.F90
70+
- add pref reference pressure to match CAM-SIMA
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+
ERC_D_Ln9.f19_f19_mg17.QPMOZ.derecho_intel.cam-outfrq3s (Overall: DIFF) details:
79+
ERI_D_Ln18.f45_f45_mg37.QPC41850.derecho_intel.cam-co2rmp_usecase (Overall: DIFF) details:
80+
ERP_Lh12.f19_f19_mg17.FW4madSD.derecho_intel.cam-outfrq3h (Overall: DIFF) details:
81+
SMS_D_Ln9.ne16_ne16_mg17.QPX2000.derecho_intel.cam-outfrq9s_amie (Overall: DIFF) details:
82+
- CAM4 baseline changes due to roundoff changes in rk_stratiform microphysics
83+
84+
ERP_Ln9.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq9s (Overall: FAIL) details:
85+
SMS_Ld1.f09_f09_mg17.FCHIST_GC.derecho_intel.cam-outfrq1d (Overall: DIFF) details:
86+
- pre-existing failures due to HEMCO not having reproducible results (issues #1018 and #856)
87+
88+
SMS_D_Ln9_P1280x1.ne0CONUSne30x8_ne0CONUSne30x8_mt12.FCHIST.derecho_intel.cam-outfrq9s (Overall: FAIL) details:
89+
- pre-existing failures due to build-namelist error requiring CLM/CTSM external update
90+
91+
derecho/nvhpc/aux_cam:
92+
ERS_Ln9.ne30pg3_ne30pg3_mg17.F2000dev.derecho_nvhpc.cam-outfrq9s_gpu_default (Overall: FAIL) details:
93+
- machine error - could not RUN
94+
95+
izumi/nag/aux_cam:
96+
ERC_D_Ln9.ne16_ne16_mg17.QPC4.izumi_nag.cam-outfrq3s_usecase (Overall: DIFF) details:
97+
ERC_D_Ln9.ne16pg3_ne16pg3_mg17.QPC4.izumi_nag.cam-outfrq3s_usecase (Overall: DIFF) details:
98+
SMS_D_Ln3.ne5pg3_ne5pg3_mg37.QPX2000.izumi_nag.cam-outfrq3s (Overall: DIFF) details:
99+
SMS_D_Ln6.ne5_ne5_mg37.QPWmaC4.izumi_nag.cam-outfrq3s_physgrid_tem (Overall: DIFF) details:
100+
- CAM4 baseline changes due to roundoff changes in rk_stratiform microphysics
101+
102+
izumi/gnu/aux_cam:
103+
ERC_D_Ln9.ne5_ne5_mg37.QPC4.izumi_gnu.cam-outfrq3s_nudging_ne5_L26 (Overall: DIFF) details:
104+
SMS_P48x1_D_Ln9.f19_f19_mg17.FW4madSD.izumi_gnu.cam-outfrq9s (Overall: DIFF) details:
105+
- CAM4 baseline changes due to roundoff changes in rk_stratiform microphysics
106+
107+
CAM tag used for the baseline comparison tests if different than previous
108+
tag: N/A
109+
110+
Summarize any changes to answers:
111+
CAM4 round-off changes in heat flux due to rearrangement of terms / cleanup in CCPPization
112+
will lead to greater than round-off changes for CAM4 compsets only after a few timesteps
113+
due to chaotic nature of system.
114+
115+
===============================================================
116+
3117
Tag name: cam6_4_084
4118
Originator(s): fvitt
5119
Date: 8 Apr 2025

src/atmos_phys

src/control/runtime_opts.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ subroutine read_namelist(nlfilename, single_column, scmlat, scmlon)
4848
use subcol, only: subcol_readnl
4949
use cloud_fraction, only: cldfrc_readnl
5050
use cldfrc2m, only: cldfrc2m_readnl
51-
use rk_stratiform, only: rk_stratiform_readnl
51+
use rk_stratiform_cam, only: rk_stratiform_cam_readnl
5252
use unicon_cam, only: unicon_cam_readnl
5353
use zm_conv_intr, only: zm_conv_readnl
5454
use hk_conv, only: hkconv_readnl
@@ -154,7 +154,7 @@ subroutine read_namelist(nlfilename, single_column, scmlat, scmlon)
154154
call cldfrc2m_readnl(nlfilename)
155155
call unicon_cam_readnl(nlfilename)
156156
call zm_conv_readnl(nlfilename)
157-
call rk_stratiform_readnl(nlfilename)
157+
call rk_stratiform_cam_readnl(nlfilename)
158158
call hkconv_readnl(nlfilename)
159159
call uwshcu_readnl(nlfilename)
160160
call cld_sediment_readnl(nlfilename)

src/physics/cam/cam_snapshot.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ subroutine cam_tphysbc_snapshot_init(cam_snapshot_before_num, cam_snapshot_after
239239
'flx', 'tphysbc_flx_heat', 'unset', horiz_only)
240240

241241
call snapshot_addfld( ntphysbc_var, tphysbc_snapshot, cam_snapshot_before_num, cam_snapshot_after_num, &
242-
'cmfmc', 'tphysbc_cmfmc', 'unset', 'lev')
242+
'cmfmc', 'tphysbc_cmfmc', 'unset', 'ilev')
243243

244244
call snapshot_addfld( ntphysbc_var, tphysbc_snapshot, cam_snapshot_before_num, cam_snapshot_after_num, &
245245
'cmfcme', 'tphysbc_cmfcme', 'unset', 'lev')

0 commit comments

Comments
 (0)