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
4 changes: 2 additions & 2 deletions .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_09_000
fxtag = atmos_phys0_10_000
fxrequired = AlwaysRequired
fxDONOTUSEurl = https://github.com/ESCOMP/atmospheric_physics

Expand Down Expand Up @@ -144,7 +144,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/mizuRoute
[submodule "ccs_config"]
path = ccs_config
url = https://github.com/ESMCI/ccs_config_cesm.git
fxtag = ccs_config_cesm1.0.21
fxtag = ccs_config_cesm1.0.21
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git

Expand Down
1 change: 1 addition & 0 deletions bld/configure
Original file line number Diff line number Diff line change
Expand Up @@ -2164,6 +2164,7 @@ sub write_filepath
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/check_energy\n";
print $fh "$camsrcdir/src/atmos_phys/schemes/hack_shallow\n";
print $fh "$camsrcdir/src/atmos_phys/schemes/utilities\n";

print $fh "$camsrcdir/src/atmos_phys/schemes/cloud_fraction\n";
Expand Down
85 changes: 85 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,90 @@
===============================================================

Tag name: cam6_4_074
Originator(s): jimmielin
Date: 05 Mar 2025
One-line Summary: Complete CCPPization of Hack shallow convection
Github PR URL: https://github.com/ESCOMP/CAM/pull/1256

Purpose of changes (include the issue number and title text for each relevant GitHub issue):
- Convert Hack shallow convection and move to atmospheric_physics (#1174)

Other changes for CCPPization that resolve issues in atmospheric_physics:
- ZM convective mass flux (atmosphere_convective_mass_flux_due_to_deep_convection) units inconsistent with snapshot (https://github.com/ESCOMP/atmospheric_physics/issues/197)
- Add errmsg, errflg to cloud_fraction_fice_run (https://github.com/ESCOMP/atmospheric_physics/issues/201)

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: nusbaume

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 .gitmodules
M src/atmos_phys
- update atmospheric_physics to bring in Hack shallow convection,
and related CCPPized physics changes.

M bld/configure
- add path to atmos_phys/schemes/hack_shallow

M src/physics/cam/convect_shallow.F90
M src/physics/cam/hk_conv.F90
- CCPPize Hack shallow convection.


M src/physics/cam/vertical_diffusion.F90
M src/physics/cam/physpkg.F90
M src/physics/cam7/physpkg.F90
- removal of unused second dimension (pcnst) of qpert because it is not supported
in CAM-SIMA snapshot reads.

M src/physics/cam/macrop_driver.F90
M src/physics/cam/zm_conv_intr.F90
M src/physics/cam/rk_stratiform.F90
- add errmsg, errflg to cloud_fraction_fice CCPPized scheme.

M src/physics/cam/zm_conv_intr.F90
- move unit conversion of convective mass fluxes to kg m-2 s-1 to
inside CCPPized scheme for consistency with snapshots.

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:

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

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

derecho/nvhpc/aux_cam: ALL PASS

izumi/nag/aux_cam: ALL PASS

izumi/gnu/aux_cam: ALL PASS

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

Summarize any changes to answers: Bit-for-bit

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

Tag name: cam6_4_073
Originator(s): fvitt, tilmes
Date: 5 Mar 2025
Expand Down
2 changes: 1 addition & 1 deletion src/atmos_phys
Submodule atmos_phys updated 38 files
+0 −56 doc/ChangeLog
+14 −8 schemes/cloud_fraction/cloud_fraction_fice.F90
+13 −1 schemes/cloud_fraction/cloud_fraction_fice.meta
+31 −0 schemes/cloud_fraction/set_cloud_fraction_top.F90
+31 −0 schemes/cloud_fraction/set_cloud_fraction_top.meta
+134 −0 schemes/hack_shallow/convect_shallow_sum_to_deep.F90
+157 −0 schemes/hack_shallow/convect_shallow_sum_to_deep.meta
+1,020 −0 schemes/hack_shallow/hack_convect_shallow.F90
+312 −0 schemes/hack_shallow/hack_convect_shallow.meta
+33 −0 schemes/hack_shallow/hack_convect_shallow_namelist.xml
+50 −0 schemes/hack_shallow/set_general_conv_fluxes_to_shallow.F90
+109 −0 schemes/hack_shallow/set_general_conv_fluxes_to_shallow.meta
+25 −0 schemes/hack_shallow/set_shallow_conv_fluxes_to_general.F90
+31 −0 schemes/hack_shallow/set_shallow_conv_fluxes_to_general.meta
+3 −3 schemes/musica/tuvx/musica_ccpp_tuvx.F90
+291 −0 schemes/sima_diagnostics/convect_shallow_diagnostics.F90
+277 −0 schemes/sima_diagnostics/convect_shallow_diagnostics.meta
+2 −2 schemes/sima_diagnostics/sima_state_diagnostics.meta
+2 −5 schemes/sima_diagnostics/zm_diagnostics.F90
+3 −3 schemes/sima_diagnostics/zm_diagnostics.meta
+1 −1 schemes/utilities/geopotential_temp.meta
+2 −2 schemes/utilities/qneg.meta
+2 −2 schemes/zhang_mcfarlane/zm_conv_convtran.meta
+49 −0 schemes/zhang_mcfarlane/zm_conv_options.F90
+97 −0 schemes/zhang_mcfarlane/zm_conv_options.meta
+1 −1 schemes/zhang_mcfarlane/zm_conv_options_namelist.xml
+5 −2 schemes/zhang_mcfarlane/zm_convr.F90
+6 −6 schemes/zhang_mcfarlane/zm_convr.meta
+169 −0 suites/suite_cam4.xml
+7 −3 suites/suite_cam7.xml
+4 −1 test/CMakeLists.txt
+19 −9 test/docker/Dockerfile.musica
+6 −4 test/docker/Dockerfile.musica.no_install
+58 −64 test/musica/CMakeLists.txt
+1 −6 test/musica/micm/CMakeLists.txt
+9 −54 test/musica/tuvx/CMakeLists.txt
+57 −0 test/test_suites/suite_convect_shallow_hack.xml
+2 −1 test/test_suites/suite_zhang_mcfarlane.xml
34 changes: 7 additions & 27 deletions src/physics/cam/convect_shallow.F90
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ subroutine convect_shallow_init(pref_edge, pbuf2d)
real(r8), intent(in) :: pref_edge(plevp) ! Reference pressures at interfaces
type(physics_buffer_desc), pointer :: pbuf2d(:,:)

integer limcnv ! Top interface level limit for convection
integer k
character(len=16) :: eddy_scheme

Expand Down Expand Up @@ -266,26 +265,8 @@ subroutine convect_shallow_init(pref_edge, pbuf2d)
qpert_idx = pbuf_get_index('qpert')

if( masterproc ) write(iulog,*) 'convect_shallow_init: Hack shallow convection'
! Limit shallow convection to regions below 40 mb
! Note this calculation is repeated in the deep convection interface
if( pref_edge(1) >= 4.e3_r8 ) then
limcnv = 1
else
do k = 1, plev
if( pref_edge(k) < 4.e3_r8 .and. pref_edge(k+1) >= 4.e3_r8 ) then
limcnv = k
goto 10
end if
end do
limcnv = plevp
end if
10 continue

if( masterproc ) then
write(iulog,*) 'MFINTI: Convection will be capped at intfc ', limcnv, ' which is ', pref_edge(limcnv), ' pascals'
end if

call mfinti( rair, cpair, gravit, latvap, rhoh2o, limcnv) ! Get args from inti.F90

call mfinti( rair, cpair, gravit, latvap, rhoh2o, pref_edge) ! Get args from inti.F90

case('UW') ! Park and Bretherton shallow convection scheme

Expand Down Expand Up @@ -357,7 +338,7 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
use camsrfexch, only : cam_in_t

use constituents, only : pcnst, cnst_get_ind, cnst_get_type_byind
use hk_conv, only : cmfmca
use hk_conv, only : cmfmca_cam
use uwshcu, only : compute_uwshcu_inv
use unicon_cam, only : unicon_out_t, unicon_cam_tend

Expand Down Expand Up @@ -411,7 +392,7 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
real(r8) :: tpert(pcols) ! PBL perturbation theta

real(r8), pointer :: pblh(:) ! PBL height [ m ]
real(r8), pointer :: qpert(:,:) ! PBL perturbation specific humidity
real(r8), pointer :: qpert(:) ! PBL perturbation specific humidity

! Temperature tendency from shallow convection (pbuf pointer).
real(r8), pointer, dimension(:,:) :: ttend_sh
Expand Down Expand Up @@ -567,9 +548,8 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
call physics_ptend_init( ptend_loc, state%psetcols, 'cmfmca', ls=.true., lq=lq ) ! Initialize local ptend type

call pbuf_get_field(pbuf, qpert_idx, qpert)
qpert(:ncol,2:pcnst) = 0._r8

call cmfmca( lchnk , ncol , &
call cmfmca_cam( lchnk , ncol , &
nstep , ztodt , state%pmid , state%pdel , &
state%rpdel , state%zm , tpert , qpert , state%phis , &
pblh , state%t , state%q , ptend_loc%s , ptend_loc%q , &
Expand Down Expand Up @@ -885,9 +865,9 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &

top_lev = 1
call phys_getopts (macrop_scheme_out = macrop_scheme)
if ( .not. (macrop_scheme == "rk" .or. macrop_scheme == "SPCAM_sam1mom")) top_lev = trop_cloud_top_lev
if ( .not. (macrop_scheme == "rk")) top_lev = trop_cloud_top_lev

call cloud_fraction_fice_run(ncol, state1%t(1:ncol,:), tmelt, top_lev, pver, fice(1:ncol,:), fsnow_conv(1:ncol,:))
call cloud_fraction_fice_run(ncol, state1%t(1:ncol,:), tmelt, top_lev, pver, fice(1:ncol,:), fsnow_conv(1:ncol,:), errmsg, errflg)

call zm_conv_evap_run(state1%ncol, pver, pverp, &
gravit, latice, latvap, tmelt, &
Expand Down
Loading