Skip to content
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

cam6_3_146: ZM clean up in preparation for using via CCPP and remove zmconv_microp feature #890

Merged
merged 12 commits into from
Jan 23, 2024
2 changes: 1 addition & 1 deletion Externals_CAM.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ tag = ALI_ARMS_v1.0.1
required = True

[atmos_phys]
tag = atmos_phys0_01_000
tag = atmos_phys0_02_000
protocol = git
repo_url = https://github.com/ESCOMP/atmospheric_physics
required = True
Expand Down
1 change: 0 additions & 1 deletion bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -3500,7 +3500,6 @@ if (!$simple_phys) {
add_default($nl, 'zmconv_ke');
add_default($nl, 'zmconv_ke_lnd');
add_default($nl, 'zmconv_org');
add_default($nl, 'zmconv_microp');
add_default($nl, 'zmconv_num_cin');
add_default($nl, 'zmconv_dmpdz');
add_default($nl, 'zmconv_tiedke_add');
Expand Down
3 changes: 3 additions & 0 deletions bld/configure
Original file line number Diff line number Diff line change
Expand Up @@ -2250,6 +2250,9 @@ sub write_filepath
# in the list of filepaths.
print $fh "$camsrcdir/src/physics/cam\n";

#Add the CCPP'ized subdirectories
print $fh "$camsrcdir/src/atmos_phys/zm\n";

# Dynamics package and test utilities
print $fh "$camsrcdir/src/dynamics/$dyn\n";
if($dyn eq 'se') {
Expand Down
1 change: 0 additions & 1 deletion bld/namelist_files/namelist_defaults_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2795,7 +2795,6 @@
<zmconv_org > .false. </zmconv_org>
<zmconv_org zmconv_org="1" > .true. </zmconv_org>

<zmconv_microp > .false. </zmconv_microp>
<zmconv_num_cin > 5 </zmconv_num_cin>
<zmconv_num_cin phys="cam6" > 1 </zmconv_num_cin>
<zmconv_num_cin phys="cam_dev" > 1 </zmconv_num_cin>
Expand Down
6 changes: 0 additions & 6 deletions bld/namelist_files/namelist_definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3266,12 +3266,6 @@ if -zmconv_org is set in configure.
Default: .false., unless -zmconv_org set in configure
</entry>

<entry id="zmconv_microp" type="logical" category="conv"
group="zmconv_nl" valid_values="" >
Turn on convective microphysics
Default: .false.
</entry>

<entry id="zmconv_num_cin" type="integer" category="conv"
group="zmconv_nl" valid_values="" >
The number of negative buoyancy regions that are allowed before the convection top and CAPE calculations are completed.
Expand Down
20 changes: 0 additions & 20 deletions cime_config/testdefs/testlist_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -329,16 +329,6 @@
<option name="wallclock">00:30:00</option>
</options>
</test>
<!-- 112 tsm, ter, tbl -->
<test compset="QPC3" grid="T5_T5_mg37" name="ERC_D_Ln9_Vnuopc" testmods="cam/outfrq3s_usecase">
<machines>
<machine name="izumi" compiler="gnu" category="aux_cam"/>
</machines>
<options>
<option name="comment" >112 tsm, ter</option>
<option name="wallclock">00:30:00</option>
</options>
</test>
<!-- 113 tsm, ter, T8 -->
<test compset="QPC4" grid="T5_T5_mg37" name="ERC_D_Ln9_Vnuopc" testmods="cam/outfrq3s_usecase">
<machines>
Expand Down Expand Up @@ -519,16 +509,6 @@
<option name="wallclock">00:30:00</option>
</options>
</test>
<!-- 367 -->
<test compset="QPC6" grid="f10_f10_mg37" name="ERC_D_Ln9_Vnuopc" testmods="cam/outfrq3s_convmic">
<machines>
<machine name="izumi" compiler="nag" category="aux_cam"/>
</machines>
<options>
<option name="comment" >367 tsm, ter</option>
<option name="wallclock">00:30:00</option>
</options>
</test>
<!-- 368 -->
<test compset="QPC6" grid="f10_f10_mg37" name="ERC_D_Ln9_Vnuopc" testmods="cam/outfrq3s">
<machines>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

89 changes: 89 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,94 @@
===============================================================

Tag name: cam6_3_146
Originator(s): cacraig
Date: Jan 23, 2024
One-line Summary: ZM clean up in preparation for using via CCPP and remove zmconv_microp feature
Github PR URL: https://github.com/ESCOMP/CAM/pull/890

Purpose of changes (include the issue number and title text for each relevant GitHub issue):
- Work to make ZM compatible with CCPP conversion process
- Removed CAM3 switch from ZM in move to no longer support CAM3
- Remove microphysics embedded in ZM: https://github.com/ESCOMP/CAM/issues/889

Describe any changes made to build system: N/A

Describe any changes made to the namelist:
- removed zmconv_microp namelist

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, mwaxmonsky

List all files eliminated:
D src/physics/cam/zm_microphysics.F90
- removed zmconv_microp capability as it is not used

D src/physics/cam/zm_conv.F90
- moved ZM to ESCOMP/atcmospheric_physics and broke into separate modules

D cime_config/testdefs/testmods_dirs/cam/outfrq3s_convmic/shell_commands
D cime_config/testdefs/testmods_dirs/cam/outfrq3s_convmic/user_nl_cam
D cime_config/testdefs/testmods_dirs/cam/outfrq3s_convmic/user_nl_clm
D cime_config/testdefs/testmods_dirs/cam/outfrq3s_convmic/user_nl_cpl
- removed test which tested zmconv_microp

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

List all existing files that have been modified, and describe the changes:
M Externals_CAM.cfg
- updated ESCOMP/atmospheric_physics to bring in tag with ZM

M bld/build-namelist
M bld/namelist_files/namelist_defaults_cam.xml
M bld/namelist_files/namelist_definition.xml
M src/physics/cam/clubb_intr.F90
- removed zmconv_microp namelist and associated code

M bld/configure
- add location for src/atmos_phys/zm

M cime_config/testdefs/testlist_cam.xml
- removed test which tested zmconv_microp and CAM3

M src/physics/cam/macrop_driver.F90
- removed zmconv_microp namelist and associated code
- Changes needed to support ZM no longer having pcols dimension

M src/chemistry/modal_aero/modal_aero_convproc.F90
M src/physics/cam/cloud_fraction.F90
M src/physics/cam/convect_shallow.F90
M src/physics/cam/rk_stratiform.F90
M src/physics/spcam/crmclouds_camaerosols.F90
- Changes needed to support ZM no longer having pcols dimension

M src/physics/cam/zm_conv_intr.F90
- Changes to prepare this routine to support CCPP conversion
- Pass in variables which were being "use"d in ZM previously
- Only pass :ncol sections of arrays since pcols has been removed from ZM
- removed zmconv_microp namelist and associated code

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: all BFB except:
ERP_Ln9_Vnuopc.C96_C96_mg17.F2000climo.derecho_intel.cam-outfrq9s_mg3 (Overall: PEND) details:
ERP_Ln9_Vnuopc.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq9s (Overall: FAIL) details:
- preexisting failures

izumi/nag/aux_cam: all BFB except:
DAE_Vnuopc.f45_f45_mg37.FHS94.izumi_nag.cam-dae (Overall: FAIL) details:
- preexisting failure

izumi/gnu/aux_cam: all BFB

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

Tag name: cam6_3_145
Originator(s): katetc, cacraigucar, andrewgettelman
Date: 05 Jan 2024
Expand Down
4 changes: 3 additions & 1 deletion src/chemistry/modal_aero/modal_aero_convproc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ subroutine ma_convproc_dp_intr( &

integer :: i
integer :: itmpveca(pcols)
integer :: l, lchnk, lun
integer :: l, lchnk, lun, ncol
integer :: nstep

real(r8) :: dpdry(pcols,pver) ! layer delta-p-dry (mb)
Expand Down Expand Up @@ -565,6 +565,7 @@ subroutine ma_convproc_dp_intr( &
! Initialize

lchnk = state%lchnk
ncol = state%ncol
nstep = get_nstep()
lun = iulog

Expand All @@ -587,6 +588,7 @@ subroutine ma_convproc_dp_intr( &
call pbuf_get_field(pbuf, zm_ideep_idx, ideep)

lengath = count(ideep > 0)
if (lengath > ncol) lengath = ncol ! should not happen, but force it to not be larger than ncol for safety sake

fracice(:,:) = 0.0_r8

Expand Down
6 changes: 3 additions & 3 deletions src/physics/cam/cloud_fraction.F90
Original file line number Diff line number Diff line change
Expand Up @@ -751,10 +751,10 @@ subroutine cldfrc_fice(ncol, t, fice, fsnow)

! Arguments
integer, intent(in) :: ncol ! number of active columns
real(r8), intent(in) :: t(pcols,pver) ! temperature
real(r8), intent(in) :: t(:,:) ! temperature

real(r8), intent(out) :: fice(pcols,pver) ! Fractional ice content within cloud
real(r8), intent(out) :: fsnow(pcols,pver) ! Fractional snow content for convection
real(r8), intent(out) :: fice(:,:) ! Fractional ice content within cloud
real(r8), intent(out) :: fsnow(:,:) ! Fractional snow content for convection

! Local variables
real(r8) :: tmax_fice ! max temperature for cloud ice formation
Expand Down
Loading