diff --git a/.gitmodules b/.gitmodules
index 4600960184..babfeebb6c 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -35,8 +35,8 @@
[submodule "atmos_phys"]
path = src/atmos_phys
- url = https://github.com/ESCOMP/atmospheric_physics
- fxtag = atmos_phys0_03_000
+ url = https://github.com/ESCOMP/atmospheric_physics
+ fxtag = atmos_phys0_04_000
fxrequired = AlwaysRequired
fxDONOTUSEurl = https://github.com/ESCOMP/atmospheric_physics
@@ -96,7 +96,7 @@
url = https://github.com/larson-group/clubb_release
fxrequired = AlwaysRequired
fxsparse = ../.clubb_sparse_checkout
- fxtag = clubb_4ncar_20231115_5406350
+ fxtag = clubb_4ncar_20240605_73d60f6_gpufixes_posinf
fxDONOTUSEurl = https://github.com/larson-group/clubb_release
[submodule "cism"]
@@ -151,7 +151,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/CMEPS.git
[submodule "cdeps"]
path = components/cdeps
url = https://github.com/ESCOMP/CDEPS.git
-fxtag = cdeps1.0.43
+fxtag = cdeps1.0.45
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESCOMP/CDEPS.git
diff --git a/bld/build-namelist b/bld/build-namelist
index 7a5c8c1132..61b912c29d 100755
--- a/bld/build-namelist
+++ b/bld/build-namelist
@@ -3187,9 +3187,10 @@ if (($chem ne 'none') and ($chem ne 'terminator') and !($chem =~ /geoschem/)) {
# Deep convection scheme
add_default($nl, 'deep_scheme');
+my $deep_scheme = $nl->get_value('deep_scheme');
# Aerosol convective processes
-if (($phys =~ /cam6/ or $phys =~ /cam7/) and $nl->get_value('deep_scheme') =~ /ZM/) {
+if (($phys =~ /cam6/ or $phys =~ /cam7/) and $deep_scheme =~ /ZM/) {
add_default($nl, 'convproc_do_aer', 'val'=>'.true.');
add_default($nl, 'convproc_do_evaprain_atonce', 'val'=>'.true.');
add_default($nl, 'convproc_pom_spechygro', 'val'=>'0.2D0');
@@ -3197,7 +3198,7 @@ if (($phys =~ /cam6/ or $phys =~ /cam7/) and $nl->get_value('deep_scheme') =~ /Z
}
# cam7 specific namelists
-if ($phys =~ /cam7/ and $nl->get_value('deep_scheme') =~ /ZM/) {
+if ($phys =~ /cam7/ and $deep_scheme =~ /ZM/) {
add_default($nl, 'zmconv_parcel_pbl', 'val'=>'.true.');
} else {
add_default($nl, 'zmconv_parcel_pbl', 'val'=>'.false.');
@@ -3791,12 +3792,13 @@ if (!$simple_phys) {
add_default($nl, 'gw_rdg_do_divstream' , 'val'=>'.true.');
}
+my $use_gw_convect_dp = '.false.';
if ($waccm_phys or
(!$simple_phys and $cfg->get('model_top') eq 'mt')) {
# Spectral gravity waves are part of WACCM physics, and also drive the
# QBO in the high vertical resolution configuration.
add_default($nl, 'use_gw_front' , 'val'=>'.true.');
- add_default($nl, 'use_gw_convect_dp', 'val'=>'.true.');
+ $use_gw_convect_dp = '.true.';
my $hdepth_scaling = '0.25D0' ;
my $qbo_forcing = '.false.';
if ($dyn eq 'fv') {
@@ -3818,12 +3820,16 @@ if ($waccm_phys or
} elsif ($phys =~ /cam7/) {
# cam7 settings for model_top = 'lt'
add_default($nl, 'use_gw_front' , 'val'=>'.true.');
- add_default($nl, 'use_gw_convect_dp', 'val'=>'.true.');
+ $use_gw_convect_dp = '.true.';
add_default($nl, 'gw_qbo_hdepth_scaling', 'val'=>'1.0D0');
} else {
add_default($nl, 'use_gw_front' , 'val'=>'.false.');
- add_default($nl, 'use_gw_convect_dp', 'val'=>'.false.');
}
+# Check if deep convection scheme used. If not set use_gw_convect_dp=.false.
+if ($deep_scheme =~ /off/) {
+ $use_gw_convect_dp = '.false.';
+}
+add_default($nl, 'use_gw_convect_dp', 'val'=>$use_gw_convect_dp);
# We need a lot of logic to use these below, so make flags for them.
my $do_gw_oro = ($nl->get_value('use_gw_oro') =~ /$TRUE/io);
diff --git a/bld/configure b/bld/configure
index a5bb9da324..3c99ef5697 100755
--- a/bld/configure
+++ b/bld/configure
@@ -2329,6 +2329,7 @@ sub write_filepath
#Add the CCPP'ized subdirectories
print $fh "$camsrcdir/src/atmos_phys/zhang_mcfarlane\n";
+ print $fh "$camsrcdir/src/atmos_phys/dry_adiabatic_adjust\n";
# Dynamics package and test utilities
print $fh "$camsrcdir/src/dynamics/$dyn\n";
diff --git a/bld/namelist_files/namelist_defaults_cam.xml b/bld/namelist_files/namelist_defaults_cam.xml
index c330ad13a2..ddb1505ad1 100644
--- a/bld/namelist_files/namelist_defaults_cam.xml
+++ b/bld/namelist_files/namelist_defaults_cam.xml
@@ -2241,6 +2241,7 @@
.false.
.true.
.true.
+
.true.
0.2
@@ -2266,6 +2267,7 @@
10.0
4.0
0.0
+ 5.0
.true.
.false.
@@ -2284,6 +2286,8 @@
.false.
.false.
.false.
+ 0.5
+ 25.00
diff --git a/bld/namelist_files/use_cases/waccm_sc_2000_cam6.xml b/bld/namelist_files/use_cases/waccm_sc_2000_cam6.xml
index cdb217a987..040cf5acfc 100644
--- a/bld/namelist_files/use_cases/waccm_sc_2000_cam6.xml
+++ b/bld/namelist_files/use_cases/waccm_sc_2000_cam6.xml
@@ -21,8 +21,8 @@
'CO2','CH4','N2O','CFC11','CFC12','CFC11eq'
-FIXED
-20000101
+CYCLICAL
+2000
SCWACCM_forcing_WACCM6_zm_5day_L70_1975-2014_c191121.nc
atm/waccm/waccm_forcing
diff --git a/bld/namelist_files/use_cases/waccm_sc_2010_cam6.xml b/bld/namelist_files/use_cases/waccm_sc_2010_cam6.xml
index d878ba8f6d..a77688d0f1 100644
--- a/bld/namelist_files/use_cases/waccm_sc_2010_cam6.xml
+++ b/bld/namelist_files/use_cases/waccm_sc_2010_cam6.xml
@@ -21,8 +21,8 @@
'CO2','CH4','N2O','CFC11','CFC12','CFC11eq'
-FIXED
-20100101
+CYCLICAL
+2010
SCWACCM_forcing_WACCM6_zm_5day_L70_1975-2014_c191121.nc
atm/waccm/waccm_forcing
diff --git a/cime_config/testdefs/testlist_cam.xml b/cime_config/testdefs/testlist_cam.xml
index 99241b39c7..2e9445c61e 100644
--- a/cime_config/testdefs/testlist_cam.xml
+++ b/cime_config/testdefs/testlist_cam.xml
@@ -1480,6 +1480,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1542,51 +1560,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg2_default/shell_commands b/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg2_default/shell_commands
deleted file mode 100644
index 89516e5375..0000000000
--- a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg2_default/shell_commands
+++ /dev/null
@@ -1,7 +0,0 @@
-./xmlchange NTASKS=36
-./xmlchange NTHRDS=1
-./xmlchange ROOTPE='0'
-./xmlchange ROF_NCPL=`./xmlquery --value ATM_NCPL`
-./xmlchange GLC_NCPL=`./xmlquery --value ATM_NCPL`
-./xmlchange TIMER_DETAIL='6'
-./xmlchange TIMER_LEVEL='999'
diff --git a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_default/shell_commands b/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_default/shell_commands
index 9fdcee8bfd..23dac55242 100644
--- a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_default/shell_commands
+++ b/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_default/shell_commands
@@ -1,4 +1,4 @@
-./xmlchange NTASKS=36
+./xmlchange NTASKS=128
./xmlchange NTHRDS=1
./xmlchange ROOTPE='0'
./xmlchange ROF_NCPL=`./xmlquery --value ATM_NCPL`
diff --git a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_nondefault/shell_commands b/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_nondefault/shell_commands
deleted file mode 100644
index 9fdcee8bfd..0000000000
--- a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_nondefault/shell_commands
+++ /dev/null
@@ -1,8 +0,0 @@
-./xmlchange NTASKS=36
-./xmlchange NTHRDS=1
-./xmlchange ROOTPE='0'
-./xmlchange ROF_NCPL=`./xmlquery --value ATM_NCPL`
-./xmlchange GLC_NCPL=`./xmlquery --value ATM_NCPL`
-./xmlchange CAM_CONFIG_OPTS=' -microphys mg3' --append
-./xmlchange TIMER_DETAIL='6'
-./xmlchange TIMER_LEVEL='999'
diff --git a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_nondefault/user_nl_cam b/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_nondefault/user_nl_cam
deleted file mode 100644
index 8bb09f9ffc..0000000000
--- a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_nondefault/user_nl_cam
+++ /dev/null
@@ -1,24 +0,0 @@
-mfilt=1,1,1,1,1,1
-ndens=1,1,1,1,1,1
-nhtfrq=9,9,9,9,9,9
-inithist='ENDOFRUN'
-micro_mg_do_graupel=.false.
-micro_mg_do_hail=.true.
-micro_do_sb_physics=.true.
-micro_do_massless_droplet_destroyer=.true.
-microp_uniform=.true.
-micro_mg_nccons=.true.
-micro_mg_nicons=.true.
-micro_mg_ngcons=.true.
-micro_mg_nrcons=.true.
-micro_mg_nscons=.true.
-micro_mg_evap_sed_off=.true.
-micro_mg_icenuc_rh_off=.true.
-micro_mg_icenuc_use_meyers=.true.
-micro_mg_evap_scl_ifs=.true.
-micro_mg_evap_rhthrsh_ifs=.true.
-micro_mg_rainfreeze_ifs=.true.
-micro_mg_ifs_sed=.true.
-micro_mg_precip_fall_corr=.true.
-micro_mg_implicit_fall=.false.
-micro_mg_accre_sees_auto=.true.
diff --git a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_nondefault/user_nl_clm b/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_nondefault/user_nl_clm
deleted file mode 100644
index 12d5a36d2b..0000000000
--- a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_nondefault/user_nl_clm
+++ /dev/null
@@ -1,26 +0,0 @@
-!----------------------------------------------------------------------------------
-! Users should add all user specific namelist changes below in the form of
-! namelist_var = new_namelist_value
-!
-! Include namelist variables for drv_flds_in ONLY if -megan and/or -drydep options
-! are set in the CLM_NAMELIST_OPTS env variable.
-!
-! EXCEPTIONS:
-! Set use_cndv by the compset you use and the CLM_BLDNML_OPTS -dynamic_vegetation setting
-! Set use_vichydro by the compset you use and the CLM_BLDNML_OPTS -vichydro setting
-! Set use_cn by the compset you use and CLM_BLDNML_OPTS -bgc setting
-! Set use_crop by the compset you use and CLM_BLDNML_OPTS -crop setting
-! Set spinup_state by the CLM_BLDNML_OPTS -bgc_spinup setting
-! Set irrigate by the CLM_BLDNML_OPTS -irrig setting
-! Set dtime with L_NCPL option
-! Set fatmlndfrc with LND_DOMAIN_PATH/LND_DOMAIN_FILE options
-! Set finidat with RUN_REFCASE/RUN_REFDATE/RUN_REFTOD options for hybrid or branch cases
-! (includes $inst_string for multi-ensemble cases)
-! Set glc_grid with CISM_GRID option
-! Set glc_smb with GLC_SMB option
-! Set maxpatch_glcmec with GLC_NEC option
-! Set glc_do_dynglacier with GLC_TWO_WAY_COUPLING env variable
-!----------------------------------------------------------------------------------
-hist_nhtfrq = 9
-hist_mfilt = 1
-hist_ndens = 1
diff --git a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_pcols1536/user_nl_cam b/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_pcols1536/user_nl_cam
deleted file mode 100644
index 8482082dce..0000000000
--- a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_pcols1536/user_nl_cam
+++ /dev/null
@@ -1,4 +0,0 @@
-mfilt=1,1,1,1,1,1
-ndens=1,1,1,1,1,1
-nhtfrq=9,9,9,9,9,9
-inithist='ENDOFRUN'
diff --git a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_pcols1536/user_nl_clm b/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_pcols1536/user_nl_clm
deleted file mode 100644
index 12d5a36d2b..0000000000
--- a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_pcols1536/user_nl_clm
+++ /dev/null
@@ -1,26 +0,0 @@
-!----------------------------------------------------------------------------------
-! Users should add all user specific namelist changes below in the form of
-! namelist_var = new_namelist_value
-!
-! Include namelist variables for drv_flds_in ONLY if -megan and/or -drydep options
-! are set in the CLM_NAMELIST_OPTS env variable.
-!
-! EXCEPTIONS:
-! Set use_cndv by the compset you use and the CLM_BLDNML_OPTS -dynamic_vegetation setting
-! Set use_vichydro by the compset you use and the CLM_BLDNML_OPTS -vichydro setting
-! Set use_cn by the compset you use and CLM_BLDNML_OPTS -bgc setting
-! Set use_crop by the compset you use and CLM_BLDNML_OPTS -crop setting
-! Set spinup_state by the CLM_BLDNML_OPTS -bgc_spinup setting
-! Set irrigate by the CLM_BLDNML_OPTS -irrig setting
-! Set dtime with L_NCPL option
-! Set fatmlndfrc with LND_DOMAIN_PATH/LND_DOMAIN_FILE options
-! Set finidat with RUN_REFCASE/RUN_REFDATE/RUN_REFTOD options for hybrid or branch cases
-! (includes $inst_string for multi-ensemble cases)
-! Set glc_grid with CISM_GRID option
-! Set glc_smb with GLC_SMB option
-! Set maxpatch_glcmec with GLC_NEC option
-! Set glc_do_dynglacier with GLC_TWO_WAY_COUPLING env variable
-!----------------------------------------------------------------------------------
-hist_nhtfrq = 9
-hist_mfilt = 1
-hist_ndens = 1
diff --git a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_pcols1536/shell_commands b/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_pcols760/shell_commands
similarity index 70%
rename from cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_pcols1536/shell_commands
rename to cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_pcols760/shell_commands
index d6e6750eb4..f9424e5025 100644
--- a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_pcols1536/shell_commands
+++ b/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_pcols760/shell_commands
@@ -1,8 +1,8 @@
-./xmlchange NTASKS=36
+./xmlchange NTASKS=64
./xmlchange NTHRDS=1
./xmlchange ROOTPE='0'
./xmlchange ROF_NCPL=`./xmlquery --value ATM_NCPL`
./xmlchange GLC_NCPL=`./xmlquery --value ATM_NCPL`
-./xmlchange CAM_CONFIG_OPTS=' -microphys mg3 -pcols 1536' --append
+./xmlchange CAM_CONFIG_OPTS=' -microphys mg3 -pcols 760 ' --append
./xmlchange TIMER_DETAIL='6'
./xmlchange TIMER_LEVEL='999'
diff --git a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg2_default/user_nl_cam b/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_pcols760/user_nl_cam
similarity index 100%
rename from cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg2_default/user_nl_cam
rename to cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_pcols760/user_nl_cam
diff --git a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg2_default/user_nl_clm b/cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_pcols760/user_nl_clm
similarity index 100%
rename from cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg2_default/user_nl_clm
rename to cime_config/testdefs/testmods_dirs/cam/outfrq9s_mg3_pcols760/user_nl_clm
diff --git a/components/cdeps b/components/cdeps
index 453a9d175a..46c10740ce 160000
--- a/components/cdeps
+++ b/components/cdeps
@@ -1 +1 @@
-Subproject commit 453a9d175a5739d9cca5c4ec7b96f45b201decec
+Subproject commit 46c10740ce83a154edfc876093f72e7f041c3659
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 93142a1a4a..767aea7463 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,5 +1,427 @@
===============================================================
+Tag name:
+Originator(s): jedwards, eaton
+Date:
+One-line Summary: fix issue #1108, merge PR#1101
+Github PR URL: https://github.com/ESCOMP/CAM/pull/1122
+
+Purpose of changes (include the issue number and title text for each relevant GitHub issue):
+
+Issue #1108 - More robust logic in gw_drag.F90 when deep_scheme='off'
+- Modify build-namelist to set use_gw_convect_dp=.false. when
+ deep_scheme='off'. In gw_drag::gw_tend check whether field TTEND_DP is
+ in the pbuf. If so then associate the ttend_dp pointer. If not then
+ allocate the ttend_dp pointer and set to zero.
+
+PR #1101 - improved fix for rh write performance
+- reorder output fields. Merge Jim's PR into this one.
+
+
+
+Describe any changes made to build system:
+
+Describe any changes made to the namelist:
+. build-namelist now sets use_gw_convect_dp=.false. when deep_scheme='off'.
+
+List any changes to the defaults for the boundary datasets:
+
+Describe any substantial timing or memory changes:
+
+Code reviewed by: peverwhee
+
+List all files eliminated:
+
+List all files added and what they do:
+
+List all existing files that have been modified, and describe the changes:
+
+bld/build-namelist
+. add check to set use_gw_convect_dp=.false. when deep_scheme='off'.
+
+src/control/cam_history.F90
+. The variables in the restart history files are reordered so that the nacs
+ variables are all written together rather than being next to their
+ corresponding fields.
+
+src/physics/cam/gw_drag.F90
+. check that field TTEND_DP is in the pbuf before trying to associate the
+ pointer ttend_dp. If TTEND_DP is not in pbuf then allocate the ttend_dp
+ pointer and fill with zeros.
+
+
+
+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:
+
+izumi/nag/aux_cam:
+
+izumi/gnu/aux_cam:
+
+CAM tag used for the baseline comparison tests if different than previous
+tag:
+
+Summarize any changes to answers:
+
+===============================================================
+===============================================================
+
+Tag name: cam6_4_021
+Originator(s): jet
+Date: 16 Aug 2024
+One-line Summary: CCPPize dadadj
+Github PR URL: https://github.com/ESCOMP/CAM/pull/1026
+
+Purpose of changes (include the issue number and title text for each relevant GitHub issue):
+ - Issue #928 - Convert Dry Adiabatic Adjustment to CCPP and move into the atmospheric_physics github repo
+ - Bugfix to dadadj although it didn't change answers in the regression suite.
+
+Describe any changes made to build system: add atmos_phys/dry_adiabatic_adjust directory to build filepath
+
+Describe any changes made to the namelist: none
+
+List any changes to the defaults for the boundary datasets: none
+
+Describe any substantial timing or memory changes: none
+
+Code reviewed by: cacraigucar, nusbaume
+
+List all files eliminated:
+D physics/cam/dadadj.F90
+
+List all files added and what they do: none
+
+List all existing files that have been modified, and describe the changes:
+
+M .gitmodules
+ - update to atmospheric_physics tag with new dry_adiabatic_adjust ccpp routine
+
+M bld/configure
+ - Add dry_adiabatic_adjust to build Filepath
+M src/cam_snapshot_common.F90
+ - update pbuf_snapshot fields from 250 to 300
+M physics/cam/dadadj_cam.F90
+ - CCPP'ize dadadj interface
+M physics/physpkg.F90
+M physics/cam7/physpkg.F90
+ - update subroutine name for cam dadadj initialization
+
+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) details:
+- pre-existing failure due to HEMCO not having reproducible results issues #1018 and #856
+
+SMS_D_Ln9_P1280x1.ne0ARCTICne30x4_ne0ARCTICne30x4_mt12.FHIST.derecho_intel.cam-outfrq9s (Overall: FAIL) details:
+SMS_D_Ln9_P1280x1.ne0CONUSne30x8_ne0CONUSne30x8_mt12.FCHIST.derecho_intel.cam-outfrq9s (Overall: PEND) details:
+- pre-existing failures -- need fix in CLM external
+
+SMS_D_Ln9.T42_T42.FSCAM.derecho_intel.cam-outfrq9s (Overall: FAIL) details:
+- pre-existing failure -- need fix in CICE external
+
+derecho/nvphc/aux_cam: All Pass
+
+izumi/nag/aux_cam:
+DAE.f45_f45_mg37.FHS94.izumi_nag.cam-dae (Overall: FAIL) details:
+- pre-existing failure - issue #670
+
+
+izumi/gnu/aux_cam: All Pass
+
+CAM tag used for the baseline comparison tests if different than previous
+tag:
+
+Summarize any changes to answers: BFB, as expected
+
+===============================================================
+
+Tag name: cam6_4_020
+Originator(s): fvitt
+Date: 14 Aug 2024
+One-line Summary: Correction to aerosol convective removal and other misc fixes
+Github PR URL: https://github.com/ESCOMP/CAM/pull/1111
+
+Purpose of changes (include the issue number and title text for each relevant GitHub issue):
+
+ Fixes to the follow:
+ . an error in the calculation of dz in the aerosol convective removal code
+ . issue #1030 -- Incorrect waccm_forcing namelist settings in FWsc2000climo and FWsc2010climo compsets
+ . issue #1125 -- archive_baselines does not append compiler onto derecho baselines properly
+
+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: cacraigucar
+
+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 bld/namelist_files/use_cases/waccm_sc_2000_cam6.xml
+M bld/namelist_files/use_cases/waccm_sc_2010_cam6.xml
+ - corrections to waccm_forcing namelist settings
+
+M src/chemistry/modal_aero/modal_aero_convproc.F90
+ - correctly calculate dz
+ - misc code clean up
+
+M test/system/archive_baseline.sh
+ - append compiler name to tag name used in baseline path
+
+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:
+ FAIL ERP_Ln9.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq9s
+ - pre-existing failure due to HEMCO not having reproducible results issues #1018 and #856
+
+ FAIL SMS_D_Ln9.T42_T42.FSCAM.derecho_intel.cam-outfrq9s
+ - pre-existing failure -- need fix in CICE external
+
+ PEND SMS_D_Ln9_P1280x1.ne0ARCTICne30x4_ne0ARCTICne30x4_mt12.FHIST.derecho_intel.cam-outfrq9s
+ PEND SMS_D_Ln9_P1280x1.ne0CONUSne30x8_ne0CONUSne30x8_mt12.FCHIST.derecho_intel.cam-outfrq9s
+ - pre-existing failures -- need fix in CLM external
+
+ DIFF ERC_D_Ln9.f19_f19_mg17.QPC6.derecho_intel.cam-outfrq3s_cosp
+ DIFF ERC_D_Ln9_P144x1.ne16pg3_ne16pg3_mg17.QPC6HIST.derecho_intel.cam-outfrq3s_ttrac_usecase
+ DIFF ERP_D_Ln9.f19_f19_mg17.QPC6.derecho_intel.cam-outfrq9s
+ DIFF ERP_D_Ln9.ne30pg3_ne30pg3_mg17.FLTHIST.derecho_intel.cam-outfrq9s
+ DIFF ERP_D_Ln9.ne30pg3_ne30pg3_mg17.FLTHIST.derecho_intel.cam-outfrq9s_rrtmgp
+ DIFF ERP_D_Ln9_P64x2.f09_f09_mg17.QSC6.derecho_intel.cam-outfrq9s
+ DIFF ERP_Ld3.f09_f09_mg17.FWHIST.derecho_intel.cam-reduced_hist1d
+ DIFF ERP_Ln9.C96_C96_mg17.F2000climo.derecho_intel.cam-outfrq9s_mg3
+ DIFF ERP_Ln9.f09_f09_mg17.F1850.derecho_intel.cam-outfrq9s
+ DIFF ERP_Ln9.f09_f09_mg17.F2000climo.derecho_intel.cam-outfrq9s
+ DIFF ERP_Ln9.f09_f09_mg17.F2010climo.derecho_intel.cam-outfrq9s
+ DIFF ERP_Ln9.f09_f09_mg17.FHIST_BDRD.derecho_intel.cam-outfrq9s
+ DIFF ERP_Ln9.f19_f19_mg17.FWsc1850.derecho_intel.cam-outfrq9s
+ DIFF ERP_Ln9.ne30pg3_ne30pg3_mg17.FCnudged.derecho_intel.cam-outfrq9s
+ DIFF ERP_Ln9.ne30pg3_ne30pg3_mg17.FW2000climo.derecho_intel.cam-outfrq9s
+ DIFF ERP_Ln9_P24x3.f45_f45_mg37.QPWmaC6.derecho_intel.cam-outfrq9s_mee_fluxes
+ DIFF ERS_Ld3.f10_f10_mg37.F1850.derecho_intel.cam-outfrq1d_14dec_ghg_cam7
+ DIFF ERS_Ln9.f09_f09_mg17.FX2000.derecho_intel.cam-outfrq9s
+ DIFF ERS_Ln9.f19_f19_mg17.FXSD.derecho_intel.cam-outfrq9s
+ DIFF ERS_Ln9_P288x1.mpasa120_mpasa120.F2000climo.derecho_intel.cam-outfrq9s_mpasa120
+ DIFF ERS_Ln9_P36x1.mpasa480_mpasa480.F2000climo.derecho_intel.cam-outfrq9s_mpasa480
+ DIFF SMS_D_Ln9.f09_f09_mg17.FCts2nudged.derecho_intel.cam-outfrq9s_leapday
+ DIFF SMS_D_Ln9.f09_f09_mg17.FCvbsxHIST.derecho_intel.cam-outfrq9s
+ DIFF SMS_D_Ln9.f09_f09_mg17.FSD.derecho_intel.cam-outfrq9s
+ DIFF SMS_D_Ln9.f19_f19_mg17.FWma2000climo.derecho_intel.cam-outfrq9s
+ DIFF SMS_D_Ln9.f19_f19_mg17.FWma2000climo.derecho_intel.cam-outfrq9s_waccm_ma_mam4
+ DIFF SMS_D_Ln9.f19_f19_mg17.FXHIST.derecho_intel.cam-outfrq9s_amie
+ DIFF SMS_D_Ln9.f19_f19_mg17.QPC2000climo.derecho_intel.cam-outfrq3s_usecase
+ DIFF SMS_D_Ln9.ne16pg3_ne16pg3_mg17.FX2000.derecho_intel.cam-outfrq9s
+ DIFF SMS_D_Ln9.ne30pg3_ne30pg3_mg17.FCts4MTHIST.derecho_intel.cam-outfrq9s
+ DIFF SMS_D_Ln9.ne30pg3_ne30pg3_mg17.FMTHIST.derecho_intel.cam-outfrq9s
+ DIFF SMS_D_Ln9_P1280x1.ne30pg3_ne30pg3_mg17.FCLTHIST.derecho_intel.cam-outfrq9s
+ DIFF SMS_Ld1.f09_f09_mg17.FCHIST_GC.derecho_intel.cam-outfrq1d
+ DIFF SMS_Ld1.f09_f09_mg17.FW2000climo.derecho_intel.cam-outfrq1d
+ DIFF SMS_Ld1.ne30pg3_ne30pg3_mg17.FC2010climo.derecho_intel.cam-outfrq1d
+ DIFF SMS_Lh12.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq3h
+ DIFF SMS_Lm13.f10_f10_mg37.F2000climo.derecho_intel.cam-outfrq1m
+ DIFF SMS_Ln9.f09_f09_mg17.F2010climo.derecho_intel.cam-nudging
+ DIFF SMS_Ln9.f09_f09_mg17.FW1850.derecho_intel.cam-reduced_hist3s
+ DIFF SMS_Ln9.ne30pg3_ne30pg3_mg17.FW2000climo.derecho_intel.cam-outfrq9s_rrtmgp
+ - expected baseline test failures due to correction in modal_aero_convproc
+
+derecho/nvhpc/aux_cam:
+ DIFF ERS_Ln9_G4-a100-openacc.ne30pg3_ne30pg3_mg17.F2000dev.derecho_nvhpc.cam-outfrq9s_mg3_default
+ - expected baseline test failure due to correction in modal_aero_convproc
+
+izumi/nag/aux_cam:
+ FAIL DAE.f45_f45_mg37.FHS94.izumi_nag.cam-dae
+ - pre-existing failure - issue #670
+
+ DIFF ERC_D_Ln9.f10_f10_mg37.QPC6.izumi_nag.cam-outfrq3s_am
+ DIFF ERC_D_Ln9.f10_f10_mg37.QPC6.izumi_nag.cam-outfrq3s_cospsathist
+ DIFF ERC_D_Ln9.f10_f10_mg37.QPC6.izumi_nag.cam-outfrq3s
+ DIFF ERC_D_Ln9.f10_f10_mg37.QPWmaC6.izumi_nag.cam-outfrq3s
+ DIFF ERI_D_Ln18.f19_f19_mg17.QPC6.izumi_nag.cam-ghgrmp_e8
+ DIFF SMS_P48x1_D_Ln3.f09_f09_mg17.QPC6HIST.izumi_nag.cam-outfrq3s_co2cycle_usecase
+ - expected baseline test failures due to correction in modal_aero_convproc
+
+izumi/gnu/aux_cam:
+ DIFF ERP_D_Ln9.C48_C48_mg17.QPC6.izumi_gnu.cam-outfrq9s
+ DIFF ERP_D_Ln9.ne3pg3_ne3pg3_mg37.QPC6.izumi_gnu.cam-outfrq9s_rrtmgp
+ DIFF SCT_D_Ln7.T42_T42_mg17.QPC6.izumi_gnu.cam-scm_prep_c6
+ - expected baseline test failures due to correction in modal_aero_convproc
+
+Summarize any changes to answers:
+ larger than roundoff but same climate
+
+URL for AMWG diagnostics output used to validate new climate:
+
+ https://acomstaff.acom.ucar.edu/tilmes/amwg/cam7/f.e23_beta02.FLTHIST_ne30.conv_dz_bug_1995_2004_vs_f.e23_beta02.FLTHIST_ne30.001_1995_2004/website/index.html
+ https://acomstaff.acom.ucar.edu/tilmes/amwg/cam7/f.cam6_3_160.FMTHIST_ne30.moving_mtn.output.conv7_1996_2004_vs_f.cam6_3_160.FMTHIST_ne30.moving_mtn.output.conv6_1996_2004/website/html_table/mean_tables.html
+
+===============================================================
+===============================================================
+
+Tag name: cam6_4_019
+Originator(s): katec, cacraig, vlarson, bstephens82, huebleruwm, zarzycki, JulioTBacmeister, jedwards4b
+Date: 12 August 2024
+One-line Summary: New CLUBB external, new GPU/nvhpc test suite, new CDEPS external
+Github PR URL: https://github.com/ESCOMP/CAM/pull/1086
+
+Purpose of changes (include the issue number and title text for each relevant GitHub issue):
+ - New CLUBB external with fixes to support GPU testing #1036
+ - part of cam6_4_019: Add GPU regression test suite #1048
+
+Describe any changes made to build system: none
+
+Describe any changes made to the namelist:
+ - Add default vaules for a few new CLUBB namelist parameters: clubb_bv_efold, clubb_wpxp_Ri_exp, and clubb_z_displace
+
+List any changes to the defaults for the boundary datasets: none
+
+Describe any substantial timing or memory changes: none
+
+Code reviewed by: cacraigucar, sjsprecious, adamrher, bstephens82
+
+List all files eliminated:
+ cime/config/testmods_dirs/cam/outfrq9s_mg3_nondefault/shell_comands
+ cime/config/testmods_dirs/cam/outfrq9s_mg3_nondefault/user_nl_cam
+ cime/config/testmods_dirs/cam/outfrq9s_mg3_nondefault/user_nl_clm
+ - Removed as part of GPU test updates
+
+List all files added and what they do: None
+
+List all existing files that have been modified, and describe the changes:
+ .gitmodules
+ - Point to new CLUBB external (clubb_4ncar_20240605_73d60f6_gpufixes_posinf)
+ and new CDEPS external (cdeps1.0.45)
+
+ cime/config/testdefs/testlist_cam.xml
+ - Add nvhpc gpu test on Derecho, remove Casper tests
+
+ cime/config/testdefs/testmods_dirs/cam/outfrq9s_mg2_default/shell_commands
+ cime/config/testdefs/testmods_dirs/cam/outfrq9s_mg3_default/shell_commands
+ - Change NTASKS for Derecho gpus
+
+ cime/config/testdefs/testmods_dirs/cam/outfrq9s_mg3_pcols1536/
+ - Directory renamed to cime/config/testdefs/testmods_dirs/cam/outfrq9s_mg3_pcols760
+ - Files updated to reflect the change
+
+ doc/ChangeLog_template
+ - Added space for new derecho/nvhpc required tests
+
+ src/physics/cam/clubb_intr.F90
+ src/physics/cam/subcol_SILHS.F90
+ - Updates to support the new external
+
+ test/system/archive_baseline.sh
+ test/system/test_driver.sh
+ - Updates to require CAM_FC compiler specification on Derecho (either intel or nvhpc)
+
+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) details:
+- pre-existing failure due to HEMCO not having reproducible results issues #1018 and #856
+
+SMS_D_Ln9_P1280x1.ne0ARCTICne30x4_ne0ARCTICne30x4_mt12.FHIST.derecho_intel.cam-outfrq9s (Overall: FAIL) details:
+SMS_D_Ln9_P1280x1.ne0CONUSne30x8_ne0CONUSne30x8_mt12.FCHIST.derecho_intel.cam-outfrq9s (Overall: PEND) details:
+- pre-existing failures -- need fix in CLM external
+
+SMS_D_Ln9.T42_T42.FSCAM.derecho_intel.cam-outfrq9s (Overall: FAIL) details:
+- pre-existing failure -- need fix in CICE external
+
+ERC_D_Ln9.f19_f19_mg17.QPC6.derecho_intel.cam-outfrq3s_cosp (Overall: DIFF) details:
+ERC_D_Ln9_P144x1.ne16pg3_ne16pg3_mg17.QPC6HIST.derecho_intel.cam-outfrq3s_ttrac_usecase (Overall: DIFF) details:
+ERP_D_Ln9.f19_f19_mg17.QPC6.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
+ERP_D_Ln9.ne30pg3_ne30pg3_mg17.FLTHIST.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
+ERP_D_Ln9.ne30pg3_ne30pg3_mg17.FLTHIST.derecho_intel.cam-outfrq9s_rrtmgp (Overall: DIFF) details:
+ERP_D_Ln9_P64x2.f09_f09_mg17.QSC6.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
+ERP_Ld3.f09_f09_mg17.FWHIST.derecho_intel.cam-reduced_hist1d (Overall: DIFF) details:
+ERP_Ln9.C96_C96_mg17.F2000climo.derecho_intel.cam-outfrq9s_mg3 (Overall: DIFF) details:
+ERP_Ln9.f09_f09_mg17.F1850.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
+ERP_Ln9.f09_f09_mg17.F2000climo.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
+ERP_Ln9.f09_f09_mg17.F2010climo.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
+ERP_Ln9.f09_f09_mg17.FHIST_BDRD.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
+ERP_Ln9.f19_f19_mg17.FWsc1850.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
+ERP_Ln9.ne30pg3_ne30pg3_mg17.FCnudged.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
+ERP_Ln9.ne30pg3_ne30pg3_mg17.FW2000climo.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
+ERP_Ln9_P24x3.f45_f45_mg37.QPWmaC6.derecho_intel.cam-outfrq9s_mee_fluxes (Overall: DIFF) details:
+ERS_Ld3.f10_f10_mg37.F1850.derecho_intel.cam-outfrq1d_14dec_ghg_cam7 (Overall: DIFF) details:
+ERS_Ln9.f09_f09_mg17.FX2000.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
+ERS_Ln9.f19_f19_mg17.FXSD.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
+ERS_Ln9_P288x1.mpasa120_mpasa120.F2000climo.derecho_intel.cam-outfrq9s_mpasa120 (Overall: DIFF) details:
+ERS_Ln9_P36x1.mpasa480_mpasa480.F2000climo.derecho_intel.cam-outfrq9s_mpasa480 (Overall: DIFF) details:
+SMS_D_Ln9.f09_f09_mg17.FCts2nudged.derecho_intel.cam-outfrq9s_leapday (Overall: DIFF) details:
+SMS_D_Ln9.f09_f09_mg17.FCvbsxHIST.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
+SMS_D_Ln9.f09_f09_mg17.FSD.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
+SMS_D_Ln9.f19_f19_mg17.FWma2000climo.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
+SMS_D_Ln9.f19_f19_mg17.FWma2000climo.derecho_intel.cam-outfrq9s_waccm_ma_mam4 (Overall: DIFF) details:
+SMS_D_Ln9.f19_f19_mg17.FXHIST.derecho_intel.cam-outfrq9s_amie (Overall: DIFF) details:
+SMS_D_Ln9.f19_f19_mg17.QPC2000climo.derecho_intel.cam-outfrq3s_usecase (Overall: DIFF) details:
+SMS_D_Ln9.ne16pg3_ne16pg3_mg17.FX2000.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
+SMS_D_Ln9.ne30pg3_ne30pg3_mg17.FCts4MTHIST.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
+SMS_D_Ln9.ne30pg3_ne30pg3_mg17.FMTHIST.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
+SMS_D_Ln9_P1280x1.ne30pg3_ne30pg3_mg17.FCLTHIST.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
+SMS_Ld1.f09_f09_mg17.FCHIST_GC.derecho_intel.cam-outfrq1d (Overall: DIFF) details:
+SMS_Ld1.f09_f09_mg17.FW2000climo.derecho_intel.cam-outfrq1d (Overall: DIFF) details:
+SMS_Ld1.ne30pg3_ne30pg3_mg17.FC2010climo.derecho_intel.cam-outfrq1d (Overall: DIFF) details:
+SMS_Lh12.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq3h (Overall: DIFF) details:
+SMS_Lm13.f10_f10_mg37.F2000climo.derecho_intel.cam-outfrq1m (Overall: DIFF) details:
+SMS_Ln9.f09_f09_mg17.F2010climo.derecho_intel.cam-nudging (Overall: DIFF) details:
+SMS_Ln9.f09_f09_mg17.FW1850.derecho_intel.cam-reduced_hist3s (Overall: DIFF) details:
+SMS_Ln9.f19_f19.F2000climo.derecho_intel.cam-silhs (Overall: DIFF) details:
+SMS_Ln9.f19_f19_mg17.FHIST.derecho_intel.cam-outfrq9s_nochem (Overall: DIFF) details:
+SMS_Ln9.ne30pg3_ne30pg3_mg17.FW2000climo.derecho_intel.cam-outfrq9s_rrtmgp (Overall: DIFF) details:
+- Expected differences due to the new CLUBB external (See PR for discussion)
+
+derecho/nvphc/aux_cam:
+
+ERS_Ln9_G4-a100-openacc.ne30pg3_ne30pg3_mg17.F2000dev.derecho_nvhpc.cam-outfrq9s_mg3_default (Overall: DIFF)
+ FAIL ERS_Ln9_G4-a100-openacc.ne30pg3_ne30pg3_mg17.F2000dev.derecho_nvhpc.cam-outfrq9s_mg3_default BASELINE /glade/campaign/cesm/community/amwg/cam_baselines/cam6_4_018_intel: ERROR BFAIL baseline directory '/glade/campaign/cesm/community/amwg/cam_baselines/cam6_4_018_intel/ERS_Ln9_G4-a100-openacc.ne30pg3_ne30pg3_mg17.F2000dev.derecho_nvhpc.cam-outfrq9s_mg3_default' does not exist
+- Expected baseline compare fail due to no baselines stored for GPU tests that didn't exist previously
+
+izumi/nag/aux_cam:
+DAE.f45_f45_mg37.FHS94.izumi_nag.cam-dae (Overall: FAIL) details:
+- pre-existing failure - issue #670
+
+ERC_D_Ln9.f10_f10_mg37.QPC6.izumi_nag.cam-outfrq3s_am (Overall: DIFF) details:
+ERC_D_Ln9.f10_f10_mg37.QPC6.izumi_nag.cam-outfrq3s_cospsathist (Overall: DIFF) details:
+ERC_D_Ln9.f10_f10_mg37.QPC6.izumi_nag.cam-outfrq3s (Overall: DIFF) details:
+ERC_D_Ln9.f10_f10_mg37.QPWmaC6.izumi_nag.cam-outfrq3s (Overall: DIFF) details:
+ERI_D_Ln18.f19_f19_mg17.QPC6.izumi_nag.cam-ghgrmp_e8 (Overall: DIFF) details:
+ERP_Ln9.ne5pg3_ne5pg3_mg37.QPC6.izumi_nag.cam-outfrq9s_clubbmf (Overall: DIFF) details:
+SMS_D_Ln9.f10_f10_mg37.QPC6.izumi_nag.cam-outfrq3s_ba (Overall: DIFF) details:
+SMS_P48x1_D_Ln3.f09_f09_mg17.QPC6HIST.izumi_nag.cam-outfrq3s_co2cycle_usecase (Overall: DIFF) details:
+- Expected differences due to the new CLUBB external (See PR for discussion)
+
+izumi/gnu/aux_cam:
+ERP_D_Ln9.C48_C48_mg17.QPC6.izumi_gnu.cam-outfrq9s (Overall: DIFF) details:
+ERP_D_Ln9.ne3pg3_ne3pg3_mg37.QPC6.izumi_gnu.cam-outfrq9s_rrtmgp (Overall: DIFF) details:
+- Expected differences due to the new CLUBB external (See PR for discussion)
+
+CAM tag used for the baseline comparison tests if different than previous
+tag: cam6_4_018
+
+Summarize any changes to answers:
+ All compsets that use CLUBB (cam6+) will have slight answer changes. Discussion in PR.
+ Nvhpc gpu tests have no stored baseline for comparison.
+
+===============================================================
+
Tag name: cam6_4_018
Originator(s): peverwhee, jedwards4b
Date: 30 July 2024
@@ -160,7 +582,7 @@ Issue #1063 - Possible modification to RRTMG-P for ~80km top model
as well as the cam7-MT configuration.
Note that this modification is still being tested for scientific validity
- in the cam7-MT configuration.
+ in the cam7-MT configuration.
Issue #1097 - HEMCO reference in .gitmodules is a branch not a tag.
. Modify .gitmodules to resolve #1097
diff --git a/doc/ChangeLog_template b/doc/ChangeLog_template
index 5919b4e11a..f646f24e78 100644
--- a/doc/ChangeLog_template
+++ b/doc/ChangeLog_template
@@ -31,6 +31,8 @@ appropriate machine below. All failed tests must be justified.
derecho/intel/aux_cam:
+derecho/nvhpc/aux_cam:
+
izumi/nag/aux_cam:
izumi/gnu/aux_cam:
diff --git a/src/atmos_phys b/src/atmos_phys
index f4c09618ea..ebe25e38fe 160000
--- a/src/atmos_phys
+++ b/src/atmos_phys
@@ -1 +1 @@
-Subproject commit f4c09618eaaa19eaf3382f0473a531e20aa9f808
+Subproject commit ebe25e38fec87c8531760858507e774996cb977e
diff --git a/src/chemistry/modal_aero/modal_aero_convproc.F90 b/src/chemistry/modal_aero/modal_aero_convproc.F90
index a22f750f21..9def684ec0 100644
--- a/src/chemistry/modal_aero/modal_aero_convproc.F90
+++ b/src/chemistry/modal_aero/modal_aero_convproc.F90
@@ -1098,8 +1098,6 @@ subroutine ma_convproc_tend( &
real(r8) tmpmata(pcnst_extd,3) ! work variables
real(r8) xinv_ntsub ! 1.0/ntsub
real(r8) wup(pver) ! working updraft velocity (m/s)
- real(r8) zmagl(pver) ! working height above surface (m)
- real(r8) zkm ! working height above surface (km)
real(r8) :: dcondt2(pcols,pver,pcnst_extd)
real(r8) :: conu2(pcols,pver,pcnst_extd)
@@ -1293,16 +1291,6 @@ subroutine ma_convproc_tend( &
dtsub = dt*xinv_ntsub
courantmax = courantmax*xinv_ntsub
-! zmagl(k) = height above surface for middle of level k
- zmagl(pver) = 0.0_r8
- do k = pver, 1, -1
- if (k < pver) then
- zmagl(k) = zmagl(k+1) + 0.5_r8*dz
- end if
- dz = dp_i(k)*hund_ovr_g/rhoair_i(k)
- zmagl(k) = zmagl(k) + 0.5_r8*dz
- end do
-
! load tracer mixing ratio array, which will be updated at the end of each jtsub interation
q_i(1:pver,1:pcnst) = q(icol,1:pver,1:pcnst)
@@ -1448,6 +1436,7 @@ subroutine ma_convproc_tend( &
! compute lagrangian transport time (dt_u) and updraft fractional area (fa_u)
! *** these must obey dt_u(k)*mu_p_eudp(k) = dp_i(k)*fa_u(k)
+ dz = dp_i(k)*hund_ovr_g/rhoair_i(k)
dt_u(k) = dz/wup(k)
dt_u(k) = min( dt_u(k), dt )
fa_u(k) = dt_u(k)*(mu_p_eudp(k)/dp_i(k))
@@ -2324,6 +2313,7 @@ subroutine accumulate_to_larger_mode( spc_name, lptr, prevap )
integer :: m,n, nl,ns
+ nl = -1
! find constituent index of the largest mode for the species
loop1: do m = 1,ntot_amode-1
nl = lptr(mode_size_order(m))
diff --git a/src/control/cam_history.F90 b/src/control/cam_history.F90
index a0b35e5a1d..eef2b137e1 100644
--- a/src/control/cam_history.F90
+++ b/src/control/cam_history.F90
@@ -4690,7 +4690,6 @@ subroutine h_define (t, restart)
num_hdims = 2
do i = 1, num_hdims
dimindex(i) = header_info(1)%get_hdimid(i)
- nacsdims(i) = header_info(1)%get_hdimid(i)
end do
else if (patch_output) then
! All patches for this variable should be on the same grid
@@ -4716,7 +4715,6 @@ subroutine h_define (t, restart)
num_hdims = header_info(grd)%num_hdims()
do i = 1, num_hdims
dimindex(i) = header_info(grd)%get_hdimid(i)
- nacsdims(i) = header_info(grd)%get_hdimid(i)
end do
end if ! is_satfile
@@ -4832,22 +4830,8 @@ subroutine h_define (t, restart)
tape(t)%hlist(fld)%field%name)
call cam_pio_handle_error(ierr, &
'h_define: cannot define basename for '//trim(fname_tmp))
- end if
-
- if (restart) then
- ! For restart history files, we need to save accumulation counts
- fname_tmp = trim(fname_tmp)//'_nacs'
- if (.not. associated(tape(t)%hlist(fld)%nacs_varid)) then
- allocate(tape(t)%hlist(fld)%nacs_varid)
- end if
- if (size(tape(t)%hlist(fld)%nacs, 1) > 1) then
- call cam_pio_def_var(tape(t)%Files(f), trim(fname_tmp), pio_int, &
- nacsdims(1:num_hdims), tape(t)%hlist(fld)%nacs_varid)
- else
- ! Save just one value representing all chunks
- call cam_pio_def_var(tape(t)%Files(f), trim(fname_tmp), pio_int, &
- tape(t)%hlist(fld)%nacs_varid)
- end if
+ end if
+ if(restart) then
! for standard deviation
if (associated(tape(t)%hlist(fld)%sbuf)) then
fname_tmp = strip_suffix(tape(t)%hlist(fld)%field%name)
@@ -4858,9 +4842,69 @@ subroutine h_define (t, restart)
call cam_pio_def_var(tape(t)%Files(f), trim(fname_tmp), pio_double, &
dimids_tmp(1:fdims), tape(t)%hlist(fld)%sbuf_varid)
endif
- end if
- end do ! Loop over output patches
+ endif
+ end do ! Loop over output patches
end do ! Loop over fields
+ if (restart) then
+ do fld = 1, nflds(t)
+ if(is_satfile(t)) then
+ num_hdims=0
+ nfils(t)=1
+ else if (interpolate) then
+ ! Interpolate can't use normal grid code since we are forcing fields
+ ! to use interpolate decomp
+ if (.not. allocated(header_info)) then
+ ! Safety check
+ call endrun('h_define: header_info not allocated')
+ end if
+ num_hdims = 2
+ do i = 1, num_hdims
+ nacsdims(i) = header_info(1)%get_hdimid(i)
+ end do
+ else if (patch_output) then
+ ! All patches for this variable should be on the same grid
+ num_hdims = tape(t)%patches(1)%num_hdims(tape(t)%hlist(fld)%field%decomp_type)
+ else
+ ! Normal grid output
+ ! Find appropriate grid in header_info
+ if (.not. allocated(header_info)) then
+ ! Safety check
+ call endrun('h_define: header_info not allocated')
+ end if
+ grd = -1
+ do i = 1, size(header_info)
+ if (header_info(i)%get_gridid() == tape(t)%hlist(fld)%field%decomp_type) then
+ grd = i
+ exit
+ end if
+ end do
+ if (grd < 0) then
+ write(errormsg, '(a,i0,2a)') 'grid, ',tape(t)%hlist(fld)%field%decomp_type,', not found for ',trim(fname_tmp)
+ call endrun('H_DEFINE: '//errormsg)
+ end if
+ num_hdims = header_info(grd)%num_hdims()
+ do i = 1, num_hdims
+ nacsdims(i) = header_info(grd)%get_hdimid(i)
+ end do
+ end if ! is_satfile
+
+ fname_tmp = strip_suffix(tape(t)%hlist(fld)%field%name)
+ ! For restart history files, we need to save accumulation counts
+ fname_tmp = trim(fname_tmp)//'_nacs'
+ if (.not. associated(tape(t)%hlist(fld)%nacs_varid)) then
+ allocate(tape(t)%hlist(fld)%nacs_varid)
+ end if
+ if (size(tape(t)%hlist(fld)%nacs, 1) > 1) then
+ call cam_pio_def_var(tape(t)%Files(f), trim(fname_tmp), pio_int, &
+ nacsdims(1:num_hdims), tape(t)%hlist(fld)%nacs_varid)
+ else
+ ! Save just one value representing all chunks
+ call cam_pio_def_var(tape(t)%Files(f), trim(fname_tmp), pio_int, &
+ tape(t)%hlist(fld)%nacs_varid)
+ end if
+
+ end do ! Loop over fields
+ end if
!
deallocate(mdimids)
ret = pio_enddef(tape(t)%Files(f))
diff --git a/src/control/cam_snapshot_common.F90 b/src/control/cam_snapshot_common.F90
index f2a4780619..81e8694006 100644
--- a/src/control/cam_snapshot_common.F90
+++ b/src/control/cam_snapshot_common.F90
@@ -86,7 +86,7 @@ module cam_snapshot_common
type (snapshot_type) :: tend_snapshot(6)
type (snapshot_type) :: cam_in_snapshot(30)
type (snapshot_type) :: cam_out_snapshot(30)
-type (snapshot_type_nd) :: pbuf_snapshot(250)
+type (snapshot_type_nd) :: pbuf_snapshot(300)
contains
diff --git a/src/physics/cam/clubb_intr.F90 b/src/physics/cam/clubb_intr.F90
index 277991644b..06d70a98da 100644
--- a/src/physics/cam/clubb_intr.F90
+++ b/src/physics/cam/clubb_intr.F90
@@ -31,27 +31,32 @@ module clubb_intr
#ifdef CLUBB_SGS
use clubb_api_module, only: pdf_parameter, implicit_coefs_terms
- use clubb_api_module, only: clubb_config_flags_type, grid, stats, &
- nu_vertical_res_dep, stats_metadata_type
+ use clubb_api_module, only: clubb_config_flags_type, grid, stats, &
+ nu_vertical_res_dep, stats_metadata_type, &
+ hm_metadata_type, sclr_idx_type
+
use clubb_api_module, only: nparams
use clubb_mf, only: do_clubb_mf, do_clubb_mf_diag
use cloud_fraction, only: dp1, dp2
#endif
implicit none
+
#ifdef CLUBB_SGS
! Variables that contains all the statistics
-
type (stats), target, save :: stats_zt(pcols), & ! stats_zt grid
stats_zm(pcols), & ! stats_zm grid
stats_rad_zt(pcols), & ! stats_rad_zt grid
stats_rad_zm(pcols), & ! stats_rad_zm grid
stats_sfc(pcols) ! stats_sfc
-
+ type (hm_metadata_type) :: &
+ hm_metadata
+
type (stats_metadata_type) :: &
stats_metadata
-
+ type (sclr_idx_type) :: &
+ sclr_idx
#endif
private
@@ -84,32 +89,52 @@ module clubb_intr
#ifdef CLUBB_SGS
type(clubb_config_flags_type), public :: clubb_config_flags
- real(r8), dimension(nparams), public :: clubb_params ! Adjustable CLUBB parameters (C1, C2 ...)
+ real(r8), dimension(nparams), public :: clubb_params_single_col ! Adjustable CLUBB parameters (C1, C2 ...)
#endif
+ ! These are zero by default, but will be set by SILHS before they are used by subcolumns
+ integer :: &
+ hydromet_dim = 0, &
+ pdf_dim = 0
+
+
+ ! ------------------------ !
+ ! Sometimes private data !
+ ! ------------------------ !
+#ifdef CLUBB_SGS
+#ifdef SILHS
+ ! If SILHS is in use, it will initialize these
+ public :: &
+ hydromet_dim, &
+ pdf_dim, &
+ hm_metadata
+#else
+ ! If SILHS is not in use, there is no need for them to be public
+ private :: &
+ hydromet_dim, &
+ pdf_dim, &
+ hm_metadata
+#endif
+#endif
+
! ------------ !
! Private data !
! ------------ !
integer, parameter :: &
grid_type = 3, & ! The 2 option specifies stretched thermodynamic levels
- hydromet_dim = 0 ! The hydromet array in SAM-CLUBB is currently 0 elements
+ sclr_dim = 0 ! Higher-order scalars, set to zero
! Even though sclr_dim is set to 0, the dimension here is set to 1 to prevent compiler errors
! See github ticket larson-group/cam#133 for details
real(r8), parameter, dimension(1) :: &
sclr_tol = 1.e-8_r8 ! Total water in kg/kg
- character(len=6) :: saturation_equation
-
real(r8), parameter :: &
theta0 = 300._r8, & ! Reference temperature [K]
ts_nudge = 86400._r8, & ! Time scale for u/v nudging (not used) [s]
p0_clubb = 100000._r8
- integer, parameter :: &
- sclr_dim = 0 ! Higher-order scalars, set to zero
-
real(r8), parameter :: &
wp3_const = 1._r8 ! Constant to add to wp3 when moments are advected
@@ -195,8 +220,8 @@ module clubb_intr
clubb_ipdf_call_placement = unset_i, & ! Selected option for the placement of the call to
! CLUBB's PDF.
clubb_penta_solve_method = unset_i, & ! Specifier for method to solve the penta-diagonal system
- clubb_tridiag_solve_method = unset_i ! Specifier for method to solve tri-diagonal systems
-
+ clubb_tridiag_solve_method = unset_i,& ! Specifier for method to solve tri-diagonal systems
+ clubb_saturation_equation = unset_i ! Specifier for which saturation formula to use
logical :: &
@@ -314,14 +339,16 @@ module clubb_intr
clubb_l_mono_flux_lim_um, & ! Flag to turn on monotonic flux limiter for um
clubb_l_mono_flux_lim_vm, & ! Flag to turn on monotonic flux limiter for vm
clubb_l_mono_flux_lim_spikefix, & ! Flag to implement monotonic flux limiter code that
- ! eliminates spurious drying tendencies at model top
- clubb_l_intr_sfc_flux_smooth = .false. ! Add a locally calculated roughness to upwp and vpwp sfc fluxes
+ ! eliminates spurious drying tendencies at model top
+ clubb_l_host_applies_sfc_fluxes ! Whether the host model applies the surface fluxes
+
+ logical :: &
+ clubb_l_intr_sfc_flux_smooth = .false. ! Add a locally calculated roughness to upwp and vpwp sfc fluxes
! Constant parameters
logical, parameter, private :: &
- l_implemented = .true., & ! Implemented in a host model (always true)
- l_host_applies_sfc_fluxes = .false. ! Whether the host model applies the surface fluxes
-
+ l_implemented = .true. ! Implemented in a host model (always true)
+
logical, parameter, private :: &
apply_to_heat = .false. ! Apply WACCM energy fixer to heat or not (.true. = yes (duh))
@@ -500,13 +527,8 @@ subroutine clubb_register_cam( )
history_budget_out = history_budget, &
history_budget_histfile_num_out = history_budget_histfile_num, &
do_hb_above_clubb_out = do_hb_above_clubb)
- subcol_scheme = subcol_get_scheme()
- if (trim(subcol_scheme) == 'SILHS') then
- saturation_equation = "flatau"
- else
- saturation_equation = "gfdl" ! Goff & Gratch (1946) approximation for SVP
- end if
+ subcol_scheme = subcol_get_scheme()
if (clubb_do_adv) then
cnst_names =(/'THLP2 ','RTP2 ','RTPTHLP','WPTHLP ','WPRTP ','WP2 ','WP3 ','UP2 ','VP2 '/)
@@ -882,6 +904,7 @@ subroutine clubb_readnl(nlfile)
clubb_ipdf_call_placement, & ! Out
clubb_penta_solve_method, & ! Out
clubb_tridiag_solve_method, & ! Out
+ clubb_saturation_equation, & ! Out
clubb_l_use_precip_frac, & ! Out
clubb_l_predict_upwp_vpwp, & ! Out
clubb_l_min_wp2_from_corr_wx, & ! Out
@@ -935,7 +958,8 @@ subroutine clubb_readnl(nlfile)
clubb_l_mono_flux_lim_rtm, & ! Out
clubb_l_mono_flux_lim_um, & ! Out
clubb_l_mono_flux_lim_vm, & ! Out
- clubb_l_mono_flux_lim_spikefix ) ! Out
+ clubb_l_mono_flux_lim_spikefix, & ! Out
+ clubb_l_host_applies_sfc_fluxes ) ! Out
! Call CLUBB+MF namelist
call clubb_mf_readnl(nlfile)
@@ -1184,10 +1208,14 @@ subroutine clubb_readnl(nlfile)
if (ierr /= 0) call endrun(sub//": FATAL: mpi_bcast: clubb_l_mono_flux_lim_vm")
call mpi_bcast(clubb_l_mono_flux_lim_spikefix, 1, mpi_logical, mstrid, mpicom, ierr)
if (ierr /= 0) call endrun(sub//": FATAL: mpi_bcast: clubb_l_mono_flux_lim_spikefix")
+ call mpi_bcast(clubb_l_host_applies_sfc_fluxes, 1, mpi_logical, mstrid, mpicom, ierr)
+ if (ierr /= 0) call endrun(sub//": FATAL: mpi_bcast: clubb_l_host_applies_sfc_fluxes")
call mpi_bcast(clubb_penta_solve_method, 1, mpi_integer, mstrid, mpicom, ierr)
if (ierr /= 0) call endrun(sub//": FATAL: mpi_bcast: clubb_penta_solve_method")
call mpi_bcast(clubb_tridiag_solve_method, 1, mpi_integer, mstrid, mpicom, ierr)
if (ierr /= 0) call endrun(sub//": FATAL: mpi_bcast: clubb_tridiag_solve_method")
+ call mpi_bcast(clubb_saturation_equation, 1, mpi_integer, mstrid, mpicom, ierr)
+ if (ierr /= 0) call endrun(sub//": FATAL: mpi_bcast: clubb_saturation_equation")
call mpi_bcast(clubb_l_intr_sfc_flux_smooth, 1, mpi_logical, mstrid, mpicom, ierr)
if (ierr /= 0) call endrun(sub//": FATAL: mpi_bcast: clubb_l_intr_sfc_flux_smooth")
call mpi_bcast(clubb_l_vary_convect_depth, 1, mpi_logical, mstrid, mpicom, ierr)
@@ -1293,6 +1321,7 @@ subroutine clubb_readnl(nlfile)
if(clubb_detphase_lowtemp == unset_r8) call endrun(sub//": FATAL: clubb_detphase_lowtemp not set")
if(clubb_penta_solve_method == unset_i) call endrun(sub//": FATAL: clubb_penta_solve_method not set")
if(clubb_tridiag_solve_method == unset_i) call endrun(sub//": FATAL: clubb_tridiag_solve_method not set")
+ if(clubb_saturation_equation == unset_i) call endrun(sub//": FATAL: clubb_saturation_equation not set")
if(clubb_detphase_lowtemp >= meltpt_temp) &
call endrun(sub//": ERROR: clubb_detphase_lowtemp must be less than 268.15 K")
@@ -1300,6 +1329,7 @@ subroutine clubb_readnl(nlfile)
clubb_ipdf_call_placement, & ! In
clubb_penta_solve_method, & ! In
clubb_tridiag_solve_method, & ! In
+ clubb_saturation_equation, & ! In
clubb_l_use_precip_frac, & ! In
clubb_l_predict_upwp_vpwp, & ! In
clubb_l_min_wp2_from_corr_wx, & ! In
@@ -1354,6 +1384,7 @@ subroutine clubb_readnl(nlfile)
clubb_l_mono_flux_lim_um, & ! In
clubb_l_mono_flux_lim_vm, & ! In
clubb_l_mono_flux_lim_spikefix, & ! In
+ clubb_l_host_applies_sfc_fluxes, & ! In
clubb_config_flags ) ! Out
#endif
@@ -1399,7 +1430,8 @@ subroutine clubb_ini_cam(pbuf2d)
use clubb_api_module, only: &
print_clubb_config_flags_api, &
- setup_clubb_core_api, &
+ setup_parameters_model_api, &
+ check_clubb_settings_api, &
init_pdf_params_api, &
time_precision, &
core_rknd, &
@@ -1410,19 +1442,13 @@ subroutine clubb_ini_cam(pbuf2d)
read_parameters_api, &
w_tol_sqd, &
rt_tol, &
- thl_tol
-
- ! These are only needed if we're using a passive scalar
- use clubb_api_module, only: &
- iisclr_rt, &
- iisclr_thl, &
- iisclr_CO2, &
- iiedsclr_rt, &
- iiedsclr_thl, &
- iiedsclr_CO2
+ thl_tol, &
+ saturation_bolton, & ! Constant for Bolton approximations of saturation
+ saturation_gfdl, & ! Constant for the GFDL approximation of saturation
+ saturation_flatau, & ! Constant for Flatau approximations of saturation
+ saturation_lookup ! Use a lookup table for mixing length
use time_manager, only: is_first_step
- use clubb_api_module, only: hydromet_dim
use constituents, only: cnst_get_ind
use phys_control, only: phys_getopts
use spmd_utils, only: iam
@@ -1578,13 +1604,13 @@ subroutine clubb_ini_cam(pbuf2d)
npccn_idx = pbuf_get_index('NPCCN')
- iisclr_rt = -1
- iisclr_thl = -1
- iisclr_CO2 = -1
+ sclr_idx%iisclr_rt = -1
+ sclr_idx%iisclr_thl = -1
+ sclr_idx%iisclr_CO2 = -1
- iiedsclr_rt = -1
- iiedsclr_thl = -1
- iiedsclr_CO2 = -1
+ sclr_idx%iiedsclr_rt = -1
+ sclr_idx%iiedsclr_thl = -1
+ sclr_idx%iiedsclr_CO2 = -1
! ----------------------------------------------------------------- !
! Define number of tracers for CLUBB to diffuse
@@ -1626,7 +1652,7 @@ subroutine clubb_ini_cam(pbuf2d)
Cx_min, Cx_max, Richardson_num_min, Richardson_num_max, &
wpxp_Ri_exp, a3_coef_min, a_const, bv_efold, z_displace )
- call read_parameters_api( -99, "", &
+ call read_parameters_api( 1, -99, "", &
C1, C1b, C1c, C2rt, C2thl, C2rtthl, &
C4, C_uu_shr, C_uu_buoy, C6rt, C6rtb, C6rtc, &
C6thl, C6thlb, C6thlc, C7, C7b, C7c, C8, C8b, C10, &
@@ -1651,75 +1677,81 @@ subroutine clubb_ini_cam(pbuf2d)
C_invrs_tau_wpxp_Ri, C_invrs_tau_wpxp_N2_thresh, &
Cx_min, Cx_max, Richardson_num_min, Richardson_num_max, &
wpxp_Ri_exp, a3_coef_min, a_const, bv_efold, z_displace, &
- clubb_params )
-
- clubb_params(iC2rtthl) = clubb_C2rtthl
- clubb_params(iC8) = clubb_C8
- clubb_params(iC11) = clubb_c11
- clubb_params(iC11b) = clubb_c11b
- clubb_params(iC14) = clubb_c14
- clubb_params(iC_wp3_pr_turb) = clubb_C_wp3_pr_turb
- clubb_params(ic_K10) = clubb_c_K10
- clubb_params(imult_coef) = clubb_mult_coef
- clubb_params(iSkw_denom_coef) = clubb_Skw_denom_coef
- clubb_params(iC2rt) = clubb_C2rt
- clubb_params(iC2thl) = clubb_C2thl
- clubb_params(ibeta) = clubb_beta
- clubb_params(iC6rt) = clubb_c6rt
- clubb_params(iC6rtb) = clubb_c6rtb
- clubb_params(iC6rtc) = clubb_c6rtc
- clubb_params(iC6thl) = clubb_c6thl
- clubb_params(iC6thlb) = clubb_c6thlb
- clubb_params(iC6thlc) = clubb_c6thlc
- clubb_params(iwpxp_L_thresh) = clubb_wpxp_L_thresh
- clubb_params(iC7) = clubb_C7
- clubb_params(iC7b) = clubb_C7b
- clubb_params(igamma_coef) = clubb_gamma_coef
- clubb_params(ic_K10h) = clubb_c_K10h
- clubb_params(ilambda0_stability_coef) = clubb_lambda0_stability_coef
- clubb_params(ilmin_coef) = clubb_lmin_coef
- clubb_params(iC8b) = clubb_C8b
- clubb_params(iskw_max_mag) = clubb_skw_max_mag
- clubb_params(iC1) = clubb_C1
- clubb_params(iC1b) = clubb_C1b
- clubb_params(igamma_coefb) = clubb_gamma_coefb
- clubb_params(iup2_sfc_coef) = clubb_up2_sfc_coef
- clubb_params(iC4) = clubb_C4
- clubb_params(iC_uu_shr) = clubb_C_uu_shr
- clubb_params(iC_uu_buoy) = clubb_C_uu_buoy
- clubb_params(ic_K1) = clubb_c_K1
- clubb_params(ic_K2) = clubb_c_K2
- clubb_params(inu2) = clubb_nu2
- clubb_params(ic_K8) = clubb_c_K8
- clubb_params(ic_K9) = clubb_c_K9
- clubb_params(inu9) = clubb_nu9
- clubb_params(iC_wp2_splat) = clubb_C_wp2_splat
- clubb_params(iC_invrs_tau_bkgnd) = clubb_C_invrs_tau_bkgnd
- clubb_params(iC_invrs_tau_sfc) = clubb_C_invrs_tau_sfc
- clubb_params(iC_invrs_tau_shear) = clubb_C_invrs_tau_shear
- clubb_params(iC_invrs_tau_N2) = clubb_C_invrs_tau_N2
- clubb_params(iC_invrs_tau_N2_wp2) = clubb_C_invrs_tau_N2_wp2
- clubb_params(iC_invrs_tau_N2_xp2) = clubb_C_invrs_tau_N2_xp2
- clubb_params(iC_invrs_tau_N2_wpxp) = clubb_C_invrs_tau_N2_wpxp
- clubb_params(iC_invrs_tau_N2_clear_wp3) = clubb_C_invrs_tau_N2_clear_wp3
- clubb_params(ibv_efold) = clubb_bv_efold
- clubb_params(iwpxp_Ri_exp) = clubb_wpxp_Ri_exp
- clubb_params(iz_displace) = clubb_z_displace
+ clubb_params_single_col )
+
+ clubb_params_single_col(iC2rtthl) = clubb_C2rtthl
+ clubb_params_single_col(iC8) = clubb_C8
+ clubb_params_single_col(iC11) = clubb_c11
+ clubb_params_single_col(iC11b) = clubb_c11b
+ clubb_params_single_col(iC14) = clubb_c14
+ clubb_params_single_col(iC_wp3_pr_turb) = clubb_C_wp3_pr_turb
+ clubb_params_single_col(ic_K10) = clubb_c_K10
+ clubb_params_single_col(imult_coef) = clubb_mult_coef
+ clubb_params_single_col(iSkw_denom_coef) = clubb_Skw_denom_coef
+ clubb_params_single_col(iC2rt) = clubb_C2rt
+ clubb_params_single_col(iC2thl) = clubb_C2thl
+ clubb_params_single_col(ibeta) = clubb_beta
+ clubb_params_single_col(iC6rt) = clubb_c6rt
+ clubb_params_single_col(iC6rtb) = clubb_c6rtb
+ clubb_params_single_col(iC6rtc) = clubb_c6rtc
+ clubb_params_single_col(iC6thl) = clubb_c6thl
+ clubb_params_single_col(iC6thlb) = clubb_c6thlb
+ clubb_params_single_col(iC6thlc) = clubb_c6thlc
+ clubb_params_single_col(iwpxp_L_thresh) = clubb_wpxp_L_thresh
+ clubb_params_single_col(iC7) = clubb_C7
+ clubb_params_single_col(iC7b) = clubb_C7b
+ clubb_params_single_col(igamma_coef) = clubb_gamma_coef
+ clubb_params_single_col(ic_K10h) = clubb_c_K10h
+ clubb_params_single_col(ilambda0_stability_coef) = clubb_lambda0_stability_coef
+ clubb_params_single_col(ilmin_coef) = clubb_lmin_coef
+ clubb_params_single_col(iC8b) = clubb_C8b
+ clubb_params_single_col(iskw_max_mag) = clubb_skw_max_mag
+ clubb_params_single_col(iC1) = clubb_C1
+ clubb_params_single_col(iC1b) = clubb_C1b
+ clubb_params_single_col(igamma_coefb) = clubb_gamma_coefb
+ clubb_params_single_col(iup2_sfc_coef) = clubb_up2_sfc_coef
+ clubb_params_single_col(iC4) = clubb_C4
+ clubb_params_single_col(iC_uu_shr) = clubb_C_uu_shr
+ clubb_params_single_col(iC_uu_buoy) = clubb_C_uu_buoy
+ clubb_params_single_col(ic_K1) = clubb_c_K1
+ clubb_params_single_col(ic_K2) = clubb_c_K2
+ clubb_params_single_col(inu2) = clubb_nu2
+ clubb_params_single_col(ic_K8) = clubb_c_K8
+ clubb_params_single_col(ic_K9) = clubb_c_K9
+ clubb_params_single_col(inu9) = clubb_nu9
+ clubb_params_single_col(iC_wp2_splat) = clubb_C_wp2_splat
+ clubb_params_single_col(iC_invrs_tau_bkgnd) = clubb_C_invrs_tau_bkgnd
+ clubb_params_single_col(iC_invrs_tau_sfc) = clubb_C_invrs_tau_sfc
+ clubb_params_single_col(iC_invrs_tau_shear) = clubb_C_invrs_tau_shear
+ clubb_params_single_col(iC_invrs_tau_N2) = clubb_C_invrs_tau_N2
+ clubb_params_single_col(iC_invrs_tau_N2_wp2) = clubb_C_invrs_tau_N2_wp2
+ clubb_params_single_col(iC_invrs_tau_N2_xp2) = clubb_C_invrs_tau_N2_xp2
+ clubb_params_single_col(iC_invrs_tau_N2_wpxp) = clubb_C_invrs_tau_N2_wpxp
+ clubb_params_single_col(iC_invrs_tau_N2_clear_wp3) = clubb_C_invrs_tau_N2_clear_wp3
+ clubb_params_single_col(ibv_efold) = clubb_bv_efold
+ clubb_params_single_col(iwpxp_Ri_exp) = clubb_wpxp_Ri_exp
+ clubb_params_single_col(iz_displace) = clubb_z_displace
+
+ ! Override clubb default
+ if ( trim(subcol_scheme) == 'SILHS' ) then
+ clubb_config_flags%saturation_formula = saturation_flatau
+ else
+ clubb_config_flags%saturation_formula = saturation_gfdl ! Goff & Gratch (1946) approximation for SVP
+ end if
+ ! Define model constant parameters
+ call setup_parameters_model_api( theta0, ts_nudge, clubb_params_single_col(iSkw_max_mag) )
+
! Set up CLUBB core. Note that some of these inputs are overwritten
! when clubb_tend_cam is called. The reason is that heights can change
! at each time step, which is why dummy arrays are read in here for heights
! as they are immediately overwrote.
!$OMP PARALLEL
- call setup_clubb_core_api( &
- nlev+1, theta0, ts_nudge, & ! In
- hydromet_dim, sclr_dim, & ! In
- sclr_tol, edsclr_dim, clubb_params, & ! In
- l_host_applies_sfc_fluxes, & ! In
- saturation_equation, & ! In
- l_input_fields, & ! In
- clubb_config_flags, & ! In
- err_code ) ! Out
+ call check_clubb_settings_api( nlev+1, clubb_params_single_col, & ! Intent(in)
+ l_implemented, & ! Intent(in)
+ l_input_fields, & ! Intent(in)
+ clubb_config_flags, & ! intent(in)
+ err_code ) ! Intent(out)
if ( err_code == clubb_fatal_error ) then
call endrun('clubb_ini_cam: FATAL ERROR CALLING SETUP_CLUBB_CORE')
@@ -1729,7 +1761,7 @@ subroutine clubb_ini_cam(pbuf2d)
! Print the list of CLUBB parameters
if ( masterproc ) then
do j = 1, nparams, 1
- write(iulog,*) params_list(j), " = ", clubb_params(j)
+ write(iulog,*) params_list(j), " = ", clubb_params_single_col(j)
enddo
endif
@@ -1836,18 +1868,27 @@ subroutine clubb_ini_cam(pbuf2d)
call addfld ( 'edmf_qtflx' , (/ 'ilev' /), 'A', 'W/m2' , 'qt flux (EDMF)' )
end if
+ if ( trim(subcol_scheme) /= 'SILHS' ) then
+ ! hm_metadata is set up by calling init_pdf_hydromet_arrays_api in subcol_init_SILHS.
+ ! So if we are not using silhs, we allocate the parts of hm_metadata that need allocating
+ ! in order to making intel debug tests happy.
+ allocate( hm_metadata%hydromet_list(1), stat=ierr)
+ if( ierr /= 0 ) call endrun( 'clubb_ini_cam: Unable to allocate hm_metadata%hydromet_list' )
+ allocate( hm_metadata%l_mix_rat_hm(1), stat=ierr)
+ if( ierr /= 0 ) call endrun( 'clubb_ini_cam: Unable to allocate hm_metadata%l_mix_rat_hm' )
+ end if
+
! Initialize statistics, below are dummy variables
dum1 = 300._r8
dum2 = 1200._r8
dum3 = 300._r8
-
if (stats_metadata%l_stats) then
-
- call stats_init_clubb( .true., dum1, dum2, &
- nlev+1, nlev+1, nlev+1, dum3, &
- stats_zt(:), stats_zm(:), stats_sfc(:), &
- stats_rad_zt(:), stats_rad_zm(:))
+
+ call stats_init_clubb( .true., dum1, dum2, &
+ nlev+1, nlev+1, nlev+1, dum3, &
+ stats_zt(:), stats_zm(:), stats_sfc(:), &
+ stats_rad_zt(:), stats_rad_zm(:))
allocate(out_zt(pcols,pverp,stats_zt(1)%num_output_fields), stat=ierr)
if( ierr /= 0 ) call endrun( 'clubb_ini_cam: Unable to allocate out_zt' )
@@ -2085,7 +2126,7 @@ subroutine clubb_tend_cam( state, ptend_all, pbuf, hdtime, &
rt_tol, &
thl_tol, &
stats_begin_timestep_api, &
- hydromet_dim, calculate_thlp2_rad_api, update_xp2_mc_api, &
+ calculate_thlp2_rad_api, update_xp2_mc_api, &
sat_mixrat_liq_api, &
fstderr, &
ipdf_post_advance_fields, &
@@ -2294,7 +2335,7 @@ subroutine clubb_tend_cam( state, ptend_all, pbuf, hdtime, &
wp2up2_inout, & ! w'^2 u'^2 (momentum levels)
wp2vp2_inout, & ! w'^2 v'^2 (momentum levels)
zt_g, & ! Thermodynamic grid of CLUBB [m]
- zi_g ! Momentum grid of CLUBB [m]
+ zi_g ! Momentum grid of CLUBB [m]
! Local CLUBB variables dimensioned as NCOL (only useful columns) to be sent into the clubb run api
! NOTE: THESE VARIABLS SHOULD NOT BE USED IN PBUF OR OUTFLD (HISTORY) SUBROUTINES
@@ -2548,6 +2589,9 @@ subroutine clubb_tend_cam( state, ptend_all, pbuf, hdtime, &
type(nu_vertical_res_dep) :: nu_vert_res_dep ! Vertical resolution dependent nu values
real(r8) :: lmin
+ real(r8), dimension(state%ncol,nparams) :: &
+ clubb_params ! Adjustable CLUBB parameters (C1, C2 ...)
+
#endif
det_s(:) = 0.0_r8
det_ice(:) = 0.0_r8
@@ -3114,6 +3158,10 @@ subroutine clubb_tend_cam( state, ptend_all, pbuf, hdtime, &
zi_g, zt_g, & ! intent(in)
gr ) ! intent(out)
+ do i = 1, ncol
+ clubb_params(i,:) = clubb_params_single_col(:)
+ end do
+
call setup_parameters_api( zi_g(:,2), clubb_params, gr, ncol, grid_type, & ! intent(in)
clubb_config_flags%l_prescribed_avg_deltaz, & ! intent(in)
lmin, nu_vert_res_dep, err_code ) ! intent(out)
@@ -3473,7 +3521,9 @@ subroutine clubb_tend_cam( state, ptend_all, pbuf, hdtime, &
! Advance CLUBB CORE one timestep in the future
call advance_clubb_core_api( gr, pverp+1-top_lev, ncol, &
- l_implemented, dtime, fcor, sfc_elevation, hydromet_dim, &
+ l_implemented, dtime, fcor, sfc_elevation, &
+ hydromet_dim, &
+ sclr_dim, sclr_tol, edsclr_dim, sclr_idx, &
thlm_forcing, rtm_forcing, um_forcing, vm_forcing, &
sclrm_forcing, edsclrm_forcing, wprtp_forcing, &
wpthlp_forcing, rtp2_forcing, thlp2_forcing, &
@@ -3484,7 +3534,8 @@ subroutine clubb_tend_cam( state, ptend_all, pbuf, hdtime, &
rtm_ref, thlm_ref, um_ref, vm_ref, ug, vg, &
p_in_Pa, rho_zm, rho_zt, exner, &
rho_ds_zm, rho_ds_zt, invrs_rho_ds_zm, &
- invrs_rho_ds_zt, thv_ds_zm, thv_ds_zt, hydromet, &
+ invrs_rho_ds_zt, thv_ds_zm, thv_ds_zt, &
+ hydromet, hm_metadata%l_mix_rat_hm, &
rfrzm, radf, &
wphydrometp, wp2hmp, rtphmp_zt, thlphmp_zt, &
grid_dx, grid_dy, &
@@ -3565,7 +3616,7 @@ subroutine clubb_tend_cam( state, ptend_all, pbuf, hdtime, &
thlp2_rad_out(:,:) = 0._r8
do i=1, ncol
- call calculate_thlp2_rad_api(nlev+1, rcm_out_zm(i,:), thlprcp_out(i,:), qrl_zm(i,:), clubb_params, &
+ call calculate_thlp2_rad_api(nlev+1, rcm_out_zm(i,:), thlprcp_out(i,:), qrl_zm(i,:), clubb_params(i,:), &
thlp2_rad_out(i,:))
end do
@@ -3880,22 +3931,22 @@ subroutine clubb_tend_cam( state, ptend_all, pbuf, hdtime, &
rtm_integral_ltend(:) = 0._r8
do k=1, pver
- do i=1, ncol
+ do i=1, ncol
- ptend_loc%u(i,k) = (um(i,k) - state1%u(i,k)) / hdtime ! east-west wind
- ptend_loc%v(i,k) = (vm(i,k) - state1%v(i,k)) / hdtime ! north-south wind
- ptend_loc%q(i,k,ixq) = (rtm(i,k) - rcm(i,k)-state1%q(i,k,ixq)) / hdtime ! water vapor
- ptend_loc%q(i,k,ixcldliq) = (rcm(i,k) - state1%q(i,k,ixcldliq)) / hdtime ! Tendency of liquid water
- ptend_loc%s(i,k) = (clubb_s(i,k) - state1%s(i,k)) / hdtime ! Tendency of static energy
+ ptend_loc%u(i,k) = (um(i,k) - state1%u(i,k)) / hdtime ! east-west wind
+ ptend_loc%v(i,k) = (vm(i,k) - state1%v(i,k)) / hdtime ! north-south wind
+ ptend_loc%q(i,k,ixq) = (rtm(i,k) - rcm(i,k)-state1%q(i,k,ixq)) / hdtime ! water vapor
+ ptend_loc%q(i,k,ixcldliq) = (rcm(i,k) - state1%q(i,k,ixcldliq)) / hdtime ! Tendency of liquid water
+ ptend_loc%s(i,k) = (clubb_s(i,k) - state1%s(i,k)) / hdtime ! Tendency of static energy
- rtm_integral_ltend(i) = rtm_integral_ltend(i) + ptend_loc%q(i,k,ixcldliq)*state1%pdel(i,k)
- rtm_integral_vtend(i) = rtm_integral_vtend(i) + ptend_loc%q(i,k,ixq)*state1%pdel(i,k)
+ rtm_integral_ltend(i) = rtm_integral_ltend(i) + ptend_loc%q(i,k,ixcldliq)*state1%pdel(i,k)
+ rtm_integral_vtend(i) = rtm_integral_vtend(i) + ptend_loc%q(i,k,ixq)*state1%pdel(i,k)
- end do
- end do
+ end do
+ end do
- rtm_integral_ltend(:) = rtm_integral_ltend(:)/gravit
- rtm_integral_vtend(:) = rtm_integral_vtend(:)/gravit
+ rtm_integral_ltend(:) = rtm_integral_ltend(:)/gravit
+ rtm_integral_vtend(:) = rtm_integral_vtend(:)/gravit
! Accumulate Air Temperature Tendency (TTEND) for Gravity Wave parameterization
ttend_clubb_mc(:ncol,:pver) = ttend_clubb_mc(:ncol,:pver) + ptend_loc%s(:ncol,:pver)/cpair
@@ -3905,7 +3956,6 @@ subroutine clubb_tend_cam( state, ptend_all, pbuf, hdtime, &
ttend_clubb(:ncol,:) = ttend_clubb_mc(:ncol,:pver)/REAL(cld_macmic_num_steps,r8)
end if
-
if (clubb_do_adv) then
if (macmic_it == cld_macmic_num_steps) then
@@ -4788,7 +4838,7 @@ subroutine stats_init_clubb( l_stats_in, stats_tsamp_in, stats_tout_in, &
! Set stats_variables variables with inputs from calling subroutine
stats_metadata%l_stats = l_stats_in
-
+
stats_metadata%stats_tsamp = stats_tsamp_in
stats_metadata%stats_tout = stats_tout_in
@@ -4892,7 +4942,9 @@ subroutine stats_init_clubb( l_stats_in, stats_tsamp_in, stats_tout_in, &
if( ierr /= 0 ) call endrun("stats_init_clubb: Failed to allocate stats_zt%file%z")
! Default initialization for array indices for zt
- call stats_init_zt_api( clubb_vars_zt, &
+ call stats_init_zt_api( hydromet_dim, sclr_dim, edsclr_dim, &
+ hm_metadata%hydromet_list, hm_metadata%l_mix_rat_hm, &
+ clubb_vars_zt, &
l_error, &
stats_metadata, stats_zt(j) )
@@ -4929,7 +4981,9 @@ subroutine stats_init_clubb( l_stats_in, stats_tsamp_in, stats_tout_in, &
allocate( stats_zm(j)%file%grid_avg_var( stats_zm(j)%num_output_fields ) )
allocate( stats_zm(j)%file%z( stats_zm(j)%kk ) )
- call stats_init_zm_api( clubb_vars_zm, &
+ call stats_init_zm_api( hydromet_dim, sclr_dim, edsclr_dim, &
+ hm_metadata%hydromet_list, hm_metadata%l_mix_rat_hm, &
+ clubb_vars_zm, &
l_error, &
stats_metadata, stats_zm(j) )
@@ -5013,7 +5067,6 @@ subroutine stats_init_clubb( l_stats_in, stats_tsamp_in, stats_tout_in, &
! Initialize sfc (surface point)
-
i = 1
do while ( ichar(clubb_vars_sfc(i)(1:1)) /= 0 .and. &
len_trim(clubb_vars_sfc(i)) /= 0 .and. &
diff --git a/src/physics/cam/dadadj.F90 b/src/physics/cam/dadadj.F90
deleted file mode 100644
index b9762f8f5f..0000000000
--- a/src/physics/cam/dadadj.F90
+++ /dev/null
@@ -1,174 +0,0 @@
-module dadadj
-!-----------------------------------------------------------------------
-!
-! Purpose:
-! GFDL style dry adiabatic adjustment
-!
-! Method:
-! if stratification is unstable, adjustment to the dry adiabatic lapse
-! rate is forced subject to the condition that enthalpy is conserved.
-!
-! Author: J.Hack
-!
-!-----------------------------------------------------------------------
-
-use shr_kind_mod, only: r8 => shr_kind_r8
-
-implicit none
-private
-save
-
-public :: &
- dadadj_initial, &
- dadadj_calc
-
-integer :: nlvdry ! number of layers from top of model to apply the adjustment
-integer :: niter ! number of iterations for convergence
-
-!===============================================================================
-contains
-!===============================================================================
-
-subroutine dadadj_initial(nlvdry_in, niter_in)
-
- integer, intent(in) :: nlvdry_in
- integer, intent(in) :: niter_in
-
- nlvdry = nlvdry_in
- niter = niter_in
-
-end subroutine dadadj_initial
-
-!===============================================================================
-
-subroutine dadadj_calc( &
- ncol, pmid, pint, pdel, cappav, t, &
- q, dadpdf, icol_err)
-
- ! Arguments
-
- integer, intent(in) :: ncol ! number of atmospheric columns
-
- real(r8), intent(in) :: pmid(:,:) ! pressure at model levels
- real(r8), intent(in) :: pint(:,:) ! pressure at model interfaces
- real(r8), intent(in) :: pdel(:,:) ! vertical delta-p
- real(r8), intent(in) :: cappav(:,:) ! variable Kappa
-
- real(r8), intent(inout) :: t(:,:) ! temperature (K)
- real(r8), intent(inout) :: q(:,:) ! specific humidity
-
- real(r8), intent(out) :: dadpdf(:,:) ! PDF of where adjustments happened
-
- integer, intent(out) :: icol_err ! index of column in which error occurred
-
- !---------------------------Local workspace-----------------------------
-
- integer :: i,k ! longitude, level indices
- integer :: jiter ! iteration index
-
- real(r8), allocatable :: c1dad(:) ! intermediate constant
- real(r8), allocatable :: c2dad(:) ! intermediate constant
- real(r8), allocatable :: c3dad(:) ! intermediate constant
- real(r8), allocatable :: c4dad(:) ! intermediate constant
- real(r8) :: gammad ! dry adiabatic lapse rate (deg/Pa)
- real(r8) :: zeps ! convergence criterion (deg/Pa)
- real(r8) :: rdenom ! reciprocal of denominator of expression
- real(r8) :: dtdp ! delta-t/delta-p
- real(r8) :: zepsdp ! zeps*delta-p
- real(r8) :: zgamma ! intermediate constant
- real(r8) :: qave ! mean q between levels
- real(r8) :: cappa ! Kappa at level intefaces
-
- logical :: ilconv ! .TRUE. ==> convergence was attained
- logical :: dodad(ncol) ! .TRUE. ==> do dry adjustment
-
- !-----------------------------------------------------------------------
-
- icol_err = 0
- zeps = 2.0e-5_r8 ! set convergence criteria
-
- allocate(c1dad(nlvdry), c2dad(nlvdry), c3dad(nlvdry), c4dad(nlvdry))
-
- ! Find gridpoints with unstable stratification
-
- do i = 1, ncol
- cappa = 0.5_r8*(cappav(i,2) + cappav(i,1))
- gammad = cappa*0.5_r8*(t(i,2) + t(i,1))/pint(i,2)
- dtdp = (t(i,2) - t(i,1))/(pmid(i,2) - pmid(i,1))
- dodad(i) = (dtdp + zeps) .gt. gammad
- end do
-
- dadpdf(:ncol,:) = 0._r8
- do k= 2, nlvdry
- do i = 1, ncol
- cappa = 0.5_r8*(cappav(i,k+1) + cappav(i,k))
- gammad = cappa*0.5_r8*(t(i,k+1) + t(i,k))/pint(i,k+1)
- dtdp = (t(i,k+1) - t(i,k))/(pmid(i,k+1) - pmid(i,k))
- dodad(i) = dodad(i) .or. (dtdp + zeps).gt.gammad
- if ((dtdp + zeps).gt.gammad) then
- dadpdf(i,k) = 1._r8
- end if
- end do
- end do
-
- ! Make a dry adiabatic adjustment
- ! Note: nlvdry ****MUST**** be < pver
-
- COL: do i = 1, ncol
-
- if (dodad(i)) then
-
- zeps = 2.0e-5_r8
-
- do k = 1, nlvdry
- c1dad(k) = cappa*0.5_r8*(pmid(i,k+1)-pmid(i,k))/pint(i,k+1)
- c2dad(k) = (1._r8 - c1dad(k))/(1._r8 + c1dad(k))
- rdenom = 1._r8/(pdel(i,k)*c2dad(k) + pdel(i,k+1))
- c3dad(k) = rdenom*pdel(i,k)
- c4dad(k) = rdenom*pdel(i,k+1)
- end do
-
-50 continue
-
- do jiter = 1, niter
- ilconv = .true.
-
- do k = 1, nlvdry
- zepsdp = zeps*(pmid(i,k+1) - pmid(i,k))
- zgamma = c1dad(k)*(t(i,k) + t(i,k+1))
-
- if ((t(i,k+1)-t(i,k)) >= (zgamma+zepsdp)) then
- ilconv = .false.
- t(i,k+1) = t(i,k)*c3dad(k) + t(i,k+1)*c4dad(k)
- t(i,k) = c2dad(k)*t(i,k+1)
- qave = (pdel(i,k+1)*q(i,k+1) + pdel(i,k)*q(i,k))/(pdel(i,k+1)+ pdel(i,k))
- q(i,k+1) = qave
- q(i,k) = qave
- end if
-
- end do
-
- if (ilconv) cycle COL ! convergence => next longitude
- end do
-
- ! Double convergence criterion if no convergence in niter iterations
-
- zeps = zeps + zeps
- if (zeps > 1.e-4_r8) then
- icol_err = i
- return ! error return
- else
- go to 50
- end if
-
- end if
-
- end do COL
-
- deallocate(c1dad, c2dad, c3dad, c4dad)
-
-end subroutine dadadj_calc
-
-!===============================================================================
-
-end module dadadj
diff --git a/src/physics/cam/dadadj_cam.F90 b/src/physics/cam/dadadj_cam.F90
index 0717865ca8..c2a6d685d1 100644
--- a/src/physics/cam/dadadj_cam.F90
+++ b/src/physics/cam/dadadj_cam.F90
@@ -2,7 +2,7 @@ module dadadj_cam
! CAM interfaces for the dry adiabatic adjustment parameterization
-use shr_kind_mod, only: r8=>shr_kind_r8, cs=>shr_kind_cs
+use shr_kind_mod, only: r8=>shr_kind_r8, cs=>shr_kind_cs, cm=>shr_kind_cm
use ppgrid, only: pcols, pver, pverp
use constituents, only: pcnst
use air_composition, only: cappav, cpairv
@@ -17,7 +17,7 @@ module dadadj_cam
use namelist_utils, only: find_group_name
use units, only: getunit, freeunit
-use dadadj, only: dadadj_initial, dadadj_calc
+use dadadj, only: dadadj_init, dadadj_run
implicit none
private
@@ -25,7 +25,7 @@ module dadadj_cam
public :: &
dadadj_readnl, &
- dadadj_init, &
+ dadadj_cam_init, &
dadadj_tend
! Namelist variables
@@ -42,8 +42,10 @@ subroutine dadadj_readnl(filein)
namelist /dadadj_nl/ dadadj_nlvdry, dadadj_niter
- integer :: unitn, ierr
- character(len=*), parameter :: sub='dadadj_readnl'
+ integer :: unitn, ierr
+ integer :: errflg ! CCPP physics scheme error flag
+ character(len=512) :: errmsg ! CCPP physics scheme error message
+ character(len=*), parameter :: sub='dadadj_readnl'
!------------------------------------------------------------------
! Read namelist
@@ -67,13 +69,16 @@ subroutine dadadj_readnl(filein)
call mpibcast(dadadj_niter, 1, mpi_integer, masterprocid, mpicom)
#endif
- call dadadj_initial(dadadj_nlvdry, dadadj_niter)
+ call dadadj_init(dadadj_nlvdry, dadadj_niter, pver, errmsg, errflg)
+ if (errflg /=0) then
+ call endrun('dadadj_readnl: Error returned from dadadj_init: '//trim(errmsg))
+ end if
if (masterproc .and. .not. use_simple_phys) then
write(iulog,*)'Dry adiabatic adjustment applied to top N layers; N=', &
- dadadj_nlvdry
+ dadadj_nlvdry
write(iulog,*)'Dry adiabatic adjustment number of iterations for convergence =', &
- dadadj_niter
+ dadadj_niter
end if
end subroutine dadadj_readnl
@@ -81,12 +86,12 @@ end subroutine dadadj_readnl
!===============================================================================
-subroutine dadadj_init()
+subroutine dadadj_cam_init()
use cam_history, only: addfld
call addfld('DADADJ_PD', (/ 'lev' /), 'A', 'probability', 'dry adiabatic adjustment probability')
-end subroutine dadadj_init
+end subroutine dadadj_cam_init
!===============================================================================
@@ -98,39 +103,49 @@ subroutine dadadj_tend(dt, state, ptend)
type(physics_state), intent(in) :: state ! Physics state variables
type(physics_ptend), intent(out) :: ptend ! parameterization tendencies
- logical :: lq(pcnst)
- real(r8) :: dadpdf(pcols, pver)
- integer :: ncol, lchnk, icol_err
- character(len=128) :: errstring ! Error string
-
- ncol = state%ncol
- lchnk = state%lchnk
- lq(:) = .FALSE.
- lq(1) = .TRUE.
- call physics_ptend_init(ptend, state%psetcols, 'dadadj', ls=.true., lq=lq)
-
- ! use the ptend components for temporary storate and copy state info for input to
- ! dadadj_calc which directly updates the temperature and moisture input arrays.
-
- ptend%s(:ncol,:pver) = state%t(:ncol,:pver)
- ptend%q(:ncol,:pver,1) = state%q(:ncol,:pver,1)
-
- call dadadj_calc( &
- ncol, state%pmid, state%pint, state%pdel, cappav(:,:,lchnk), ptend%s, &
- ptend%q(:,:,1), dadpdf, icol_err)
-
- call outfld('DADADJ_PD', dadpdf(:ncol,:), ncol, lchnk)
-
- if (icol_err > 0) then
- ! error exit
- write(errstring, *) &
- 'dadadj_calc: No convergence in column at lat,lon:', &
- state%lat(icol_err)*180._r8/pi, state%lon(icol_err)*180._r8/pi
- call handle_errmsg(errstring, subname="dadadj_tend")
- end if
-
- ptend%s(:ncol,:) = (ptend%s(:ncol,:) - state%t(:ncol,:) )/dt * cpairv(:ncol,:,lchnk)
- ptend%q(:ncol,:,1) = (ptend%q(:ncol,:,1) - state%q(:ncol,:,1))/dt
+ character(len=512) :: errstring ! Error string
+ character(len=512) :: errmsg ! CCPP physics scheme error message
+ character(len=64) :: scheme_name! CCPP physics scheme name (not used in CAM)
+ integer :: icol_err
+ integer :: lchnk
+ integer :: ncol
+ integer :: errflg ! CCPP physics scheme error flag
+ logical :: lq(pcnst)
+ real(r8) :: dadpdf(pcols, pver)
+
+ !------------------------------------------------------------------
+ ncol = state%ncol
+ lchnk = state%lchnk
+ lq(:) = .FALSE.
+ lq(1) = .TRUE.
+ call physics_ptend_init(ptend, state%psetcols, 'dadadj', ls=.true., lq=lq)
+
+ !REMOVECAM - no longer need these when CAM is retired and pcols no longer exists
+ dadpdf = 0._r8
+ ptend%s = 0._r8
+ ptend%q = 0._r8
+ !REMOVECAM_END
+
+ ! dadadj_run returns t tend, we are passing the ptend%s array to receive the t tendency and will convert it to s
+ ! before it is returned to CAM..
+ call dadadj_run( &
+ ncol, pver, dt, state%pmid(:ncol,:), state%pint(:ncol,:), state%pdel(:ncol,:), &
+ state%t(:ncol,:), state%q(:ncol,:,1), cappav(:ncol,:,lchnk), cpairv(:ncol,:,lchnk), ptend%s(:ncol,:), &
+ ptend%q(:ncol,:,1), dadpdf(:ncol,:), scheme_name, errmsg, errflg)
+
+ ! error exit
+ if (errflg /= 0) then
+ ! If this is a Convergence error then output lat lon of problem column using column index (errflg)
+ if(index('Convergence', errmsg) /= 0)then
+ write(errstring, *) trim(adjustl(errmsg)),' lat:',state%lat(errflg)*180._r8/pi,' lon:', &
+ state%lon(errflg)*180._r8/pi
+ else
+ errstring=trim(errmsg)
+ end if
+ call endrun('Error dadadj_tend:'//trim(errstring))
+ end if
+
+ call outfld('DADADJ_PD', dadpdf(:ncol,:), ncol, lchnk)
end subroutine dadadj_tend
diff --git a/src/physics/cam/gw_drag.F90 b/src/physics/cam/gw_drag.F90
index aeab27a5c6..e861d2173e 100644
--- a/src/physics/cam/gw_drag.F90
+++ b/src/physics/cam/gw_drag.F90
@@ -1716,7 +1716,13 @@ subroutine gw_tend(state, pbuf, dt, ptend, cam_in, flx_heat)
call alloc_err(istat,'gw_tend','phase_speeds',ncol*band_movmtn%ngwv**2+1)
! Set up heating
- call pbuf_get_field(pbuf, ttend_dp_idx, ttend_dp)
+ if (ttend_dp_idx > 0) then
+ call pbuf_get_field(pbuf, ttend_dp_idx, ttend_dp)
+ else
+ allocate(ttend_dp(pcols,pver), stat=istat)
+ call alloc_err(istat, 'gw_tend', 'ttend_dp', pcols*pver)
+ ttend_dp = 0.0_r8
+ end if
! New couplings from CLUBB
call pbuf_get_field(pbuf, ttend_clubb_idx, ttend_clubb)
diff --git a/src/physics/cam/physpkg.F90 b/src/physics/cam/physpkg.F90
index a2aaad5564..1f7fad27af 100644
--- a/src/physics/cam/physpkg.F90
+++ b/src/physics/cam/physpkg.F90
@@ -778,7 +778,7 @@ subroutine phys_init( phys_state, phys_tend, pbuf2d, cam_in, cam_out )
use sslt_rebin, only: sslt_rebin_init
use tropopause, only: tropopause_init
use solar_data, only: solar_data_init
- use dadadj_cam, only: dadadj_init
+ use dadadj_cam, only: dadadj_cam_init
use cam_abortutils, only: endrun
use nudging, only: Nudge_Model, nudging_init
use cam_snapshot, only: cam_snapshot_init
@@ -953,7 +953,7 @@ subroutine phys_init( phys_state, phys_tend, pbuf2d, cam_in, cam_out )
#endif
call sslt_rebin_init()
call tropopause_init()
- call dadadj_init()
+ call dadadj_cam_init()
prec_dp_idx = pbuf_get_index('PREC_DP')
snow_dp_idx = pbuf_get_index('SNOW_DP')
@@ -2136,8 +2136,8 @@ subroutine tphysbc (ztodt, state, &
integer :: ixcldice, ixcldliq, ixq ! constituent indices for cloud liquid and ice water.
integer :: m, m_cnst
! for macro/micro co-substepping
- integer :: macmic_it ! iteration variables
- real(r8) :: cld_macmic_ztodt ! modified timestep
+ integer :: macmic_it ! iteration variables
+ real(r8) :: cld_macmic_ztodt ! modified timestep
! physics buffer fields to compute tendencies for stratiform package
integer itim_old, ifld
real(r8), pointer, dimension(:,:) :: cld ! cloud fraction
diff --git a/src/physics/cam/subcol_SILHS.F90 b/src/physics/cam/subcol_SILHS.F90
index e941889e50..c373ed6b3e 100644
--- a/src/physics/cam/subcol_SILHS.F90
+++ b/src/physics/cam/subcol_SILHS.F90
@@ -19,16 +19,20 @@ module subcol_SILHS
#ifdef SILHS
use clubb_intr, only: &
clubb_config_flags, &
- clubb_params, &
+ clubb_params_single_col, &
stats_metadata, &
stats_zt, stats_zm, stats_sfc, &
- pdf_params_chnk
+ pdf_params_chnk, &
+ hm_metadata, &
+ hydromet_dim, &
+ pdf_dim
use clubb_api_module, only: &
hmp2_ip_on_hmm2_ip_slope_type, &
hmp2_ip_on_hmm2_ip_intrcpt_type, &
precipitation_fractions, &
- stats
+ stats, &
+ core_rknd
use silhs_api_module, only: &
silhs_config_flags_type
@@ -59,6 +63,11 @@ module subcol_SILHS
type (stats), target :: stats_lh_zt, &
stats_lh_sfc
!$omp threadprivate(stats_lh_zt, stats_lh_sfc)
+
+ real( kind = core_rknd ), dimension(:,:), allocatable :: &
+ corr_array_n_cloud, &
+ corr_array_n_below
+
#endif
!-----
@@ -334,10 +343,8 @@ subroutine subcol_init_SILHS(pbuf2d)
#ifdef CLUBB_SGS
#ifdef SILHS
use clubb_api_module, only: core_rknd, &
- pdf_dim, &
setup_corr_varnce_array_api, &
init_pdf_hydromet_arrays_api, &
- Ncnp2_on_Ncnm2, &
set_clubb_debug_level_api
#endif
@@ -357,7 +364,6 @@ subroutine subcol_init_SILHS(pbuf2d)
! To set up CLUBB hydromet indices
integer :: &
- hydromet_dim, & ! Number of enabled hydrometeors
iirr, & ! Hydrometeor array index for rain water mixing ratio, rr
iirs, & ! Hydrometeor array index for snow mixing ratio, rs
iiri, & ! Hydrometeor array index for ice mixing ratio, ri
@@ -367,7 +373,7 @@ subroutine subcol_init_SILHS(pbuf2d)
iiNi, & ! Hydrometeor array index for ice concentration, Ni
iiNg ! Hydrometeor array index for graupel concentration, Ng
- integer :: l ! Loop variable
+ integer :: l, ierr=0 ! Loop variable, error check
! Set CLUBB's debug level
! This is called in module clubb_intr; no need to do it here.
@@ -446,36 +452,38 @@ subroutine subcol_init_SILHS(pbuf2d)
!-------------------------------
iirr = 1
iirs = 3
- iiri = 5
+ iiri = 5
iirg = -1
- iiNr = 2
+ iiNr = 2
iiNs = 4
- iiNi = 6
+ iiNi = 6
iiNg = -1
hydromet_dim = 6
-
! Set up pdf indices, hydromet indicies, hydromet arrays, and hydromet variance ratios
- call init_pdf_hydromet_arrays_api( 1.0_core_rknd, 1.0_core_rknd, & ! intent(in)
- hydromet_dim, & ! intent(in)
- iirr, iiri, iirs, iirg, & ! intent(in)
- iiNr, iiNi, iiNs, iiNg, & ! intent(in)
- subcol_SILHS_hmp2_ip_on_hmm2_ip_slope, & ! optional(in)
- subcol_SILHS_hmp2_ip_on_hmm2_ip_intrcpt ) ! optional(in)
-
- Ncnp2_on_Ncnm2 = subcol_SILHS_ncnp2_on_ncnm2
+ call init_pdf_hydromet_arrays_api( 1.0_core_rknd, 1.0_core_rknd, hydromet_dim, & ! intent(in)
+ iirr, iiNr, iiri, iiNi, & ! intent(in)
+ iirs, iiNs, iirg, iiNg, & ! intent(in)
+ subcol_SILHS_ncnp2_on_ncnm2, & ! intent(in)
+ hm_metadata, pdf_dim, & ! intent(out)
+ subcol_SILHS_hmp2_ip_on_hmm2_ip_slope, & ! optional(in)
+ subcol_SILHS_hmp2_ip_on_hmm2_ip_intrcpt ) ! optional(in)
!-------------------------------
! Set up hydrometeors and correlation arrays for SILHS
!-------------------------------
+ allocate( corr_array_n_cloud(pdf_dim,pdf_dim), corr_array_n_below(pdf_dim,pdf_dim), stat=ierr)
+ if( ierr /= 0 ) call endrun(' subcol_init_SILHS: failed to allocate corr_array fields ')
+
corr_file_path_cloud = trim( subcol_SILHS_corr_file_path )//trim( subcol_SILHS_corr_file_name )//cloud_file_ext
corr_file_path_below = trim( subcol_SILHS_corr_file_path )//trim( subcol_SILHS_corr_file_name )//below_file_ext
call setup_corr_varnce_array_api( corr_file_path_cloud, corr_file_path_below, &
- newunit(iunit), &
- clubb_config_flags%l_fix_w_chi_eta_correlations )
+ pdf_dim, hm_metadata, newunit(iunit), &
+ clubb_config_flags%l_fix_w_chi_eta_correlations, & ! In
+ corr_array_n_cloud, corr_array_n_below )
!-------------------------------
! Register output fields from SILHS
@@ -600,31 +608,15 @@ subroutine subcol_gen_SILHS(state, tend, state_sc, tend_sc, pbuf)
#ifdef CLUBB_SGS
#ifdef SILHS
- use clubb_api_module, only : hydromet_dim, &
-
- setup_pdf_parameters_api, &
-
- hydromet_pdf_parameter, &
+ use clubb_api_module, only : setup_pdf_parameters_api, &
zm2zt_api, setup_grid_heights_api, &
- iirr, iiNr, iirs, iiri, &
- iirg, iiNs, &
- iiNi, iiNg, &
-
core_rknd, &
w_tol_sqd, zero_threshold, &
em_min, cloud_frac_min, & ! rc_tol, &
- pdf_dim, &
- corr_array_n_cloud, &
- corr_array_n_below, &
- iiPDF_chi, iiPDF_rr, &
- iiPDF_w, iiPDF_Nr, &
- iiPDF_ri, iiPDF_Ni, &
- iiPDF_Ncn, iiPDF_rs, iiPDF_Ns, &
-
genrand_intg, genrand_init_api, &
nparams, ic_K, &
@@ -844,6 +836,13 @@ subroutine subcol_gen_SILHS(state, tend, state_sc, tend_sc, pbuf)
type(grid) :: gr
type(precipitation_fractions) :: precip_fracs
+
+ ! Used as shortcuts to avoid typing hm_metadata%iiPDF_xx
+ integer :: &
+ iiPDF_chi, iiPDF_rr, iiPDF_w, iiPDF_Nr, &
+ iiPDF_ri, iiPDF_Ni, iiPDF_Ncn, iiPDF_rs, iiPDF_Ns, &
+ iirr, iiNr, iirs, iiri, &
+ iirg, iiNs, iiNi, iiNg
!------------------------------------------------
! Begin Code
@@ -885,6 +884,26 @@ subroutine subcol_gen_SILHS(state, tend, state_sc, tend_sc, pbuf)
! does not?
! #ERDBG: The model iteration number is not used in SILHS unless
! sequence_length > 1, but nobody runs with that option.
+
+ ! Copy hm_metadata indices to shortcuts
+ iiPDF_chi = hm_metadata%iiPDF_chi
+ iiPDF_Ncn = hm_metadata%iiPDF_Ncn
+ iiPDF_rr = hm_metadata%iiPDF_rr
+ iiPDF_w = hm_metadata%iiPDF_w
+ iiPDF_Nr = hm_metadata%iiPDF_Nr
+ iiPDF_ri = hm_metadata%iiPDF_ri
+ iiPDF_Ni = hm_metadata%iiPDF_Ni
+ iiPDF_rs = hm_metadata%iiPDF_rs
+ iiPDF_Ns = hm_metadata%iiPDF_Ns
+ iirr = hm_metadata%iirr
+ iiNr = hm_metadata%iiNr
+ iirs = hm_metadata%iirs
+ iiri = hm_metadata%iiri
+ iirg = hm_metadata%iirg
+ iiNs = hm_metadata%iiNs
+ iiNi = hm_metadata%iiNi
+ iiNg = hm_metadata%iiNg
+
!----------------
! Establish associations between pointers and physics buffer fields
!----------------
@@ -902,7 +921,7 @@ subroutine subcol_gen_SILHS(state, tend, state_sc, tend_sc, pbuf)
call pbuf_get_field(pbuf, kvh_idx, khzm_in)
! Pull c_K from clubb parameters.
- c_K = clubb_params(ic_K)
+ c_K = clubb_params_single_col(ic_K)
!----------------
! Copy state and populate numbers and values of sub-columns
@@ -1129,27 +1148,28 @@ subroutine subcol_gen_SILHS(state, tend, state_sc, tend_sc, pbuf)
call init_precip_fracs_api( pverp-top_lev+1, ngrdcol, &
precip_fracs )
- call setup_pdf_parameters_api( gr, pverp-top_lev+1, ngrdcol, pdf_dim, ztodt, & ! In
- Nc_in_cloud, cld_frac_in, khzm, & ! In
- ice_supersat_frac_in, hydromet, wphydrometp, & ! In
- corr_array_n_cloud, corr_array_n_below, & ! In
- pdf_params_chnk(lchnk), & ! In
- clubb_params, & ! In
- clubb_config_flags%iiPDF_type, & ! In
- clubb_config_flags%l_use_precip_frac, & ! In
- clubb_config_flags%l_predict_upwp_vpwp, & ! In
- clubb_config_flags%l_diagnose_correlations, & ! In
- clubb_config_flags%l_calc_w_corr, & ! In
- clubb_config_flags%l_const_Nc_in_cloud, & ! In
- clubb_config_flags%l_fix_w_chi_eta_correlations, & ! In
- stats_metadata, & ! In
- stats_zt, stats_zm, stats_sfc, & ! In
- hydrometp2, & ! Inout
- mu_x_1, mu_x_2, & ! Out
- sigma_x_1, sigma_x_2, & ! Out
- corr_array_1, corr_array_2, & ! Out
- corr_cholesky_mtx_1, corr_cholesky_mtx_2, & ! Out
- precip_fracs ) ! Inout
+ call setup_pdf_parameters_api( gr, pverp-top_lev+1, ngrdcol, pdf_dim, hydromet_dim, ztodt, & ! In
+ Nc_in_cloud, cld_frac_in, khzm, & ! In
+ ice_supersat_frac_in, hydromet, wphydrometp, & ! In
+ corr_array_n_cloud, corr_array_n_below, & ! In
+ hm_metadata, & ! In
+ pdf_params_chnk(lchnk), & ! In
+ clubb_params_single_col, & ! In
+ clubb_config_flags%iiPDF_type, & ! In
+ clubb_config_flags%l_use_precip_frac, & ! In
+ clubb_config_flags%l_predict_upwp_vpwp, & ! In
+ clubb_config_flags%l_diagnose_correlations, & ! In
+ clubb_config_flags%l_calc_w_corr, & ! In
+ clubb_config_flags%l_const_Nc_in_cloud, & ! In
+ clubb_config_flags%l_fix_w_chi_eta_correlations, & ! In
+ stats_metadata, & ! In
+ stats_zt, stats_zm, stats_sfc, & ! In
+ hydrometp2, & ! Inout
+ mu_x_1, mu_x_2, & ! Out
+ sigma_x_1, sigma_x_2, & ! Out
+ corr_array_1, corr_array_2, & ! Out
+ corr_cholesky_mtx_1, corr_cholesky_mtx_2, & ! Out
+ precip_fracs ) ! Inout
! In order for Lscale to be used properly, it needs to be passed out of
! advance_clubb_core, saved to the pbuf, and then pulled out of the
@@ -1220,15 +1240,11 @@ subroutine subcol_gen_SILHS(state, tend, state_sc, tend_sc, pbuf)
iter, pdf_dim, num_subcols, sequence_length, pverp-top_lev+1, ngrdcol, & ! In
l_calc_weights_all_levs_itime, & ! In
pdf_params_chnk(lchnk), delta_zm, Lscale, & ! In
- lh_seed, & ! In
+ lh_seed, hm_metadata, & ! In
rho_ds_zt, & ! In
mu_x_1, mu_x_2, sigma_x_1, sigma_x_2, & ! In
corr_cholesky_mtx_1, corr_cholesky_mtx_2, & ! In
precip_fracs, silhs_config_flags, & ! In
- clubb_params, & ! In
- clubb_config_flags%l_uv_nudge, & ! In
- clubb_config_flags%l_tke_aniso, & ! In
- clubb_config_flags%l_standard_term_ta, & ! In
vert_decorr_coef, & ! In
stats_metadata, & ! In
stats_lh_zt, stats_lh_sfc, & ! InOut
@@ -1236,15 +1252,15 @@ subroutine subcol_gen_SILHS(state, tend, state_sc, tend_sc, pbuf)
lh_sample_point_weights) ! Out
! Extract clipped variables from subcolumns
- call clip_transform_silhs_output_api( gr, pverp-top_lev+1, ngrdcol, num_subcols, & ! In
- pdf_dim, hydromet_dim, & ! In
- X_mixt_comp_all_levs, & ! In
- X_nl_all_levs, & ! In
- pdf_params_chnk(lchnk), & ! In
- l_use_Ncn_to_Nc, & ! In
- lh_rt_clipped, lh_thl_clipped, & ! Out
- lh_rc_clipped, lh_rv_clipped, & ! Out
- lh_Nc_clipped ) ! Out
+ call clip_transform_silhs_output_api( gr, pverp-top_lev+1, ngrdcol, num_subcols, & ! In
+ pdf_dim, hydromet_dim, hm_metadata, & ! In
+ X_mixt_comp_all_levs, & ! In
+ X_nl_all_levs, & ! In
+ pdf_params_chnk(lchnk), & ! In
+ l_use_Ncn_to_Nc, & ! In
+ lh_rt_clipped, lh_thl_clipped, & ! Out
+ lh_rc_clipped, lh_rv_clipped, & ! Out
+ lh_Nc_clipped ) ! Out
!$acc wait
if ( l_est_kessler_microphys ) then
diff --git a/src/physics/cam7/physpkg.F90 b/src/physics/cam7/physpkg.F90
index d6b23c0fdf..9561780ecb 100644
--- a/src/physics/cam7/physpkg.F90
+++ b/src/physics/cam7/physpkg.F90
@@ -762,7 +762,7 @@ subroutine phys_init( phys_state, phys_tend, pbuf2d, cam_in, cam_out )
use clubb_intr, only: clubb_ini_cam
use tropopause, only: tropopause_init
use solar_data, only: solar_data_init
- use dadadj_cam, only: dadadj_init
+ use dadadj_cam, only: dadadj_cam_init
use cam_abortutils, only: endrun
use nudging, only: Nudge_Model, nudging_init
use cam_snapshot, only: cam_snapshot_init
@@ -921,7 +921,7 @@ subroutine phys_init( phys_state, phys_tend, pbuf2d, cam_in, cam_out )
call metdata_phys_init()
#endif
call tropopause_init()
- call dadadj_init()
+ call dadadj_cam_init()
prec_dp_idx = pbuf_get_index('PREC_DP')
snow_dp_idx = pbuf_get_index('SNOW_DP')
diff --git a/src/physics/clubb b/src/physics/clubb
index 50cee042e5..15e802092f 160000
--- a/src/physics/clubb
+++ b/src/physics/clubb
@@ -1 +1 @@
-Subproject commit 50cee042e588fefd3fe58c2a1d638affec8c0389
+Subproject commit 15e802092f65b3a20e5d67cb32d40f8a2771ca9b
diff --git a/test/system/archive_baseline.sh b/test/system/archive_baseline.sh
index 8460923a1f..f64561dc4d 100755
--- a/test/system/archive_baseline.sh
+++ b/test/system/archive_baseline.sh
@@ -12,7 +12,7 @@ cat << EOF1
NAME
archive_baseline.sh - archive pretag baselines to set locations on
- hobart, izumi and derecho.
+ izumi and derecho.
SYNOPSIS
@@ -24,41 +24,28 @@ SYNOPSIS
ENVIROMENT VARIABLES
CESM_TESTDIR - Directory that contains the CESM finished results you wish to archive.
- CAM_FC - Compiler used, only used on hobart and izumi (PGI,NAG), where the compiler
+ CAM_FC - Compiler used, used on derecho (INTEL, NVHPC) and izumi (GNU,NAG), where the compiler
name is appended to the archive directory.
BASELINE ARCHIVED LOCATION
- hobart, izumi: /fs/cgd/csm/models/atm/cam/pretag_bl/TAGNAME_pgi
- /fs/cgd/csm/models/atm/cam/pretag_bl/TAGNAME_nag
- derecho: /glade/campaign/cesm/community/amwg/cam_baselines/TAGNAME
+ izumi: /fs/cgd/csm/models/atm/cam/pretag_bl/TAGNAME_gnu
+ /fs/cgd/csm/models/atm/cam/pretag_bl/TAGNAME_nag
+ derecho: /glade/campaign/cesm/community/amwg/cam_baselines/TAGNAME_intel
+ /glade/campaign/cesm/community/amwg/cam_baselines/TAGNAME_nvhpc
HOW TO USE ARCHIVE BASELINES
- Set BL_TESTDIR to the archived baseline you wish to load.
+ on izumi:
+ env CESM_TESTDIR=/scratch/cluster/YourName/aux_cam_gnu_yyyymmddsssss CAM_FC=GNU ./archive_baseline.sh cam6_4_XXX
+ env CESM_TESTDIR=/scratch/cluster/YourName/aux_cam_nag_yyyymmddsssss CAM_FC=NAG ./archive_baseline.sh cam6_3_XXX
-
-WORK FLOW
-
- This is an example for hobart or izumi.
-
- Modify your sandbox with the changes you want.
- setenv CAM_FC PGI
- setenv CAM_TESTDIR /scratch/cluster/fischer/cam5_2_06
- Run the cam test suite.
- Make your trunk tag
- archive_baseline.sh cam5_2_06
-
- Create a new sandbox.
- setenv CAM_FC PGI
- setenv CAM_TESTDIR /scratch/cluster/fischer/cam5_2_07
- setenv BL_TESTDIR /fs/cgd/csm/models/atm/cam/pretag_bl/cam5_2_06_pgi
- Run the cam test suite.
- Make your trunk tag
- archive_baseline.sh cam5_2_07
+ on derecho:
+ env CESM_TESTDIR=/glade/derecho/scratch/YourName/aux_cam_intel_yyyymmddsssss CAM_FC=INTEL ./archive_baseline.sh cam6_4_XXX
+ env CESM_TESTDIR=/glade/derecho/scratch/YourName/aux_cam_nvhpc_yyyymmddsssss CAM_FC=NVHPC ./archive_baseline.sh cam6_4_XXX
WARNING
@@ -73,20 +60,10 @@ fi
hostname=`hostname`
case $hostname in
- ho*)
- echo "server: hobart"
- if [ -z "$CAM_FC" ]; then
- CAM_FC="PGI"
- fi
- test_file_list="tests_pretag_hobart_${CAM_FC,,}"
- cam_tag=$1_${CAM_FC,,}
- baselinedir="/fs/cgd/csm/models/atm/cam/pretag_bl/$cam_tag"
- ;;
-
iz*)
echo "server: izumi"
if [ -z "$CAM_FC" ]; then
- CAM_FC="PGI"
+ echo "Must specify CAM_FC"
fi
test_file_list="tests_pretag_izumi_${CAM_FC,,}"
cam_tag=$1_${CAM_FC,,}
@@ -96,10 +73,10 @@ case $hostname in
de*)
echo "server: derecho"
if [ -z "$CAM_FC" ]; then
- CAM_FC="INTEL"
+ echo "Must specify CAM_FC"
fi
- test_file_list="tests_pretag_derecho"
- cam_tag=$1
+ test_file_list="tests_pretag_derecho_${CAM_FC,,}"
+ cam_tag=$1_${CAM_FC,,}
baselinedir="/glade/campaign/cesm/community/amwg/cam_baselines/$cam_tag"
;;
@@ -130,7 +107,7 @@ fi
case $hostname in
- ch* | hobart | izumi)
+ de* | izumi)
if [ -z "$CESM_TESTDIR" ]; then
echo '***********************************************************************************'
echo 'INFO: The aux_cam and test_cam tests were NOT archived'
diff --git a/test/system/test_driver.sh b/test/system/test_driver.sh
index 80a632b14f..a53d0762d8 100755
--- a/test/system/test_driver.sh
+++ b/test/system/test_driver.sh
@@ -466,6 +466,9 @@ if [ "${hostname:0:6}" == "casper" ] || [ "${hostname:0:5}" == "crhtc" ]; then
fi
if [ -n "${CAM_FC}" ]; then
comp="_${CAM_FC,,}"
+else
+ echo "ERROR: Must specify CAM_FC"
+ exit 1
fi
if [ "${cesm_test_suite}" != "none" -a -n "${cesm_test_mach}" ]; then
@@ -547,8 +550,6 @@ if [ "${cesm_test_suite}" != "none" -a -n "${cesm_test_mach}" ]; then
if [ -n "${CAM_FC}" ]; then
testargs="${testargs} --xml-compiler ${CAM_FC,,}"
- else
- testargs="${testargs} --xml-compiler intel"
fi
case $hostname in
# derecho
@@ -586,8 +587,6 @@ if [ "${cesm_test_suite}" != "none" -a -n "${cesm_test_mach}" ]; then
cmd="query_testlists --xml-category $cesm_test --xml-machine ${cesm_test_mach}"
if [ -n "${CAM_FC}" ]; then
cmd="${cmd} --xml-compiler ${CAM_FC,,}"
- else
- cmd="${cmd} --xml-compiler intel"
fi
cmd="${CIME_ROOT}/scripts/"$cmd
cime_testlist=`$cmd`