Skip to content

Commit acc5271

Browse files
authored
Merge pull request #1256 from jimmielin/hplin/hk_conv
cam6_4_074: Complete CCPPization of Hack shallow convection
2 parents 0097d12 + 38ab231 commit acc5271

File tree

12 files changed

+317
-1137
lines changed

12 files changed

+317
-1137
lines changed

.gitmodules

Lines changed: 2 additions & 2 deletions
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_09_000
39+
fxtag = atmos_phys0_10_000
4040
fxrequired = AlwaysRequired
4141
fxDONOTUSEurl = https://github.com/ESCOMP/atmospheric_physics
4242

@@ -144,7 +144,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/mizuRoute
144144
[submodule "ccs_config"]
145145
path = ccs_config
146146
url = https://github.com/ESMCI/ccs_config_cesm.git
147-
fxtag = ccs_config_cesm1.0.21
147+
fxtag = ccs_config_cesm1.0.21
148148
fxrequired = ToplevelRequired
149149
fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git
150150

bld/configure

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2164,6 +2164,7 @@ sub write_filepath
21642164
print $fh "$camsrcdir/src/atmos_phys/schemes/zhang_mcfarlane\n";
21652165
print $fh "$camsrcdir/src/atmos_phys/schemes/dry_adiabatic_adjust\n";
21662166
print $fh "$camsrcdir/src/atmos_phys/schemes/check_energy\n";
2167+
print $fh "$camsrcdir/src/atmos_phys/schemes/hack_shallow\n";
21672168
print $fh "$camsrcdir/src/atmos_phys/schemes/utilities\n";
21682169

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

doc/ChangeLog

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

3+
Tag name: cam6_4_074
4+
Originator(s): jimmielin
5+
Date: 05 Mar 2025
6+
One-line Summary: Complete CCPPization of Hack shallow convection
7+
Github PR URL: https://github.com/ESCOMP/CAM/pull/1256
8+
9+
Purpose of changes (include the issue number and title text for each relevant GitHub issue):
10+
- Convert Hack shallow convection and move to atmospheric_physics (#1174)
11+
12+
Other changes for CCPPization that resolve issues in atmospheric_physics:
13+
- ZM convective mass flux (atmosphere_convective_mass_flux_due_to_deep_convection) units inconsistent with snapshot (https://github.com/ESCOMP/atmospheric_physics/issues/197)
14+
- Add errmsg, errflg to cloud_fraction_fice_run (https://github.com/ESCOMP/atmospheric_physics/issues/201)
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: nusbaume
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+
32+
M .gitmodules
33+
M src/atmos_phys
34+
- update atmospheric_physics to bring in Hack shallow convection,
35+
and related CCPPized physics changes.
36+
37+
M bld/configure
38+
- add path to atmos_phys/schemes/hack_shallow
39+
40+
M src/physics/cam/convect_shallow.F90
41+
M src/physics/cam/hk_conv.F90
42+
- CCPPize Hack shallow convection.
43+
44+
45+
M src/physics/cam/vertical_diffusion.F90
46+
M src/physics/cam/physpkg.F90
47+
M src/physics/cam7/physpkg.F90
48+
- removal of unused second dimension (pcnst) of qpert because it is not supported
49+
in CAM-SIMA snapshot reads.
50+
51+
M src/physics/cam/macrop_driver.F90
52+
M src/physics/cam/zm_conv_intr.F90
53+
M src/physics/cam/rk_stratiform.F90
54+
- add errmsg, errflg to cloud_fraction_fice CCPPized scheme.
55+
56+
M src/physics/cam/zm_conv_intr.F90
57+
- move unit conversion of convective mass fluxes to kg m-2 s-1 to
58+
inside CCPPized scheme for consistency with snapshots.
59+
60+
If there were any failures reported from running test_driver.sh on any test
61+
platform, and checkin with these failures has been OK'd by the gatekeeper,
62+
then copy the lines from the td.*.status files for the failed tests to the
63+
appropriate machine below. All failed tests must be justified.
64+
65+
derecho/intel/aux_cam:
66+
67+
ERP_Ln9.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq9s (Overall: FAIL)
68+
SMS_Ld1.f09_f09_mg17.FCHIST_GC.derecho_intel.cam-outfrq1d (Overall: DIFF)
69+
- pre-existing failures due to HEMCO not having reproducible results (issues #1018 and #856)
70+
71+
SMS_D_Ln9.f19_f19_mg17.FXHIST.derecho_intel.cam-outfrq9s_amie (Overall: FAIL)
72+
SMS_D_Ln9_P1280x1.ne0CONUSne30x8_ne0CONUSne30x8_mt12.FCHIST.derecho_intel.cam-outfrq9s (Overall: FAIL)
73+
- pre-existing failures due to build-namelist error requiring CLM/CTSM external update
74+
75+
derecho/nvhpc/aux_cam: ALL PASS
76+
77+
izumi/nag/aux_cam: ALL PASS
78+
79+
izumi/gnu/aux_cam: ALL PASS
80+
81+
CAM tag used for the baseline comparison tests if different than previous
82+
tag:
83+
84+
Summarize any changes to answers: Bit-for-bit
85+
86+
===============================================================
87+
388
Tag name: cam6_4_073
489
Originator(s): fvitt, tilmes
590
Date: 5 Mar 2025

src/atmos_phys

Submodule atmos_phys updated 38 files

src/physics/cam/convect_shallow.F90

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ subroutine convect_shallow_init(pref_edge, pbuf2d)
160160
real(r8), intent(in) :: pref_edge(plevp) ! Reference pressures at interfaces
161161
type(physics_buffer_desc), pointer :: pbuf2d(:,:)
162162

163-
integer limcnv ! Top interface level limit for convection
164163
integer k
165164
character(len=16) :: eddy_scheme
166165

@@ -266,26 +265,8 @@ subroutine convect_shallow_init(pref_edge, pbuf2d)
266265
qpert_idx = pbuf_get_index('qpert')
267266

268267
if( masterproc ) write(iulog,*) 'convect_shallow_init: Hack shallow convection'
269-
! Limit shallow convection to regions below 40 mb
270-
! Note this calculation is repeated in the deep convection interface
271-
if( pref_edge(1) >= 4.e3_r8 ) then
272-
limcnv = 1
273-
else
274-
do k = 1, plev
275-
if( pref_edge(k) < 4.e3_r8 .and. pref_edge(k+1) >= 4.e3_r8 ) then
276-
limcnv = k
277-
goto 10
278-
end if
279-
end do
280-
limcnv = plevp
281-
end if
282-
10 continue
283-
284-
if( masterproc ) then
285-
write(iulog,*) 'MFINTI: Convection will be capped at intfc ', limcnv, ' which is ', pref_edge(limcnv), ' pascals'
286-
end if
287-
288-
call mfinti( rair, cpair, gravit, latvap, rhoh2o, limcnv) ! Get args from inti.F90
268+
269+
call mfinti( rair, cpair, gravit, latvap, rhoh2o, pref_edge) ! Get args from inti.F90
289270

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

@@ -357,7 +338,7 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
357338
use camsrfexch, only : cam_in_t
358339

359340
use constituents, only : pcnst, cnst_get_ind, cnst_get_type_byind
360-
use hk_conv, only : cmfmca
341+
use hk_conv, only : cmfmca_cam
361342
use uwshcu, only : compute_uwshcu_inv
362343
use unicon_cam, only : unicon_out_t, unicon_cam_tend
363344

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

413394
real(r8), pointer :: pblh(:) ! PBL height [ m ]
414-
real(r8), pointer :: qpert(:,:) ! PBL perturbation specific humidity
395+
real(r8), pointer :: qpert(:) ! PBL perturbation specific humidity
415396

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

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

572-
call cmfmca( lchnk , ncol , &
552+
call cmfmca_cam( lchnk , ncol , &
573553
nstep , ztodt , state%pmid , state%pdel , &
574554
state%rpdel , state%zm , tpert , qpert , state%phis , &
575555
pblh , state%t , state%q , ptend_loc%s , ptend_loc%q , &
@@ -885,9 +865,9 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
885865

886866
top_lev = 1
887867
call phys_getopts (macrop_scheme_out = macrop_scheme)
888-
if ( .not. (macrop_scheme == "rk" .or. macrop_scheme == "SPCAM_sam1mom")) top_lev = trop_cloud_top_lev
868+
if ( .not. (macrop_scheme == "rk")) top_lev = trop_cloud_top_lev
889869

890-
call cloud_fraction_fice_run(ncol, state1%t(1:ncol,:), tmelt, top_lev, pver, fice(1:ncol,:), fsnow_conv(1:ncol,:))
870+
call cloud_fraction_fice_run(ncol, state1%t(1:ncol,:), tmelt, top_lev, pver, fice(1:ncol,:), fsnow_conv(1:ncol,:), errmsg, errflg)
891871

892872
call zm_conv_evap_run(state1%ncol, pver, pverp, &
893873
gravit, latice, latvap, tmelt, &

0 commit comments

Comments
 (0)