Skip to content

cam6_4_085: Phase 1 of rk_stratiform CCPPization; CCPPize cldfrc #1271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Apr 14, 2025
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
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
[submodule "atmos_phys"]
path = src/atmos_phys
url = https://github.com/ESCOMP/atmospheric_physics
fxtag = atmos_phys0_11_000
fxtag = atmos_phys0_12_000
fxrequired = AlwaysRequired
fxDONOTUSEurl = https://github.com/ESCOMP/atmospheric_physics

Expand Down
5 changes: 5 additions & 0 deletions bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -5288,6 +5288,11 @@ sub check_snapshot_settings {
push (@validList_bc, ("'microp_driver_tend_subcol'"));
}
}

if ($microphys eq 'rk') {
push (@validList_bc, ("'rk_stratiform_tend'"));
}

push (@validList_bc, ("'aero_model_wetdep'", "'radiation_tend'"));
}
if ($user_set_after) {
Expand Down
3 changes: 2 additions & 1 deletion bld/configure
Original file line number Diff line number Diff line change
Expand Up @@ -2168,13 +2168,14 @@ sub write_filepath
print $fh "$camsrcdir/src/atmos_phys/to_be_ccppized\n";
print $fh "$camsrcdir/src/atmos_phys/phys_utils\n";

#Add the CCPP'ized subdirectories
# Add the CCPP'ized subdirectories
print $fh "$camsrcdir/src/atmos_phys/schemes/tropopause_find\n";
print $fh "$camsrcdir/src/atmos_phys/schemes/zhang_mcfarlane\n";
print $fh "$camsrcdir/src/atmos_phys/schemes/dry_adiabatic_adjust\n";
print $fh "$camsrcdir/src/atmos_phys/schemes/conservation_adjust/check_energy\n";
print $fh "$camsrcdir/src/atmos_phys/schemes/conservation_adjust/dme_adjust\n";
print $fh "$camsrcdir/src/atmos_phys/schemes/hack_shallow\n";
print $fh "$camsrcdir/src/atmos_phys/schemes/rasch_kristjansson\n";
print $fh "$camsrcdir/src/atmos_phys/schemes/utilities\n";

print $fh "$camsrcdir/src/atmos_phys/schemes/cloud_fraction\n";
Expand Down
4 changes: 2 additions & 2 deletions bld/namelist_files/namelist_definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5665,15 +5665,15 @@ Default:
</entry>

<entry id="cam_take_snapshot_before" type="char*32" category="diagnostics"
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" >
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" >
Name of parameterization to take snapshot before running
user_set is used when a user inserts a call to cam_snapshot_all_outfld
using cam_snapshot_before_num as the first argument.
Default: Unused
</entry>

<entry id="cam_take_snapshot_after" type="char*32" category="diagnostics"
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" >
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" >
Name of parameterization to take snapshot after running
user_set is used when a user inserts a call to cam_snapshot_all_outfld
using cam_snapshot_after_num as the first argument.
Expand Down
114 changes: 114 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,119 @@
===============================================================

Tag name: cam6_4_085
Originator(s): jimmielin
Date: 11 April 2025
One-line Summary: Phase 1 of rk_stratiform CCPPization; CCPPize cldfrc
Github PR URL: https://github.com/ESCOMP/CAM/pull/1271

Purpose of changes (include the issue number and title text for each relevant GitHub issue):
- Closes #1267 - Convert cloud_fraction/cldfrc to CCPP and move to atmospheric_physics
- Fixes #1274 for incorrect vertical dimension of `tphysbc_cmfmc` in snapshots
- Partial completion of #1225 - Convert rk_stratiform_tend (CAM4) to CCPP and move to atmos_phys; most code has been moved to atmospheric_physics.

Describe any changes made to build system: N/A

Describe any changes made to the namelist:
- build-namelist updated to add `rk_stratiform_tend` snapshot point

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

Describe any substantial timing or memory changes: N/A

Code reviewed by: nusbaume, cacraig

List all files eliminated:
D src/physics/cam/cldwat.F90
D src/physics/cam/pkg_cldoptics.F90
- moved to atmospheric_physics: prognostic_cloud_water CCPPized scheme
- moved to atmospheric_physics: cloud_optical_properties to-be-ccppized library; dechunkized

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

List all existing files that have been modified, and describe the changes:
M .gitmodules
M src/atmos_phys
- new atmos_phys external atmos_phys0_12_000 to include CCPPized schemes

M bld/configure
- include atmos_phys/schemes/rasch_kristjansson

M bld/build-namelist
M bld/namelist_files/namelist_definition.xml
M src/physics/cam/physpkg.F90
- add rk_stratiform_tend snapshot point

R066 src/physics/cam/rk_stratiform.F90 src/physics/cam/rk_stratiform_cam.F90
M src/control/runtime_opts.F90
M src/physics/cam/const_init.F90
- rename CAM interface to rk_stratiform_cam
- CCPPize most logic and moved into atmos_phys

M src/physics/cam/cloud_diagnostics.F90
- changes to support move of pkg_cldoptics to atmos_phys

M src/physics/cam/cloud_fraction.F90
- CCPPized cldfrc and moved to atmos_phys: compute_cloud_fraction
- shallow and deep convective cloud cover logic separated into CCPPized scheme in atmos_phys: convective_cloud_cover

M src/physics/cam/macrop_driver.F90
- changes to support CCPPization of cldfrc

M src/physics/cam/pkg_cld_sediment.F90
- CCPPized logic and moved into atmos_phys: cloud_particle_sedimendation

M src/physics/cam7/cam_snapshot.F90
M src/physics/cam/cam_snapshot.F90
- fix #1274 vertical dimension of tphysbc_cmfmc

M src/utils/physconst.F90
- add pref reference pressure to match CAM-SIMA

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:
ERC_D_Ln9.f19_f19_mg17.QPMOZ.derecho_intel.cam-outfrq3s (Overall: DIFF) details:
ERI_D_Ln18.f45_f45_mg37.QPC41850.derecho_intel.cam-co2rmp_usecase (Overall: DIFF) details:
ERP_Lh12.f19_f19_mg17.FW4madSD.derecho_intel.cam-outfrq3h (Overall: DIFF) details:
SMS_D_Ln9.ne16_ne16_mg17.QPX2000.derecho_intel.cam-outfrq9s_amie (Overall: DIFF) details:
- CAM4 baseline changes due to roundoff changes in rk_stratiform microphysics

ERP_Ln9.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq9s (Overall: FAIL) details:
SMS_Ld1.f09_f09_mg17.FCHIST_GC.derecho_intel.cam-outfrq1d (Overall: DIFF) details:
- pre-existing failures due to HEMCO not having reproducible results (issues #1018 and #856)

SMS_D_Ln9_P1280x1.ne0CONUSne30x8_ne0CONUSne30x8_mt12.FCHIST.derecho_intel.cam-outfrq9s (Overall: FAIL) details:
- pre-existing failures due to build-namelist error requiring CLM/CTSM external update

derecho/nvhpc/aux_cam:
ERS_Ln9.ne30pg3_ne30pg3_mg17.F2000dev.derecho_nvhpc.cam-outfrq9s_gpu_default (Overall: FAIL) details:
- machine error - could not RUN

izumi/nag/aux_cam:
ERC_D_Ln9.ne16_ne16_mg17.QPC4.izumi_nag.cam-outfrq3s_usecase (Overall: DIFF) details:
ERC_D_Ln9.ne16pg3_ne16pg3_mg17.QPC4.izumi_nag.cam-outfrq3s_usecase (Overall: DIFF) details:
SMS_D_Ln3.ne5pg3_ne5pg3_mg37.QPX2000.izumi_nag.cam-outfrq3s (Overall: DIFF) details:
SMS_D_Ln6.ne5_ne5_mg37.QPWmaC4.izumi_nag.cam-outfrq3s_physgrid_tem (Overall: DIFF) details:
- CAM4 baseline changes due to roundoff changes in rk_stratiform microphysics

izumi/gnu/aux_cam:
ERC_D_Ln9.ne5_ne5_mg37.QPC4.izumi_gnu.cam-outfrq3s_nudging_ne5_L26 (Overall: DIFF) details:
SMS_P48x1_D_Ln9.f19_f19_mg17.FW4madSD.izumi_gnu.cam-outfrq9s (Overall: DIFF) details:
- CAM4 baseline changes due to roundoff changes in rk_stratiform microphysics

CAM tag used for the baseline comparison tests if different than previous
tag: N/A

Summarize any changes to answers:
CAM4 round-off changes in heat flux due to rearrangement of terms / cleanup in CCPPization
will lead to greater than round-off changes for CAM4 compsets only after a few timesteps
due to chaotic nature of system.

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

Tag name: cam6_4_084
Originator(s): fvitt
Date: 8 Apr 2025
Expand Down
2 changes: 1 addition & 1 deletion src/atmos_phys
Submodule atmos_phys updated 26 files
+561 −0 schemes/cloud_fraction/compute_cloud_fraction.F90
+322 −0 schemes/cloud_fraction/compute_cloud_fraction.meta
+229 −0 schemes/cloud_fraction/compute_cloud_fraction_namelist.xml
+121 −0 schemes/cloud_fraction/convective_cloud_cover.F90
+131 −0 schemes/cloud_fraction/convective_cloud_cover.meta
+138 −0 schemes/cloud_fraction/convective_cloud_cover_namelist.xml
+0 −3 schemes/cloud_fraction/set_cloud_fraction_top.F90
+1 −1 schemes/dry_adiabatic_adjust/dadadj_namelist.xml
+0 −3 schemes/hack_shallow/convect_shallow_sum_to_deep.F90
+0 −3 schemes/hack_shallow/hack_convect_shallow.F90
+0 −2 schemes/hack_shallow/set_general_conv_fluxes_to_shallow.F90
+0 −2 schemes/hack_shallow/set_shallow_conv_fluxes_to_general.F90
+671 −0 schemes/rasch_kristjansson/cloud_particle_sedimentation.F90
+257 −0 schemes/rasch_kristjansson/cloud_particle_sedimentation.meta
+91 −0 schemes/rasch_kristjansson/cloud_particle_sedimentation_namelist.xml
+1,189 −0 schemes/rasch_kristjansson/prognostic_cloud_water.F90
+437 −0 schemes/rasch_kristjansson/prognostic_cloud_water.meta
+167 −0 schemes/rasch_kristjansson/prognostic_cloud_water_namelist.xml
+556 −0 schemes/rasch_kristjansson/rk_stratiform.F90
+883 −0 schemes/rasch_kristjansson/rk_stratiform.meta
+0 −3 schemes/sima_diagnostics/convect_shallow_diagnostics.F90
+19 −0 schemes/utilities/qneg.F90
+0 −1 schemes/zhang_mcfarlane/zm_conv_options_namelist.xml
+1 −1 test/docker/Dockerfile.musica
+96 −0 test/test_suites/suite_rasch_kristjansson.xml
+309 −0 to_be_ccppized/cloud_optical_properties.F90
4 changes: 2 additions & 2 deletions src/control/runtime_opts.F90
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ subroutine read_namelist(nlfilename, single_column, scmlat, scmlon)
use subcol, only: subcol_readnl
use cloud_fraction, only: cldfrc_readnl
use cldfrc2m, only: cldfrc2m_readnl
use rk_stratiform, only: rk_stratiform_readnl
use rk_stratiform_cam, only: rk_stratiform_cam_readnl
use unicon_cam, only: unicon_cam_readnl
use zm_conv_intr, only: zm_conv_readnl
use hk_conv, only: hkconv_readnl
Expand Down Expand Up @@ -154,7 +154,7 @@ subroutine read_namelist(nlfilename, single_column, scmlat, scmlon)
call cldfrc2m_readnl(nlfilename)
call unicon_cam_readnl(nlfilename)
call zm_conv_readnl(nlfilename)
call rk_stratiform_readnl(nlfilename)
call rk_stratiform_cam_readnl(nlfilename)
call hkconv_readnl(nlfilename)
call uwshcu_readnl(nlfilename)
call cld_sediment_readnl(nlfilename)
Expand Down
2 changes: 1 addition & 1 deletion src/physics/cam/cam_snapshot.F90
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ subroutine cam_tphysbc_snapshot_init(cam_snapshot_before_num, cam_snapshot_after
'flx', 'tphysbc_flx_heat', 'unset', horiz_only)

call snapshot_addfld( ntphysbc_var, tphysbc_snapshot, cam_snapshot_before_num, cam_snapshot_after_num, &
'cmfmc', 'tphysbc_cmfmc', 'unset', 'lev')
'cmfmc', 'tphysbc_cmfmc', 'unset', 'ilev')

call snapshot_addfld( ntphysbc_var, tphysbc_snapshot, cam_snapshot_before_num, cam_snapshot_after_num, &
'cmfcme', 'tphysbc_cmfcme', 'unset', 'lev')
Expand Down
Loading