diff --git a/cime b/cime
index 704fc1debc58..4388509869bd 160000
--- a/cime
+++ b/cime
@@ -1 +1 @@
-Subproject commit 704fc1debc5883a20247aa2ff8842851b0236f1d
+Subproject commit 4388509869bd5988d6315e2da65b1a2fbfa604fa
diff --git a/cime_config/allactive/config_pesall.xml b/cime_config/allactive/config_pesall.xml
index babca58ccb15..7bcf72e44e62 100644
--- a/cime_config/allactive/config_pesall.xml
+++ b/cime_config/allactive/config_pesall.xml
@@ -1379,6 +1379,34 @@
+
+
+ improv: any compset on ne30np4 grid
+
+ -4
+ -4
+ -4
+ -4
+ -4
+ -4
+ -4
+ -4
+
+
+
+ improv: BGC compset on ne30np4 grid
+
+ -8
+ -8
+ -8
+ -8
+ -8
+ -8
+ -8
+ -8
+
+
+
diff --git a/cime_config/machines/Depends.oneapi-ifx.cmake b/cime_config/machines/Depends.oneapi-ifx.cmake
index 8b51086df4a9..5a958df26eba 100644
--- a/cime_config/machines/Depends.oneapi-ifx.cmake
+++ b/cime_config/machines/Depends.oneapi-ifx.cmake
@@ -1,3 +1,5 @@
# compile mpas_seaice_core_interface.f90 with ifort, not ifx
-e3sm_add_flags("${CMAKE_BINARY_DIR}/core_seaice/model_forward/mpas_seaice_core_interface.f90" "-fc=ifort")
+if (NOT MPILIB STREQUAL "openmpi")
+ e3sm_add_flags("${CMAKE_BINARY_DIR}/core_seaice/model_forward/mpas_seaice_core_interface.f90" "-fc=ifort")
+endif()
diff --git a/cime_config/machines/cmake_macros/gnu_improv.cmake b/cime_config/machines/cmake_macros/gnu_improv.cmake
new file mode 100644
index 000000000000..3dd45bc09c10
--- /dev/null
+++ b/cime_config/machines/cmake_macros/gnu_improv.cmake
@@ -0,0 +1,8 @@
+if (COMP_NAME STREQUAL gptl)
+ string(APPEND CPPDEFS " -DHAVE_SLASHPROC")
+endif()
+string(APPEND CMAKE_C_FLAGS_RELEASE " -O2")
+string(APPEND CMAKE_Fortran_FLAGS_RELEASE " -O2")
+set(PIO_FILESYSTEM_HINTS "gpfs")
+string(APPEND SLIBS " /lcrc/group/e3sm/soft/improv/netlib-lapack/3.12.0/gcc-12.3.0/liblapack.a /lcrc/group/e3sm/soft/improv/netlib-lapack/3.12.0/gcc-12.3.0/libblas.a")
+
diff --git a/cime_config/machines/config_batch.xml b/cime_config/machines/config_batch.xml
index 80952fe34ef3..33bd48494a4e 100644
--- a/cime_config/machines/config_batch.xml
+++ b/cime_config/machines/config_batch.xml
@@ -423,6 +423,16 @@
+
+
+ -l select={{ num_nodes }}:mpiprocs={{ tasks_per_node }}
+
+
+ debug
+ compute
+
+
+
collaboration
@@ -643,28 +653,6 @@
-
-
- --nodes={{ num_nodes }}
- --ntasks-per-node={{ tasks_per_node }}
- --qos=standard
-
-
- standard
-
-
-
-
-
- --nodes={{ num_nodes }}
- --ntasks-per-node={{ tasks_per_node }}
- --qos=standard
-
-
- standard
-
-
-
--partition=standard
diff --git a/cime_config/machines/config_machines.xml b/cime_config/machines/config_machines.xml
index e5ebd96b6574..3dddf2038c09 100644
--- a/cime_config/machines/config_machines.xml
+++ b/cime_config/machines/config_machines.xml
@@ -2616,7 +2616,7 @@
$CIME_OUTPUT_ROOT/$CASE/bld
0.05
0.05
- 1000
+ 0
/lcrc/group/e3sm/soft/perl/chrys/lib/perl5
$SHELL{dirname $(dirname $(which nc-config))}
@@ -2698,7 +2698,7 @@
$CIME_OUTPUT_ROOT/$CASE/run
$CIME_OUTPUT_ROOT/$CASE/bld
0.1
- 1000
+ 0
$SHELL{dirname $(dirname $(which nc-config))}
$SHELL{dirname $(dirname $(which nf-config))}
@@ -2777,7 +2777,7 @@
$CIME_OUTPUT_ROOT/$CASE/run
$CIME_OUTPUT_ROOT/$CASE/bld
0.1
- 1000
+ 0
$SHELL{dirname $(dirname $(which nc-config))}
$SHELL{dirname $(dirname $(which nf-config))}
@@ -2897,6 +2897,68 @@
+
+ ANL LCRC cluster 825-node AMD 7713 2-sockets 128-cores per node
+ ilogin(1|2|3|4).lcrc.anl.gov
+ LINUX
+ gnu
+ openmpi
+ e3sm
+ /lcrc/group/e3sm/$USER/scratch/improv
+ /lcrc/group/e3sm/data/inputdata
+ /lcrc/group/e3sm/data/inputdata/atm/datm7
+ /lcrc/group/e3sm/$USER/scratch/improv/archive/$CASE
+ /lcrc/group/e3sm/baselines/improv/$COMPILER
+ /lcrc/group/e3sm/tools/cprnc/cprnc.improv
+ 8
+ e3sm_integration
+ 8
+ pbspro
+ E3SM
+ 128
+ 128
+ FALSE
+
+ mpirun
+
+ --tag-output -n {{ total_tasks }}
+ --map-by ppr:1:core:PE=$ENV{OMP_NUM_THREADS} --bind-to core --oversubscribe
+
+
+
+ /gpfs/fs1/soft/chrysalis/spack/opt/spack/linux-centos8-x86_64/gcc-9.3.0/lmod-8.3-5be73rg/lmod/lmod/init/sh
+ /gpfs/fs1/soft/chrysalis/spack/opt/spack/linux-centos8-x86_64/gcc-9.3.0/lmod-8.3-5be73rg/lmod/lmod/init/csh
+ /gpfs/fs1/soft/chrysalis/spack/opt/spack/linux-centos8-x86_64/gcc-9.3.0/lmod-8.3-5be73rg/lmod/lmod/init/env_modules_python.py
+ /gpfs/fs1/soft/chrysalis/spack/opt/spack/linux-centos8-x86_64/gcc-9.3.0/lmod-8.3-5be73rg/lmod/lmod/libexec/lmod python
+ module
+ module
+
+
+ cmake/3.27.4
+
+
+ gcc/12.3.0
+
+
+ $CIME_OUTPUT_ROOT/$CASE/run
+ $CIME_OUTPUT_ROOT/$CASE/bld
+ 0.05
+ 0
+
+ /lcrc/group/e3sm/soft/improv/netcdf-c/4.9.2b/gcc-12.3.0/openmpi-4.1.6
+ /lcrc/group/e3sm/soft/improv/netcdf-fortran/4.6.1b/gcc-12.3.0/openmpi-4.1.6
+ /lcrc/group/e3sm/soft/improv/pnetcdf/1.12.3/gcc-12.3.0/openmpi-4.1.6
+ /lcrc/group/e3sm/soft/improv/pnetcdf/1.12.3/gcc-12.3.0/openmpi-4.1.6/bin:/lcrc/group/e3sm/soft/improv/netcdf-fortran/4.6.1b/gcc-12.3.0/openmpi-4.1.6/bin:/lcrc/group/e3sm/soft/improv/netcdf-c/4.9.2b/gcc-12.3.0/openmpi-4.1.6/bin:/lcrc/group/e3sm/soft/improv/openmpi/4.1.6/gcc-12.3.0/bin:/lcrc/group/e3sm/soft/perl/improv/bin:$ENV{PATH}
+ $SHELL{lp=/lcrc/group/e3sm/soft/improv/netlib-lapack/3.12.0/gcc-12.3.0:/lcrc/group/e3sm/soft/improv/pnetcdf/1.12.3/gcc-12.3.0/openmpi-4.1.6/lib:/lcrc/group/e3sm/soft/improv/netcdf-fortran/4.6.1b/gcc-12.3.0/openmpi-4.1.6/lib:/lcrc/group/e3sm/soft/improv/netcdf-c/4.9.2b/gcc-12.3.0/openmpi-4.1.6/lib:/opt/pbs/lib:/lcrc/group/e3sm/soft/improv/openmpi/4.1.6/gcc-12.3.0/lib; if [ -z "$LD_LIBRARY_PATH" ]; then echo $lp; else echo "$lp:$LD_LIBRARY_PATH"; fi}
+
+
+ 128M
+
+
+ cores
+
+
+
LLNL Linux Cluster, Linux, 4 V100 GPUs/node, 44 IBM P9 cpu cores/node
lassen.*
@@ -4213,162 +4275,6 @@
-
- LANL Linux Cluster, 36 pes/node, batch system slurm
- gr-fe.*.lanl.gov
- LINUX
- intel,gnu
- openmpi,impi,mvapich
- climateacme
- /lustre/scratch4/turquoise/$ENV{USER}/E3SM/scratch
- /lustre/scratch4/turquoise/$ENV{USER}/E3SM/input_data
- /lustre/scratch4/turquoise/$ENV{USER}/E3SM/input_data/atm/datm7
- /lustre/scratch4/turquoise/$ENV{USER}/E3SM/archive/$CASE
- /lustre/scratch4/turquoise/$ENV{USER}/E3SM/input_data/ccsm_baselines/$COMPILER
- /turquoise/usr/projects/climate/SHARED_CLIMATE/software/wolf/cprnc/v0.40/cprnc
- 4
- e3sm_developer
- slurm
- luke.vanroekel @ gmail.com
- 36
- 32
- TRUE
-
- srun
-
- -n {{ total_tasks }}
-
-
-
-
-
-
- /usr/share/Modules/init/perl.pm
- /usr/share/Modules/init/python.py
- /etc/profile.d/z00_lmod.sh
- /etc/profile.d/z00_lmod.csh
- /usr/share/lmod/lmod/libexec/lmod perl
- /usr/share/lmod/lmod/libexec/lmod python
- module
- module
-
-
- cmake/3.16.2
-
-
- gcc/6.4.0
- openmpi/2.1.2
-
-
- gcc/6.4.0
- mvapich2/2.3
-
-
- intel/19.0.4
- intel-mpi/2019.4
-
-
- intel/18.0.2
- mvapich2/2.2
-
-
- intel/19.0.4
- openmpi/2.1.2
-
-
- friendly-testing
- hdf5-parallel/1.8.16
- pnetcdf/1.11.2
- netcdf-h5parallel/4.7.3
- mkl/2019.0.4
-
-
- $CIME_OUTPUT_ROOT/$CASE/run
- $CIME_OUTPUT_ROOT/$CASE/bld
-
- $ENV{MKLROOT}
- romio_ds_write=disable;romio_ds_read=disable;romio_cb_write=enable;romio_cb_read=enable
-
-
-
-
- LANL Linux Cluster, 36 pes/node, batch system slurm
- ba-fe.*.lanl.gov
- LINUX
- intel,gnu
- openmpi,impi,mvapich
- climateacme
- /lustre/scratch4/turquoise/$ENV{USER}/E3SM/scratch
- /lustre/scratch4/turquoise/$ENV{USER}/E3SM/input_data
- /lustre/scratch4/turquoise/$ENV{USER}/E3SM/input_data/atm/datm7
- /lustre/scratch4/turquoise/$ENV{USER}/E3SM/archive/$CASE
- /lustre/scratch4/turquoise/$ENV{USER}/E3SM/input_data/ccsm_baselines/$COMPILER
- /turquoise/usr/projects/climate/SHARED_CLIMATE/software/wolf/cprnc/v0.40/cprnc
- 4
- e3sm_developer
- slurm
- e3sm
- 36
- 32
- TRUE
-
- srun
-
- -n {{ total_tasks }}
-
-
-
-
-
-
- /usr/share/Modules/init/perl.pm
- /usr/share/Modules/init/python.py
- /etc/profile.d/z00_lmod.sh
- /etc/profile.d/z00_lmod.csh
- /usr/share/lmod/lmod/libexec/lmod perl
- /usr/share/lmod/lmod/libexec/lmod python
- module
- module
-
-
- cmake/3.16.2
-
-
- gcc/6.4.0
- openmpi/2.1.2
-
-
- gcc/6.4.0
- mvapich2/2.3
-
-
- intel/19.0.4
- intel-mpi/2019.4
-
-
- intel/18.0.2
- mvapich2/2.2
-
-
- intel/19.0.4
- openmpi/2.1.2
-
-
- friendly-testing
- hdf5-parallel/1.8.16
- pnetcdf/1.11.2
- netcdf-h5parallel/4.7.3
- mkl/2019.0.4
-
-
- $CIME_OUTPUT_ROOT/$CASE/run
- $CIME_OUTPUT_ROOT/$CASE/bld
-
- $ENV{MKLROOT}
- romio_ds_write=disable;romio_ds_read=disable;romio_cb_write=enable;romio_cb_read=enable
-
-
-
Chicoma CPU-only nodes at LANL IC. Each node has 2 AMD EPYC 7H12 64-Core (Milan) 512GB
ch-fe*
diff --git a/cime_config/machines/config_pio.xml b/cime_config/machines/config_pio.xml
index 51aa6fc31ebe..742e82bd7ef7 100644
--- a/cime_config/machines/config_pio.xml
+++ b/cime_config/machines/config_pio.xml
@@ -63,8 +63,6 @@
netcdf
netcdf
netcdf
- netcdf
- netcdf
netcdf
netcdf
netcdf
diff --git a/cime_config/testmods_dirs/allactive/wcprod/README b/cime_config/testmods_dirs/allactive/wcprod/README
index 020bbf93e9f2..329e3e6ea7ab 100644
--- a/cime_config/testmods_dirs/allactive/wcprod/README
+++ b/cime_config/testmods_dirs/allactive/wcprod/README
@@ -3,4 +3,3 @@ water cycle production sims
Run these for at least 1 day to see all output.
Also use the CMIP6 compsets.
-If running longer, change the nhtfrq for the first history file.
diff --git a/cime_config/testmods_dirs/allactive/wcprod/user_nl_eam b/cime_config/testmods_dirs/allactive/wcprod/user_nl_eam
index eeac1d647b1d..095c6946f5de 100644
--- a/cime_config/testmods_dirs/allactive/wcprod/user_nl_eam
+++ b/cime_config/testmods_dirs/allactive/wcprod/user_nl_eam
@@ -1,11 +1,59 @@
- nhtfrq = -24,-24,-6,-6,-3,-24,-24
- mfilt = 1,30,120,120,240,30,1
- avgflag_pertape = 'A','A','I','A','A','A','I'
- fexcl1 = 'CFAD_SR532_CAL', 'LINOZ_DO3', 'LINOZ_DO3_PSC', 'LINOZ_O3CLIM', 'LINOZ_O3COL', 'LINOZ_SSO3', 'hstobie_linoz'
- fincl1 = 'extinct_sw_inp','extinct_lw_bnd7','extinct_lw_inp','CLD_CAL', 'TREFMNAV', 'TREFMXAV'
- fincl2 = 'FLUT','PRECT','U200','V200','U850','V850','Z500','OMEGA500','UBOT','VBOT','TREFHT','TREFHTMN:M','TREFHTMX:X','QREFHT','TS','PS','TMQ','TUQ','TVQ','TOZ', 'FLDS', 'FLNS', 'FSDS', 'FSNS', 'SHFLX', 'LHFLX', 'TGCLDCWP', 'TGCLDIWP', 'TGCLDLWP', 'CLDTOT', 'T250', 'T200', 'T150', 'T100', 'T050', 'T025', 'T010', 'T005', 'T002', 'T001', 'TTOP', 'U250', 'U150', 'U100', 'U050', 'U025', 'U010', 'U005', 'U002', 'U001', 'UTOP', 'FSNT', 'FLNT'
- fincl3 = 'PSL','T200','T500','U850','V850','UBOT','VBOT','TREFHT', 'Z700', 'TBOT:M'
- fincl4 = 'FLUT','U200','U850','PRECT','OMEGA500'
- fincl5 = 'PRECT','PRECC','TUQ','TVQ','QFLX','SHFLX','U90M','V90M'
- fincl6 = 'CLDTOT_ISCCP','MEANCLDALB_ISCCP','MEANTAU_ISCCP','MEANPTOP_ISCCP','MEANTB_ISCCP','CLDTOT_CAL','CLDTOT_CAL_LIQ','CLDTOT_CAL_ICE','CLDTOT_CAL_UN','CLDHGH_CAL','CLDHGH_CAL_LIQ','CLDHGH_CAL_ICE','CLDHGH_CAL_UN','CLDMED_CAL','CLDMED_CAL_LIQ','CLDMED_CAL_ICE','CLDMED_CAL_UN','CLDLOW_CAL','CLDLOW_CAL_LIQ','CLDLOW_CAL_ICE','CLDLOW_CAL_UN'
- fincl7 = 'O3', 'PS', 'TROP_P'
+cosp_lite = .true.
+
+empty_htapes = .true.
+
+avgflag_pertape = 'A','A','A','A','I','I'
+nhtfrq = -24,-24,-6,-3,-1,-24
+mfilt = 1,30,120,240,720,1
+
+fincl1 = 'AODALL','AODBC','AODDUST','AODPOM','AODSO4','AODSOA','AODSS','AODVIS',
+ 'CLDLOW','CLDMED','CLDHGH','CLDTOT',
+ 'CLDHGH_CAL','CLDLOW_CAL','CLDMED_CAL','CLD_MISR','CLDTOT_CAL',
+ 'CLMODIS','FISCCP1_COSP','FLDS','FLNS','FLNSC','FLNT','FLUT',
+ 'FLUTC','FSDS','FSDSC','FSNS','FSNSC','FSNT','FSNTOA','FSNTOAC','FSNTC',
+ 'ICEFRAC','LANDFRAC','LWCF','OCNFRAC','OMEGA','PRECC','PRECL','PRECSC','PRECSL','PS','PSL','Q',
+ 'QFLX','QREFHT','RELHUM','SCO','SHFLX','SOLIN','SWCF','T','TAUX','TAUY','TCO',
+ 'TGCLDLWP','TMQ','TREFHT','TREFMNAV','TREFMXAV','TS','U','U10','V','Z3',
+ 'dst_a1DDF','dst_a3DDF','dst_c1DDF','dst_c3DDF','dst_a1SFWET','dst_a3SFWET','dst_c1SFWET','dst_c3SFWET',
+ 'O3','LHFLX',
+ 'O3_2DTDA_trop','O3_2DTDB_trop','O3_2DTDD_trop','O3_2DTDE_trop','O3_2DTDI_trop','O3_2DTDL_trop',
+ 'O3_2DTDN_trop','O3_2DTDO_trop','O3_2DTDS_trop','O3_2DTDU_trop','O3_2DTRE_trop','O3_2DTRI_trop',
+ 'O3_SRF','NO_2DTDS','NO_TDLgt','NO2_2DTDD','NO2_2DTDS','NO2_TDAcf','CO_SRF','TROPE3D_P','TROP_P',
+ 'CDNUMC','SFDMS','so4_a1_sfgaex1','so4_a2_sfgaex1','so4_a3_sfgaex1','so4_a5_sfgaex1','soa_a1_sfgaex1',
+ 'soa_a2_sfgaex1','soa_a3_sfgaex1','GS_soa_a1','GS_soa_a2','GS_soa_a3','AQSO4_H2O2','AQSO4_O3',
+ 'SFSO2','SO2_CLXF','SO2','DF_SO2','AQ_SO2','GS_SO2','WD_SO2','ABURDENSO4_STR','ABURDENSO4_TRO',
+ 'ABURDENSO4','ABURDENBC','ABURDENDUST','ABURDENMOM','ABURDENPOM','ABURDENSEASALT',
+ 'ABURDENSOA','AODSO4_STR','AODSO4_TRO',
+ 'EXTINCT','AODABS','AODABSBC','CLDICE','CLDLIQ','CLD_CAL_TMPLIQ','CLD_CAL_TMPICE','Mass_bc_srf',
+ 'Mass_dst_srf','Mass_mom_srf','Mass_ncl_srf','Mass_pom_srf','Mass_so4_srf','Mass_soa_srf','Mass_bc_850',
+ 'Mass_dst_850','Mass_mom_850','Mass_ncl_850','Mass_pom_850','Mass_so4_850','Mass_soa_850','Mass_bc_500',
+ 'Mass_dst_500','Mass_mom_500','Mass_ncl_500','Mass_pom_500','Mass_so4_500','Mass_soa_500','Mass_bc_330',
+ 'Mass_dst_330','Mass_mom_330','Mass_ncl_330','Mass_pom_330','Mass_so4_330','Mass_soa_330','Mass_bc_200',
+ 'Mass_dst_200','Mass_mom_200','Mass_ncl_200','Mass_pom_200','Mass_so4_200','Mass_soa_200',
+ 'O3_2DTDD','O3_2DCIP','O3_2DCIL','CO_2DTDS','CO_2DTDD','CO_2DCEP','CO_2DCEL','NO_2DTDD',
+ 'FLNTC','SAODVIS',
+ 'H2OLNZ',
+ 'dst_a1SF','dst_a3SF',
+ 'PHIS','CLOUD','TGCLDIWP','TGCLDCWP','AREL',
+ 'CLDTOT_ISCCP','MEANCLDALB_ISCCP','MEANPTOP_ISCCP','CLD_CAL',
+ 'CLDTOT_CAL_LIQ','CLDTOT_CAL_ICE','CLDTOT_CAL_UN',
+ 'CLDHGH_CAL_LIQ','CLDHGH_CAL_ICE','CLDHGH_CAL_UN',
+ 'CLDMED_CAL_LIQ','CLDMED_CAL_ICE','CLDMED_CAL_UN',
+ 'CLDLOW_CAL_LIQ','CLDLOW_CAL_ICE','CLDLOW_CAL_UN',
+ 'CLWMODIS','CLIMODIS'
+
+fincl2 = 'PS', 'FLUT','PRECT','U200','V200','U850','V850',
+ 'TCO','SCO','TREFHTMN','TREFHTMX','TREFHT','QREFHT'
+fincl3 = 'PS', 'PSL','PRECT','TUQ','TVQ','UBOT','VBOT','TREFHT','FLUT','OMEGA500','TBOT','U850','V850','U200','V200','T200','T500','Z700'
+fincl4 = 'PRECT'
+fincl5 = 'O3_SRF'
+fincl6 = 'CO_2DMSD','NO2_2DMSD','NO_2DMSD','O3_2DMSD','O3_2DMSD_trop'
+
+! -- chemUCI settings ------------------
+history_chemdyg_summary = .true.
+history_gaschmbudget_2D = .false.
+history_gaschmbudget_2D_levels = .false.
+history_gaschmbudget_num = 6 !! no impact if history_gaschmbudget_2D = .false.
+
+! -- MAM5 settings ------------------
+is_output_interactive_volc = .true.
diff --git a/cime_config/testmods_dirs/allactive/wcprod/user_nl_elm b/cime_config/testmods_dirs/allactive/wcprod/user_nl_elm
index a93edc10b690..cd1adab77404 100644
--- a/cime_config/testmods_dirs/allactive/wcprod/user_nl_elm
+++ b/cime_config/testmods_dirs/allactive/wcprod/user_nl_elm
@@ -1,6 +1,40 @@
- finidat = ' '
- hist_dov2xy = .true.,.true.
- hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE', 'FIRA'
- hist_mfilt = 1,365
- hist_nhtfrq = -24,-24
- hist_avgflag_pertape = 'A','A'
+hist_dov2xy = .true.,.true.
+hist_fexcl1 = 'AGWDNPP','ALTMAX_LASTYEAR','AVAIL_RETRANSP','AVAILC','BAF_CROP',
+ 'BAF_PEATF','BIOCHEM_PMIN_TO_PLANT','CH4_SURF_AERE_SAT','CH4_SURF_AERE_UNSAT','CH4_SURF_DIFF_SAT',
+ 'CH4_SURF_DIFF_UNSAT','CH4_SURF_EBUL_SAT','CH4_SURF_EBUL_UNSAT','CMASS_BALANCE_ERROR','cn_scalar',
+ 'COL_PTRUNC','CONC_CH4_SAT','CONC_CH4_UNSAT','CONC_O2_SAT','CONC_O2_UNSAT',
+ 'cp_scalar','CWDC_HR','CWDC_LOSS','CWDC_TO_LITR2C','CWDC_TO_LITR3C',
+ 'CWDC_vr','CWDN_TO_LITR2N','CWDN_TO_LITR3N','CWDN_vr','CWDP_TO_LITR2P',
+ 'CWDP_TO_LITR3P','CWDP_vr','DWT_CONV_CFLUX_DRIBBLED','F_CO2_SOIL','F_CO2_SOIL_vr',
+ 'F_DENIT_vr','F_N2O_DENIT','F_N2O_NIT','F_NIT_vr','FCH4_DFSAT',
+ 'FINUNDATED_LAG','FPI_P_vr','FPI_vr','FROOTC_LOSS','HR_vr',
+ 'LABILEP_TO_SECONDP','LABILEP_vr','LAND_UPTAKE','LEAF_MR','leaf_npimbalance',
+ 'LEAFC_LOSS','LEAFC_TO_LITTER','LFC2','LITR1_HR','LITR1C_TO_SOIL1C',
+ 'LITR1C_vr','LITR1N_TNDNCY_VERT_TRANS','LITR1N_TO_SOIL1N','LITR1N_vr','LITR1P_TNDNCY_VERT_TRANS',
+ 'LITR1P_TO_SOIL1P','LITR1P_vr','LITR2_HR','LITR2C_TO_SOIL2C','LITR2C_vr',
+ 'LITR2N_TNDNCY_VERT_TRANS','LITR2N_TO_SOIL2N','LITR2N_vr','LITR2P_TNDNCY_VERT_TRANS','LITR2P_TO_SOIL2P',
+ 'LITR2P_vr','LITR3_HR','LITR3C_TO_SOIL3C','LITR3C_vr','LITR3N_TNDNCY_VERT_TRANS',
+ 'LITR3N_TO_SOIL3N','LITR3N_vr','LITR3P_TNDNCY_VERT_TRANS','LITR3P_TO_SOIL3P','LITR3P_vr',
+ 'M_LITR1C_TO_LEACHING','M_LITR2C_TO_LEACHING','M_LITR3C_TO_LEACHING','M_SOIL1C_TO_LEACHING','M_SOIL2C_TO_LEACHING',
+ 'M_SOIL3C_TO_LEACHING','M_SOIL4C_TO_LEACHING','NDEPLOY','NEM','nlim_m',
+ 'o2_decomp_depth_unsat','OCCLP_vr','PDEPLOY','PLANT_CALLOC','PLANT_NDEMAND',
+ 'PLANT_NDEMAND_COL','PLANT_PALLOC','PLANT_PDEMAND','PLANT_PDEMAND_COL','plim_m',
+ 'POT_F_DENIT','POT_F_NIT','POTENTIAL_IMMOB','POTENTIAL_IMMOB_P','PRIMP_TO_LABILEP',
+ 'PRIMP_vr','PROD1P_LOSS','QOVER_LAG','RETRANSN_TO_NPOOL','RETRANSP_TO_PPOOL',
+ 'SCALARAVG_vr','SECONDP_TO_LABILEP','SECONDP_TO_OCCLP','SECONDP_vr','SMIN_NH4_vr',
+ 'SMIN_NO3_vr','SMINN_TO_SOIL1N_L1','SMINN_TO_SOIL2N_L2','SMINN_TO_SOIL2N_S1','SMINN_TO_SOIL3N_L3',
+ 'SMINN_TO_SOIL3N_S2','SMINN_TO_SOIL4N_S3','SMINP_TO_SOIL1P_L1','SMINP_TO_SOIL2P_L2','SMINP_TO_SOIL2P_S1',
+ 'SMINP_TO_SOIL3P_L3','SMINP_TO_SOIL3P_S2','SMINP_TO_SOIL4P_S3','SMINP_vr','SOIL1_HR','SOIL1C_TO_SOIL2C','SOIL1C_vr','SOIL1N_TNDNCY_VERT_TRANS','SOIL1N_TO_SOIL2N','SOIL1N_vr',
+ 'SOIL1P_TNDNCY_VERT_TRANS','SOIL1P_TO_SOIL2P','SOIL1P_vr','SOIL2_HR','SOIL2C_TO_SOIL3C',
+ 'SOIL2C_vr','SOIL2N_TNDNCY_VERT_TRANS','SOIL2N_TO_SOIL3N','SOIL2N_vr','SOIL2P_TNDNCY_VERT_TRANS',
+ 'SOIL2P_TO_SOIL3P','SOIL2P_vr','SOIL3_HR','SOIL3C_TO_SOIL4C','SOIL3C_vr',
+ 'SOIL3N_TNDNCY_VERT_TRANS','SOIL3N_TO_SOIL4N','SOIL3N_vr','SOIL3P_TNDNCY_VERT_TRANS','SOIL3P_TO_SOIL4P',
+ 'SOIL3P_vr','SOIL4_HR','SOIL4C_vr','SOIL4N_TNDNCY_VERT_TRANS','SOIL4N_TO_SMINN',
+ 'SOIL4N_vr','SOIL4P_TNDNCY_VERT_TRANS','SOIL4P_TO_SMINP','SOIL4P_vr','SOLUTIONP_vr',
+ 'TCS_MONTH_BEGIN','TCS_MONTH_END','TOTCOLCH4','water_scalar','WF',
+ 'wlim_m','WOODC_LOSS','WTGQ'
+hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC'
+hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE', 'FIRA'
+hist_mfilt = 1,365
+hist_nhtfrq = -24,-24
+hist_avgflag_pertape = 'A','A'
diff --git a/cime_config/testmods_dirs/allactive/wcprod_1850/README b/cime_config/testmods_dirs/allactive/wcprod_1850/README
index 020bbf93e9f2..329e3e6ea7ab 100644
--- a/cime_config/testmods_dirs/allactive/wcprod_1850/README
+++ b/cime_config/testmods_dirs/allactive/wcprod_1850/README
@@ -3,4 +3,3 @@ water cycle production sims
Run these for at least 1 day to see all output.
Also use the CMIP6 compsets.
-If running longer, change the nhtfrq for the first history file.
diff --git a/cime_config/testmods_dirs/allactive/wcprod_1850/user_nl_eam b/cime_config/testmods_dirs/allactive/wcprod_1850/user_nl_eam
index eeac1d647b1d..095c6946f5de 100644
--- a/cime_config/testmods_dirs/allactive/wcprod_1850/user_nl_eam
+++ b/cime_config/testmods_dirs/allactive/wcprod_1850/user_nl_eam
@@ -1,11 +1,59 @@
- nhtfrq = -24,-24,-6,-6,-3,-24,-24
- mfilt = 1,30,120,120,240,30,1
- avgflag_pertape = 'A','A','I','A','A','A','I'
- fexcl1 = 'CFAD_SR532_CAL', 'LINOZ_DO3', 'LINOZ_DO3_PSC', 'LINOZ_O3CLIM', 'LINOZ_O3COL', 'LINOZ_SSO3', 'hstobie_linoz'
- fincl1 = 'extinct_sw_inp','extinct_lw_bnd7','extinct_lw_inp','CLD_CAL', 'TREFMNAV', 'TREFMXAV'
- fincl2 = 'FLUT','PRECT','U200','V200','U850','V850','Z500','OMEGA500','UBOT','VBOT','TREFHT','TREFHTMN:M','TREFHTMX:X','QREFHT','TS','PS','TMQ','TUQ','TVQ','TOZ', 'FLDS', 'FLNS', 'FSDS', 'FSNS', 'SHFLX', 'LHFLX', 'TGCLDCWP', 'TGCLDIWP', 'TGCLDLWP', 'CLDTOT', 'T250', 'T200', 'T150', 'T100', 'T050', 'T025', 'T010', 'T005', 'T002', 'T001', 'TTOP', 'U250', 'U150', 'U100', 'U050', 'U025', 'U010', 'U005', 'U002', 'U001', 'UTOP', 'FSNT', 'FLNT'
- fincl3 = 'PSL','T200','T500','U850','V850','UBOT','VBOT','TREFHT', 'Z700', 'TBOT:M'
- fincl4 = 'FLUT','U200','U850','PRECT','OMEGA500'
- fincl5 = 'PRECT','PRECC','TUQ','TVQ','QFLX','SHFLX','U90M','V90M'
- fincl6 = 'CLDTOT_ISCCP','MEANCLDALB_ISCCP','MEANTAU_ISCCP','MEANPTOP_ISCCP','MEANTB_ISCCP','CLDTOT_CAL','CLDTOT_CAL_LIQ','CLDTOT_CAL_ICE','CLDTOT_CAL_UN','CLDHGH_CAL','CLDHGH_CAL_LIQ','CLDHGH_CAL_ICE','CLDHGH_CAL_UN','CLDMED_CAL','CLDMED_CAL_LIQ','CLDMED_CAL_ICE','CLDMED_CAL_UN','CLDLOW_CAL','CLDLOW_CAL_LIQ','CLDLOW_CAL_ICE','CLDLOW_CAL_UN'
- fincl7 = 'O3', 'PS', 'TROP_P'
+cosp_lite = .true.
+
+empty_htapes = .true.
+
+avgflag_pertape = 'A','A','A','A','I','I'
+nhtfrq = -24,-24,-6,-3,-1,-24
+mfilt = 1,30,120,240,720,1
+
+fincl1 = 'AODALL','AODBC','AODDUST','AODPOM','AODSO4','AODSOA','AODSS','AODVIS',
+ 'CLDLOW','CLDMED','CLDHGH','CLDTOT',
+ 'CLDHGH_CAL','CLDLOW_CAL','CLDMED_CAL','CLD_MISR','CLDTOT_CAL',
+ 'CLMODIS','FISCCP1_COSP','FLDS','FLNS','FLNSC','FLNT','FLUT',
+ 'FLUTC','FSDS','FSDSC','FSNS','FSNSC','FSNT','FSNTOA','FSNTOAC','FSNTC',
+ 'ICEFRAC','LANDFRAC','LWCF','OCNFRAC','OMEGA','PRECC','PRECL','PRECSC','PRECSL','PS','PSL','Q',
+ 'QFLX','QREFHT','RELHUM','SCO','SHFLX','SOLIN','SWCF','T','TAUX','TAUY','TCO',
+ 'TGCLDLWP','TMQ','TREFHT','TREFMNAV','TREFMXAV','TS','U','U10','V','Z3',
+ 'dst_a1DDF','dst_a3DDF','dst_c1DDF','dst_c3DDF','dst_a1SFWET','dst_a3SFWET','dst_c1SFWET','dst_c3SFWET',
+ 'O3','LHFLX',
+ 'O3_2DTDA_trop','O3_2DTDB_trop','O3_2DTDD_trop','O3_2DTDE_trop','O3_2DTDI_trop','O3_2DTDL_trop',
+ 'O3_2DTDN_trop','O3_2DTDO_trop','O3_2DTDS_trop','O3_2DTDU_trop','O3_2DTRE_trop','O3_2DTRI_trop',
+ 'O3_SRF','NO_2DTDS','NO_TDLgt','NO2_2DTDD','NO2_2DTDS','NO2_TDAcf','CO_SRF','TROPE3D_P','TROP_P',
+ 'CDNUMC','SFDMS','so4_a1_sfgaex1','so4_a2_sfgaex1','so4_a3_sfgaex1','so4_a5_sfgaex1','soa_a1_sfgaex1',
+ 'soa_a2_sfgaex1','soa_a3_sfgaex1','GS_soa_a1','GS_soa_a2','GS_soa_a3','AQSO4_H2O2','AQSO4_O3',
+ 'SFSO2','SO2_CLXF','SO2','DF_SO2','AQ_SO2','GS_SO2','WD_SO2','ABURDENSO4_STR','ABURDENSO4_TRO',
+ 'ABURDENSO4','ABURDENBC','ABURDENDUST','ABURDENMOM','ABURDENPOM','ABURDENSEASALT',
+ 'ABURDENSOA','AODSO4_STR','AODSO4_TRO',
+ 'EXTINCT','AODABS','AODABSBC','CLDICE','CLDLIQ','CLD_CAL_TMPLIQ','CLD_CAL_TMPICE','Mass_bc_srf',
+ 'Mass_dst_srf','Mass_mom_srf','Mass_ncl_srf','Mass_pom_srf','Mass_so4_srf','Mass_soa_srf','Mass_bc_850',
+ 'Mass_dst_850','Mass_mom_850','Mass_ncl_850','Mass_pom_850','Mass_so4_850','Mass_soa_850','Mass_bc_500',
+ 'Mass_dst_500','Mass_mom_500','Mass_ncl_500','Mass_pom_500','Mass_so4_500','Mass_soa_500','Mass_bc_330',
+ 'Mass_dst_330','Mass_mom_330','Mass_ncl_330','Mass_pom_330','Mass_so4_330','Mass_soa_330','Mass_bc_200',
+ 'Mass_dst_200','Mass_mom_200','Mass_ncl_200','Mass_pom_200','Mass_so4_200','Mass_soa_200',
+ 'O3_2DTDD','O3_2DCIP','O3_2DCIL','CO_2DTDS','CO_2DTDD','CO_2DCEP','CO_2DCEL','NO_2DTDD',
+ 'FLNTC','SAODVIS',
+ 'H2OLNZ',
+ 'dst_a1SF','dst_a3SF',
+ 'PHIS','CLOUD','TGCLDIWP','TGCLDCWP','AREL',
+ 'CLDTOT_ISCCP','MEANCLDALB_ISCCP','MEANPTOP_ISCCP','CLD_CAL',
+ 'CLDTOT_CAL_LIQ','CLDTOT_CAL_ICE','CLDTOT_CAL_UN',
+ 'CLDHGH_CAL_LIQ','CLDHGH_CAL_ICE','CLDHGH_CAL_UN',
+ 'CLDMED_CAL_LIQ','CLDMED_CAL_ICE','CLDMED_CAL_UN',
+ 'CLDLOW_CAL_LIQ','CLDLOW_CAL_ICE','CLDLOW_CAL_UN',
+ 'CLWMODIS','CLIMODIS'
+
+fincl2 = 'PS', 'FLUT','PRECT','U200','V200','U850','V850',
+ 'TCO','SCO','TREFHTMN','TREFHTMX','TREFHT','QREFHT'
+fincl3 = 'PS', 'PSL','PRECT','TUQ','TVQ','UBOT','VBOT','TREFHT','FLUT','OMEGA500','TBOT','U850','V850','U200','V200','T200','T500','Z700'
+fincl4 = 'PRECT'
+fincl5 = 'O3_SRF'
+fincl6 = 'CO_2DMSD','NO2_2DMSD','NO_2DMSD','O3_2DMSD','O3_2DMSD_trop'
+
+! -- chemUCI settings ------------------
+history_chemdyg_summary = .true.
+history_gaschmbudget_2D = .false.
+history_gaschmbudget_2D_levels = .false.
+history_gaschmbudget_num = 6 !! no impact if history_gaschmbudget_2D = .false.
+
+! -- MAM5 settings ------------------
+is_output_interactive_volc = .true.
diff --git a/cime_config/testmods_dirs/allactive/wcprod_1850/user_nl_elm b/cime_config/testmods_dirs/allactive/wcprod_1850/user_nl_elm
index 0bbfbeea61bc..cd1adab77404 100644
--- a/cime_config/testmods_dirs/allactive/wcprod_1850/user_nl_elm
+++ b/cime_config/testmods_dirs/allactive/wcprod_1850/user_nl_elm
@@ -1,7 +1,40 @@
-! Finidat to be updated, The one below not compatible with v3 lnd config (with TOP and BGC mode, new grid)
-! finidat = '$DIN_LOC_ROOT/lnd/clm2/initdata_map/clmi.WCYCL1850.ne30pg2_EC30to60E2r2.SMS_Ld1.c20230213.nc'
- hist_dov2xy = .true.,.true.
- hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE', 'FIRA'
- hist_mfilt = 1,365
- hist_nhtfrq = -24,-24
- hist_avgflag_pertape = 'A','A'
+hist_dov2xy = .true.,.true.
+hist_fexcl1 = 'AGWDNPP','ALTMAX_LASTYEAR','AVAIL_RETRANSP','AVAILC','BAF_CROP',
+ 'BAF_PEATF','BIOCHEM_PMIN_TO_PLANT','CH4_SURF_AERE_SAT','CH4_SURF_AERE_UNSAT','CH4_SURF_DIFF_SAT',
+ 'CH4_SURF_DIFF_UNSAT','CH4_SURF_EBUL_SAT','CH4_SURF_EBUL_UNSAT','CMASS_BALANCE_ERROR','cn_scalar',
+ 'COL_PTRUNC','CONC_CH4_SAT','CONC_CH4_UNSAT','CONC_O2_SAT','CONC_O2_UNSAT',
+ 'cp_scalar','CWDC_HR','CWDC_LOSS','CWDC_TO_LITR2C','CWDC_TO_LITR3C',
+ 'CWDC_vr','CWDN_TO_LITR2N','CWDN_TO_LITR3N','CWDN_vr','CWDP_TO_LITR2P',
+ 'CWDP_TO_LITR3P','CWDP_vr','DWT_CONV_CFLUX_DRIBBLED','F_CO2_SOIL','F_CO2_SOIL_vr',
+ 'F_DENIT_vr','F_N2O_DENIT','F_N2O_NIT','F_NIT_vr','FCH4_DFSAT',
+ 'FINUNDATED_LAG','FPI_P_vr','FPI_vr','FROOTC_LOSS','HR_vr',
+ 'LABILEP_TO_SECONDP','LABILEP_vr','LAND_UPTAKE','LEAF_MR','leaf_npimbalance',
+ 'LEAFC_LOSS','LEAFC_TO_LITTER','LFC2','LITR1_HR','LITR1C_TO_SOIL1C',
+ 'LITR1C_vr','LITR1N_TNDNCY_VERT_TRANS','LITR1N_TO_SOIL1N','LITR1N_vr','LITR1P_TNDNCY_VERT_TRANS',
+ 'LITR1P_TO_SOIL1P','LITR1P_vr','LITR2_HR','LITR2C_TO_SOIL2C','LITR2C_vr',
+ 'LITR2N_TNDNCY_VERT_TRANS','LITR2N_TO_SOIL2N','LITR2N_vr','LITR2P_TNDNCY_VERT_TRANS','LITR2P_TO_SOIL2P',
+ 'LITR2P_vr','LITR3_HR','LITR3C_TO_SOIL3C','LITR3C_vr','LITR3N_TNDNCY_VERT_TRANS',
+ 'LITR3N_TO_SOIL3N','LITR3N_vr','LITR3P_TNDNCY_VERT_TRANS','LITR3P_TO_SOIL3P','LITR3P_vr',
+ 'M_LITR1C_TO_LEACHING','M_LITR2C_TO_LEACHING','M_LITR3C_TO_LEACHING','M_SOIL1C_TO_LEACHING','M_SOIL2C_TO_LEACHING',
+ 'M_SOIL3C_TO_LEACHING','M_SOIL4C_TO_LEACHING','NDEPLOY','NEM','nlim_m',
+ 'o2_decomp_depth_unsat','OCCLP_vr','PDEPLOY','PLANT_CALLOC','PLANT_NDEMAND',
+ 'PLANT_NDEMAND_COL','PLANT_PALLOC','PLANT_PDEMAND','PLANT_PDEMAND_COL','plim_m',
+ 'POT_F_DENIT','POT_F_NIT','POTENTIAL_IMMOB','POTENTIAL_IMMOB_P','PRIMP_TO_LABILEP',
+ 'PRIMP_vr','PROD1P_LOSS','QOVER_LAG','RETRANSN_TO_NPOOL','RETRANSP_TO_PPOOL',
+ 'SCALARAVG_vr','SECONDP_TO_LABILEP','SECONDP_TO_OCCLP','SECONDP_vr','SMIN_NH4_vr',
+ 'SMIN_NO3_vr','SMINN_TO_SOIL1N_L1','SMINN_TO_SOIL2N_L2','SMINN_TO_SOIL2N_S1','SMINN_TO_SOIL3N_L3',
+ 'SMINN_TO_SOIL3N_S2','SMINN_TO_SOIL4N_S3','SMINP_TO_SOIL1P_L1','SMINP_TO_SOIL2P_L2','SMINP_TO_SOIL2P_S1',
+ 'SMINP_TO_SOIL3P_L3','SMINP_TO_SOIL3P_S2','SMINP_TO_SOIL4P_S3','SMINP_vr','SOIL1_HR','SOIL1C_TO_SOIL2C','SOIL1C_vr','SOIL1N_TNDNCY_VERT_TRANS','SOIL1N_TO_SOIL2N','SOIL1N_vr',
+ 'SOIL1P_TNDNCY_VERT_TRANS','SOIL1P_TO_SOIL2P','SOIL1P_vr','SOIL2_HR','SOIL2C_TO_SOIL3C',
+ 'SOIL2C_vr','SOIL2N_TNDNCY_VERT_TRANS','SOIL2N_TO_SOIL3N','SOIL2N_vr','SOIL2P_TNDNCY_VERT_TRANS',
+ 'SOIL2P_TO_SOIL3P','SOIL2P_vr','SOIL3_HR','SOIL3C_TO_SOIL4C','SOIL3C_vr',
+ 'SOIL3N_TNDNCY_VERT_TRANS','SOIL3N_TO_SOIL4N','SOIL3N_vr','SOIL3P_TNDNCY_VERT_TRANS','SOIL3P_TO_SOIL4P',
+ 'SOIL3P_vr','SOIL4_HR','SOIL4C_vr','SOIL4N_TNDNCY_VERT_TRANS','SOIL4N_TO_SMINN',
+ 'SOIL4N_vr','SOIL4P_TNDNCY_VERT_TRANS','SOIL4P_TO_SMINP','SOIL4P_vr','SOLUTIONP_vr',
+ 'TCS_MONTH_BEGIN','TCS_MONTH_END','TOTCOLCH4','water_scalar','WF',
+ 'wlim_m','WOODC_LOSS','WTGQ'
+hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC'
+hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE', 'FIRA'
+hist_mfilt = 1,365
+hist_nhtfrq = -24,-24
+hist_avgflag_pertape = 'A','A'
diff --git a/cime_config/testmods_dirs/allactive/wcprod_1850_1pctCO2/README b/cime_config/testmods_dirs/allactive/wcprod_1850_1pctCO2/README
index 020bbf93e9f2..329e3e6ea7ab 100644
--- a/cime_config/testmods_dirs/allactive/wcprod_1850_1pctCO2/README
+++ b/cime_config/testmods_dirs/allactive/wcprod_1850_1pctCO2/README
@@ -3,4 +3,3 @@ water cycle production sims
Run these for at least 1 day to see all output.
Also use the CMIP6 compsets.
-If running longer, change the nhtfrq for the first history file.
diff --git a/cime_config/testmods_dirs/allactive/wcprod_1850_1pctCO2/user_nl_eam b/cime_config/testmods_dirs/allactive/wcprod_1850_1pctCO2/user_nl_eam
index eeac1d647b1d..095c6946f5de 100644
--- a/cime_config/testmods_dirs/allactive/wcprod_1850_1pctCO2/user_nl_eam
+++ b/cime_config/testmods_dirs/allactive/wcprod_1850_1pctCO2/user_nl_eam
@@ -1,11 +1,59 @@
- nhtfrq = -24,-24,-6,-6,-3,-24,-24
- mfilt = 1,30,120,120,240,30,1
- avgflag_pertape = 'A','A','I','A','A','A','I'
- fexcl1 = 'CFAD_SR532_CAL', 'LINOZ_DO3', 'LINOZ_DO3_PSC', 'LINOZ_O3CLIM', 'LINOZ_O3COL', 'LINOZ_SSO3', 'hstobie_linoz'
- fincl1 = 'extinct_sw_inp','extinct_lw_bnd7','extinct_lw_inp','CLD_CAL', 'TREFMNAV', 'TREFMXAV'
- fincl2 = 'FLUT','PRECT','U200','V200','U850','V850','Z500','OMEGA500','UBOT','VBOT','TREFHT','TREFHTMN:M','TREFHTMX:X','QREFHT','TS','PS','TMQ','TUQ','TVQ','TOZ', 'FLDS', 'FLNS', 'FSDS', 'FSNS', 'SHFLX', 'LHFLX', 'TGCLDCWP', 'TGCLDIWP', 'TGCLDLWP', 'CLDTOT', 'T250', 'T200', 'T150', 'T100', 'T050', 'T025', 'T010', 'T005', 'T002', 'T001', 'TTOP', 'U250', 'U150', 'U100', 'U050', 'U025', 'U010', 'U005', 'U002', 'U001', 'UTOP', 'FSNT', 'FLNT'
- fincl3 = 'PSL','T200','T500','U850','V850','UBOT','VBOT','TREFHT', 'Z700', 'TBOT:M'
- fincl4 = 'FLUT','U200','U850','PRECT','OMEGA500'
- fincl5 = 'PRECT','PRECC','TUQ','TVQ','QFLX','SHFLX','U90M','V90M'
- fincl6 = 'CLDTOT_ISCCP','MEANCLDALB_ISCCP','MEANTAU_ISCCP','MEANPTOP_ISCCP','MEANTB_ISCCP','CLDTOT_CAL','CLDTOT_CAL_LIQ','CLDTOT_CAL_ICE','CLDTOT_CAL_UN','CLDHGH_CAL','CLDHGH_CAL_LIQ','CLDHGH_CAL_ICE','CLDHGH_CAL_UN','CLDMED_CAL','CLDMED_CAL_LIQ','CLDMED_CAL_ICE','CLDMED_CAL_UN','CLDLOW_CAL','CLDLOW_CAL_LIQ','CLDLOW_CAL_ICE','CLDLOW_CAL_UN'
- fincl7 = 'O3', 'PS', 'TROP_P'
+cosp_lite = .true.
+
+empty_htapes = .true.
+
+avgflag_pertape = 'A','A','A','A','I','I'
+nhtfrq = -24,-24,-6,-3,-1,-24
+mfilt = 1,30,120,240,720,1
+
+fincl1 = 'AODALL','AODBC','AODDUST','AODPOM','AODSO4','AODSOA','AODSS','AODVIS',
+ 'CLDLOW','CLDMED','CLDHGH','CLDTOT',
+ 'CLDHGH_CAL','CLDLOW_CAL','CLDMED_CAL','CLD_MISR','CLDTOT_CAL',
+ 'CLMODIS','FISCCP1_COSP','FLDS','FLNS','FLNSC','FLNT','FLUT',
+ 'FLUTC','FSDS','FSDSC','FSNS','FSNSC','FSNT','FSNTOA','FSNTOAC','FSNTC',
+ 'ICEFRAC','LANDFRAC','LWCF','OCNFRAC','OMEGA','PRECC','PRECL','PRECSC','PRECSL','PS','PSL','Q',
+ 'QFLX','QREFHT','RELHUM','SCO','SHFLX','SOLIN','SWCF','T','TAUX','TAUY','TCO',
+ 'TGCLDLWP','TMQ','TREFHT','TREFMNAV','TREFMXAV','TS','U','U10','V','Z3',
+ 'dst_a1DDF','dst_a3DDF','dst_c1DDF','dst_c3DDF','dst_a1SFWET','dst_a3SFWET','dst_c1SFWET','dst_c3SFWET',
+ 'O3','LHFLX',
+ 'O3_2DTDA_trop','O3_2DTDB_trop','O3_2DTDD_trop','O3_2DTDE_trop','O3_2DTDI_trop','O3_2DTDL_trop',
+ 'O3_2DTDN_trop','O3_2DTDO_trop','O3_2DTDS_trop','O3_2DTDU_trop','O3_2DTRE_trop','O3_2DTRI_trop',
+ 'O3_SRF','NO_2DTDS','NO_TDLgt','NO2_2DTDD','NO2_2DTDS','NO2_TDAcf','CO_SRF','TROPE3D_P','TROP_P',
+ 'CDNUMC','SFDMS','so4_a1_sfgaex1','so4_a2_sfgaex1','so4_a3_sfgaex1','so4_a5_sfgaex1','soa_a1_sfgaex1',
+ 'soa_a2_sfgaex1','soa_a3_sfgaex1','GS_soa_a1','GS_soa_a2','GS_soa_a3','AQSO4_H2O2','AQSO4_O3',
+ 'SFSO2','SO2_CLXF','SO2','DF_SO2','AQ_SO2','GS_SO2','WD_SO2','ABURDENSO4_STR','ABURDENSO4_TRO',
+ 'ABURDENSO4','ABURDENBC','ABURDENDUST','ABURDENMOM','ABURDENPOM','ABURDENSEASALT',
+ 'ABURDENSOA','AODSO4_STR','AODSO4_TRO',
+ 'EXTINCT','AODABS','AODABSBC','CLDICE','CLDLIQ','CLD_CAL_TMPLIQ','CLD_CAL_TMPICE','Mass_bc_srf',
+ 'Mass_dst_srf','Mass_mom_srf','Mass_ncl_srf','Mass_pom_srf','Mass_so4_srf','Mass_soa_srf','Mass_bc_850',
+ 'Mass_dst_850','Mass_mom_850','Mass_ncl_850','Mass_pom_850','Mass_so4_850','Mass_soa_850','Mass_bc_500',
+ 'Mass_dst_500','Mass_mom_500','Mass_ncl_500','Mass_pom_500','Mass_so4_500','Mass_soa_500','Mass_bc_330',
+ 'Mass_dst_330','Mass_mom_330','Mass_ncl_330','Mass_pom_330','Mass_so4_330','Mass_soa_330','Mass_bc_200',
+ 'Mass_dst_200','Mass_mom_200','Mass_ncl_200','Mass_pom_200','Mass_so4_200','Mass_soa_200',
+ 'O3_2DTDD','O3_2DCIP','O3_2DCIL','CO_2DTDS','CO_2DTDD','CO_2DCEP','CO_2DCEL','NO_2DTDD',
+ 'FLNTC','SAODVIS',
+ 'H2OLNZ',
+ 'dst_a1SF','dst_a3SF',
+ 'PHIS','CLOUD','TGCLDIWP','TGCLDCWP','AREL',
+ 'CLDTOT_ISCCP','MEANCLDALB_ISCCP','MEANPTOP_ISCCP','CLD_CAL',
+ 'CLDTOT_CAL_LIQ','CLDTOT_CAL_ICE','CLDTOT_CAL_UN',
+ 'CLDHGH_CAL_LIQ','CLDHGH_CAL_ICE','CLDHGH_CAL_UN',
+ 'CLDMED_CAL_LIQ','CLDMED_CAL_ICE','CLDMED_CAL_UN',
+ 'CLDLOW_CAL_LIQ','CLDLOW_CAL_ICE','CLDLOW_CAL_UN',
+ 'CLWMODIS','CLIMODIS'
+
+fincl2 = 'PS', 'FLUT','PRECT','U200','V200','U850','V850',
+ 'TCO','SCO','TREFHTMN','TREFHTMX','TREFHT','QREFHT'
+fincl3 = 'PS', 'PSL','PRECT','TUQ','TVQ','UBOT','VBOT','TREFHT','FLUT','OMEGA500','TBOT','U850','V850','U200','V200','T200','T500','Z700'
+fincl4 = 'PRECT'
+fincl5 = 'O3_SRF'
+fincl6 = 'CO_2DMSD','NO2_2DMSD','NO_2DMSD','O3_2DMSD','O3_2DMSD_trop'
+
+! -- chemUCI settings ------------------
+history_chemdyg_summary = .true.
+history_gaschmbudget_2D = .false.
+history_gaschmbudget_2D_levels = .false.
+history_gaschmbudget_num = 6 !! no impact if history_gaschmbudget_2D = .false.
+
+! -- MAM5 settings ------------------
+is_output_interactive_volc = .true.
diff --git a/cime_config/testmods_dirs/allactive/wcprod_1850_1pctCO2/user_nl_elm b/cime_config/testmods_dirs/allactive/wcprod_1850_1pctCO2/user_nl_elm
index c8d35999c0a5..cd1adab77404 100644
--- a/cime_config/testmods_dirs/allactive/wcprod_1850_1pctCO2/user_nl_elm
+++ b/cime_config/testmods_dirs/allactive/wcprod_1850_1pctCO2/user_nl_elm
@@ -1,7 +1,40 @@
-! Finidat to be updated, The one below not compatible with v3 lnd config (with TOP and BGC mode, new grid)
-! finidat = '$DIN_LOC_ROOT/lnd/clm2/initdata_map/clmi.WCYCL1850-1pctCO2.ne30pg2_EC30to60E2r2.SMS_Ld1.c20230213.nc'
- hist_dov2xy = .true.,.true.
- hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE', 'FIRA'
- hist_mfilt = 1,365
- hist_nhtfrq = -24,-24
- hist_avgflag_pertape = 'A','A'
+hist_dov2xy = .true.,.true.
+hist_fexcl1 = 'AGWDNPP','ALTMAX_LASTYEAR','AVAIL_RETRANSP','AVAILC','BAF_CROP',
+ 'BAF_PEATF','BIOCHEM_PMIN_TO_PLANT','CH4_SURF_AERE_SAT','CH4_SURF_AERE_UNSAT','CH4_SURF_DIFF_SAT',
+ 'CH4_SURF_DIFF_UNSAT','CH4_SURF_EBUL_SAT','CH4_SURF_EBUL_UNSAT','CMASS_BALANCE_ERROR','cn_scalar',
+ 'COL_PTRUNC','CONC_CH4_SAT','CONC_CH4_UNSAT','CONC_O2_SAT','CONC_O2_UNSAT',
+ 'cp_scalar','CWDC_HR','CWDC_LOSS','CWDC_TO_LITR2C','CWDC_TO_LITR3C',
+ 'CWDC_vr','CWDN_TO_LITR2N','CWDN_TO_LITR3N','CWDN_vr','CWDP_TO_LITR2P',
+ 'CWDP_TO_LITR3P','CWDP_vr','DWT_CONV_CFLUX_DRIBBLED','F_CO2_SOIL','F_CO2_SOIL_vr',
+ 'F_DENIT_vr','F_N2O_DENIT','F_N2O_NIT','F_NIT_vr','FCH4_DFSAT',
+ 'FINUNDATED_LAG','FPI_P_vr','FPI_vr','FROOTC_LOSS','HR_vr',
+ 'LABILEP_TO_SECONDP','LABILEP_vr','LAND_UPTAKE','LEAF_MR','leaf_npimbalance',
+ 'LEAFC_LOSS','LEAFC_TO_LITTER','LFC2','LITR1_HR','LITR1C_TO_SOIL1C',
+ 'LITR1C_vr','LITR1N_TNDNCY_VERT_TRANS','LITR1N_TO_SOIL1N','LITR1N_vr','LITR1P_TNDNCY_VERT_TRANS',
+ 'LITR1P_TO_SOIL1P','LITR1P_vr','LITR2_HR','LITR2C_TO_SOIL2C','LITR2C_vr',
+ 'LITR2N_TNDNCY_VERT_TRANS','LITR2N_TO_SOIL2N','LITR2N_vr','LITR2P_TNDNCY_VERT_TRANS','LITR2P_TO_SOIL2P',
+ 'LITR2P_vr','LITR3_HR','LITR3C_TO_SOIL3C','LITR3C_vr','LITR3N_TNDNCY_VERT_TRANS',
+ 'LITR3N_TO_SOIL3N','LITR3N_vr','LITR3P_TNDNCY_VERT_TRANS','LITR3P_TO_SOIL3P','LITR3P_vr',
+ 'M_LITR1C_TO_LEACHING','M_LITR2C_TO_LEACHING','M_LITR3C_TO_LEACHING','M_SOIL1C_TO_LEACHING','M_SOIL2C_TO_LEACHING',
+ 'M_SOIL3C_TO_LEACHING','M_SOIL4C_TO_LEACHING','NDEPLOY','NEM','nlim_m',
+ 'o2_decomp_depth_unsat','OCCLP_vr','PDEPLOY','PLANT_CALLOC','PLANT_NDEMAND',
+ 'PLANT_NDEMAND_COL','PLANT_PALLOC','PLANT_PDEMAND','PLANT_PDEMAND_COL','plim_m',
+ 'POT_F_DENIT','POT_F_NIT','POTENTIAL_IMMOB','POTENTIAL_IMMOB_P','PRIMP_TO_LABILEP',
+ 'PRIMP_vr','PROD1P_LOSS','QOVER_LAG','RETRANSN_TO_NPOOL','RETRANSP_TO_PPOOL',
+ 'SCALARAVG_vr','SECONDP_TO_LABILEP','SECONDP_TO_OCCLP','SECONDP_vr','SMIN_NH4_vr',
+ 'SMIN_NO3_vr','SMINN_TO_SOIL1N_L1','SMINN_TO_SOIL2N_L2','SMINN_TO_SOIL2N_S1','SMINN_TO_SOIL3N_L3',
+ 'SMINN_TO_SOIL3N_S2','SMINN_TO_SOIL4N_S3','SMINP_TO_SOIL1P_L1','SMINP_TO_SOIL2P_L2','SMINP_TO_SOIL2P_S1',
+ 'SMINP_TO_SOIL3P_L3','SMINP_TO_SOIL3P_S2','SMINP_TO_SOIL4P_S3','SMINP_vr','SOIL1_HR','SOIL1C_TO_SOIL2C','SOIL1C_vr','SOIL1N_TNDNCY_VERT_TRANS','SOIL1N_TO_SOIL2N','SOIL1N_vr',
+ 'SOIL1P_TNDNCY_VERT_TRANS','SOIL1P_TO_SOIL2P','SOIL1P_vr','SOIL2_HR','SOIL2C_TO_SOIL3C',
+ 'SOIL2C_vr','SOIL2N_TNDNCY_VERT_TRANS','SOIL2N_TO_SOIL3N','SOIL2N_vr','SOIL2P_TNDNCY_VERT_TRANS',
+ 'SOIL2P_TO_SOIL3P','SOIL2P_vr','SOIL3_HR','SOIL3C_TO_SOIL4C','SOIL3C_vr',
+ 'SOIL3N_TNDNCY_VERT_TRANS','SOIL3N_TO_SOIL4N','SOIL3N_vr','SOIL3P_TNDNCY_VERT_TRANS','SOIL3P_TO_SOIL4P',
+ 'SOIL3P_vr','SOIL4_HR','SOIL4C_vr','SOIL4N_TNDNCY_VERT_TRANS','SOIL4N_TO_SMINN',
+ 'SOIL4N_vr','SOIL4P_TNDNCY_VERT_TRANS','SOIL4P_TO_SMINP','SOIL4P_vr','SOLUTIONP_vr',
+ 'TCS_MONTH_BEGIN','TCS_MONTH_END','TOTCOLCH4','water_scalar','WF',
+ 'wlim_m','WOODC_LOSS','WTGQ'
+hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC'
+hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE', 'FIRA'
+hist_mfilt = 1,365
+hist_nhtfrq = -24,-24
+hist_avgflag_pertape = 'A','A'
diff --git a/cime_config/testmods_dirs/allactive/wcprod_1850_4xCO2/README b/cime_config/testmods_dirs/allactive/wcprod_1850_4xCO2/README
index 020bbf93e9f2..329e3e6ea7ab 100644
--- a/cime_config/testmods_dirs/allactive/wcprod_1850_4xCO2/README
+++ b/cime_config/testmods_dirs/allactive/wcprod_1850_4xCO2/README
@@ -3,4 +3,3 @@ water cycle production sims
Run these for at least 1 day to see all output.
Also use the CMIP6 compsets.
-If running longer, change the nhtfrq for the first history file.
diff --git a/cime_config/testmods_dirs/allactive/wcprod_1850_4xCO2/user_nl_eam b/cime_config/testmods_dirs/allactive/wcprod_1850_4xCO2/user_nl_eam
index eeac1d647b1d..095c6946f5de 100644
--- a/cime_config/testmods_dirs/allactive/wcprod_1850_4xCO2/user_nl_eam
+++ b/cime_config/testmods_dirs/allactive/wcprod_1850_4xCO2/user_nl_eam
@@ -1,11 +1,59 @@
- nhtfrq = -24,-24,-6,-6,-3,-24,-24
- mfilt = 1,30,120,120,240,30,1
- avgflag_pertape = 'A','A','I','A','A','A','I'
- fexcl1 = 'CFAD_SR532_CAL', 'LINOZ_DO3', 'LINOZ_DO3_PSC', 'LINOZ_O3CLIM', 'LINOZ_O3COL', 'LINOZ_SSO3', 'hstobie_linoz'
- fincl1 = 'extinct_sw_inp','extinct_lw_bnd7','extinct_lw_inp','CLD_CAL', 'TREFMNAV', 'TREFMXAV'
- fincl2 = 'FLUT','PRECT','U200','V200','U850','V850','Z500','OMEGA500','UBOT','VBOT','TREFHT','TREFHTMN:M','TREFHTMX:X','QREFHT','TS','PS','TMQ','TUQ','TVQ','TOZ', 'FLDS', 'FLNS', 'FSDS', 'FSNS', 'SHFLX', 'LHFLX', 'TGCLDCWP', 'TGCLDIWP', 'TGCLDLWP', 'CLDTOT', 'T250', 'T200', 'T150', 'T100', 'T050', 'T025', 'T010', 'T005', 'T002', 'T001', 'TTOP', 'U250', 'U150', 'U100', 'U050', 'U025', 'U010', 'U005', 'U002', 'U001', 'UTOP', 'FSNT', 'FLNT'
- fincl3 = 'PSL','T200','T500','U850','V850','UBOT','VBOT','TREFHT', 'Z700', 'TBOT:M'
- fincl4 = 'FLUT','U200','U850','PRECT','OMEGA500'
- fincl5 = 'PRECT','PRECC','TUQ','TVQ','QFLX','SHFLX','U90M','V90M'
- fincl6 = 'CLDTOT_ISCCP','MEANCLDALB_ISCCP','MEANTAU_ISCCP','MEANPTOP_ISCCP','MEANTB_ISCCP','CLDTOT_CAL','CLDTOT_CAL_LIQ','CLDTOT_CAL_ICE','CLDTOT_CAL_UN','CLDHGH_CAL','CLDHGH_CAL_LIQ','CLDHGH_CAL_ICE','CLDHGH_CAL_UN','CLDMED_CAL','CLDMED_CAL_LIQ','CLDMED_CAL_ICE','CLDMED_CAL_UN','CLDLOW_CAL','CLDLOW_CAL_LIQ','CLDLOW_CAL_ICE','CLDLOW_CAL_UN'
- fincl7 = 'O3', 'PS', 'TROP_P'
+cosp_lite = .true.
+
+empty_htapes = .true.
+
+avgflag_pertape = 'A','A','A','A','I','I'
+nhtfrq = -24,-24,-6,-3,-1,-24
+mfilt = 1,30,120,240,720,1
+
+fincl1 = 'AODALL','AODBC','AODDUST','AODPOM','AODSO4','AODSOA','AODSS','AODVIS',
+ 'CLDLOW','CLDMED','CLDHGH','CLDTOT',
+ 'CLDHGH_CAL','CLDLOW_CAL','CLDMED_CAL','CLD_MISR','CLDTOT_CAL',
+ 'CLMODIS','FISCCP1_COSP','FLDS','FLNS','FLNSC','FLNT','FLUT',
+ 'FLUTC','FSDS','FSDSC','FSNS','FSNSC','FSNT','FSNTOA','FSNTOAC','FSNTC',
+ 'ICEFRAC','LANDFRAC','LWCF','OCNFRAC','OMEGA','PRECC','PRECL','PRECSC','PRECSL','PS','PSL','Q',
+ 'QFLX','QREFHT','RELHUM','SCO','SHFLX','SOLIN','SWCF','T','TAUX','TAUY','TCO',
+ 'TGCLDLWP','TMQ','TREFHT','TREFMNAV','TREFMXAV','TS','U','U10','V','Z3',
+ 'dst_a1DDF','dst_a3DDF','dst_c1DDF','dst_c3DDF','dst_a1SFWET','dst_a3SFWET','dst_c1SFWET','dst_c3SFWET',
+ 'O3','LHFLX',
+ 'O3_2DTDA_trop','O3_2DTDB_trop','O3_2DTDD_trop','O3_2DTDE_trop','O3_2DTDI_trop','O3_2DTDL_trop',
+ 'O3_2DTDN_trop','O3_2DTDO_trop','O3_2DTDS_trop','O3_2DTDU_trop','O3_2DTRE_trop','O3_2DTRI_trop',
+ 'O3_SRF','NO_2DTDS','NO_TDLgt','NO2_2DTDD','NO2_2DTDS','NO2_TDAcf','CO_SRF','TROPE3D_P','TROP_P',
+ 'CDNUMC','SFDMS','so4_a1_sfgaex1','so4_a2_sfgaex1','so4_a3_sfgaex1','so4_a5_sfgaex1','soa_a1_sfgaex1',
+ 'soa_a2_sfgaex1','soa_a3_sfgaex1','GS_soa_a1','GS_soa_a2','GS_soa_a3','AQSO4_H2O2','AQSO4_O3',
+ 'SFSO2','SO2_CLXF','SO2','DF_SO2','AQ_SO2','GS_SO2','WD_SO2','ABURDENSO4_STR','ABURDENSO4_TRO',
+ 'ABURDENSO4','ABURDENBC','ABURDENDUST','ABURDENMOM','ABURDENPOM','ABURDENSEASALT',
+ 'ABURDENSOA','AODSO4_STR','AODSO4_TRO',
+ 'EXTINCT','AODABS','AODABSBC','CLDICE','CLDLIQ','CLD_CAL_TMPLIQ','CLD_CAL_TMPICE','Mass_bc_srf',
+ 'Mass_dst_srf','Mass_mom_srf','Mass_ncl_srf','Mass_pom_srf','Mass_so4_srf','Mass_soa_srf','Mass_bc_850',
+ 'Mass_dst_850','Mass_mom_850','Mass_ncl_850','Mass_pom_850','Mass_so4_850','Mass_soa_850','Mass_bc_500',
+ 'Mass_dst_500','Mass_mom_500','Mass_ncl_500','Mass_pom_500','Mass_so4_500','Mass_soa_500','Mass_bc_330',
+ 'Mass_dst_330','Mass_mom_330','Mass_ncl_330','Mass_pom_330','Mass_so4_330','Mass_soa_330','Mass_bc_200',
+ 'Mass_dst_200','Mass_mom_200','Mass_ncl_200','Mass_pom_200','Mass_so4_200','Mass_soa_200',
+ 'O3_2DTDD','O3_2DCIP','O3_2DCIL','CO_2DTDS','CO_2DTDD','CO_2DCEP','CO_2DCEL','NO_2DTDD',
+ 'FLNTC','SAODVIS',
+ 'H2OLNZ',
+ 'dst_a1SF','dst_a3SF',
+ 'PHIS','CLOUD','TGCLDIWP','TGCLDCWP','AREL',
+ 'CLDTOT_ISCCP','MEANCLDALB_ISCCP','MEANPTOP_ISCCP','CLD_CAL',
+ 'CLDTOT_CAL_LIQ','CLDTOT_CAL_ICE','CLDTOT_CAL_UN',
+ 'CLDHGH_CAL_LIQ','CLDHGH_CAL_ICE','CLDHGH_CAL_UN',
+ 'CLDMED_CAL_LIQ','CLDMED_CAL_ICE','CLDMED_CAL_UN',
+ 'CLDLOW_CAL_LIQ','CLDLOW_CAL_ICE','CLDLOW_CAL_UN',
+ 'CLWMODIS','CLIMODIS'
+
+fincl2 = 'PS', 'FLUT','PRECT','U200','V200','U850','V850',
+ 'TCO','SCO','TREFHTMN','TREFHTMX','TREFHT','QREFHT'
+fincl3 = 'PS', 'PSL','PRECT','TUQ','TVQ','UBOT','VBOT','TREFHT','FLUT','OMEGA500','TBOT','U850','V850','U200','V200','T200','T500','Z700'
+fincl4 = 'PRECT'
+fincl5 = 'O3_SRF'
+fincl6 = 'CO_2DMSD','NO2_2DMSD','NO_2DMSD','O3_2DMSD','O3_2DMSD_trop'
+
+! -- chemUCI settings ------------------
+history_chemdyg_summary = .true.
+history_gaschmbudget_2D = .false.
+history_gaschmbudget_2D_levels = .false.
+history_gaschmbudget_num = 6 !! no impact if history_gaschmbudget_2D = .false.
+
+! -- MAM5 settings ------------------
+is_output_interactive_volc = .true.
diff --git a/cime_config/testmods_dirs/allactive/wcprod_1850_4xCO2/user_nl_elm b/cime_config/testmods_dirs/allactive/wcprod_1850_4xCO2/user_nl_elm
index 4379fd5e4fe1..cd1adab77404 100644
--- a/cime_config/testmods_dirs/allactive/wcprod_1850_4xCO2/user_nl_elm
+++ b/cime_config/testmods_dirs/allactive/wcprod_1850_4xCO2/user_nl_elm
@@ -1,7 +1,40 @@
-! Finidat to be updated, The one below not compatible with v3 lnd config (with TOP and BGC mode, new grid)
-! finidat = '$DIN_LOC_ROOT/lnd/clm2/initdata_map/clmi.WCYCL1850-4xCO2.ne30pg2_EC30to60E2r2.SMS_Ld1.c20230213.nc'
- hist_dov2xy = .true.,.true.
- hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE', 'FIRA'
- hist_mfilt = 1,365
- hist_nhtfrq = -24,-24
- hist_avgflag_pertape = 'A','A'
+hist_dov2xy = .true.,.true.
+hist_fexcl1 = 'AGWDNPP','ALTMAX_LASTYEAR','AVAIL_RETRANSP','AVAILC','BAF_CROP',
+ 'BAF_PEATF','BIOCHEM_PMIN_TO_PLANT','CH4_SURF_AERE_SAT','CH4_SURF_AERE_UNSAT','CH4_SURF_DIFF_SAT',
+ 'CH4_SURF_DIFF_UNSAT','CH4_SURF_EBUL_SAT','CH4_SURF_EBUL_UNSAT','CMASS_BALANCE_ERROR','cn_scalar',
+ 'COL_PTRUNC','CONC_CH4_SAT','CONC_CH4_UNSAT','CONC_O2_SAT','CONC_O2_UNSAT',
+ 'cp_scalar','CWDC_HR','CWDC_LOSS','CWDC_TO_LITR2C','CWDC_TO_LITR3C',
+ 'CWDC_vr','CWDN_TO_LITR2N','CWDN_TO_LITR3N','CWDN_vr','CWDP_TO_LITR2P',
+ 'CWDP_TO_LITR3P','CWDP_vr','DWT_CONV_CFLUX_DRIBBLED','F_CO2_SOIL','F_CO2_SOIL_vr',
+ 'F_DENIT_vr','F_N2O_DENIT','F_N2O_NIT','F_NIT_vr','FCH4_DFSAT',
+ 'FINUNDATED_LAG','FPI_P_vr','FPI_vr','FROOTC_LOSS','HR_vr',
+ 'LABILEP_TO_SECONDP','LABILEP_vr','LAND_UPTAKE','LEAF_MR','leaf_npimbalance',
+ 'LEAFC_LOSS','LEAFC_TO_LITTER','LFC2','LITR1_HR','LITR1C_TO_SOIL1C',
+ 'LITR1C_vr','LITR1N_TNDNCY_VERT_TRANS','LITR1N_TO_SOIL1N','LITR1N_vr','LITR1P_TNDNCY_VERT_TRANS',
+ 'LITR1P_TO_SOIL1P','LITR1P_vr','LITR2_HR','LITR2C_TO_SOIL2C','LITR2C_vr',
+ 'LITR2N_TNDNCY_VERT_TRANS','LITR2N_TO_SOIL2N','LITR2N_vr','LITR2P_TNDNCY_VERT_TRANS','LITR2P_TO_SOIL2P',
+ 'LITR2P_vr','LITR3_HR','LITR3C_TO_SOIL3C','LITR3C_vr','LITR3N_TNDNCY_VERT_TRANS',
+ 'LITR3N_TO_SOIL3N','LITR3N_vr','LITR3P_TNDNCY_VERT_TRANS','LITR3P_TO_SOIL3P','LITR3P_vr',
+ 'M_LITR1C_TO_LEACHING','M_LITR2C_TO_LEACHING','M_LITR3C_TO_LEACHING','M_SOIL1C_TO_LEACHING','M_SOIL2C_TO_LEACHING',
+ 'M_SOIL3C_TO_LEACHING','M_SOIL4C_TO_LEACHING','NDEPLOY','NEM','nlim_m',
+ 'o2_decomp_depth_unsat','OCCLP_vr','PDEPLOY','PLANT_CALLOC','PLANT_NDEMAND',
+ 'PLANT_NDEMAND_COL','PLANT_PALLOC','PLANT_PDEMAND','PLANT_PDEMAND_COL','plim_m',
+ 'POT_F_DENIT','POT_F_NIT','POTENTIAL_IMMOB','POTENTIAL_IMMOB_P','PRIMP_TO_LABILEP',
+ 'PRIMP_vr','PROD1P_LOSS','QOVER_LAG','RETRANSN_TO_NPOOL','RETRANSP_TO_PPOOL',
+ 'SCALARAVG_vr','SECONDP_TO_LABILEP','SECONDP_TO_OCCLP','SECONDP_vr','SMIN_NH4_vr',
+ 'SMIN_NO3_vr','SMINN_TO_SOIL1N_L1','SMINN_TO_SOIL2N_L2','SMINN_TO_SOIL2N_S1','SMINN_TO_SOIL3N_L3',
+ 'SMINN_TO_SOIL3N_S2','SMINN_TO_SOIL4N_S3','SMINP_TO_SOIL1P_L1','SMINP_TO_SOIL2P_L2','SMINP_TO_SOIL2P_S1',
+ 'SMINP_TO_SOIL3P_L3','SMINP_TO_SOIL3P_S2','SMINP_TO_SOIL4P_S3','SMINP_vr','SOIL1_HR','SOIL1C_TO_SOIL2C','SOIL1C_vr','SOIL1N_TNDNCY_VERT_TRANS','SOIL1N_TO_SOIL2N','SOIL1N_vr',
+ 'SOIL1P_TNDNCY_VERT_TRANS','SOIL1P_TO_SOIL2P','SOIL1P_vr','SOIL2_HR','SOIL2C_TO_SOIL3C',
+ 'SOIL2C_vr','SOIL2N_TNDNCY_VERT_TRANS','SOIL2N_TO_SOIL3N','SOIL2N_vr','SOIL2P_TNDNCY_VERT_TRANS',
+ 'SOIL2P_TO_SOIL3P','SOIL2P_vr','SOIL3_HR','SOIL3C_TO_SOIL4C','SOIL3C_vr',
+ 'SOIL3N_TNDNCY_VERT_TRANS','SOIL3N_TO_SOIL4N','SOIL3N_vr','SOIL3P_TNDNCY_VERT_TRANS','SOIL3P_TO_SOIL4P',
+ 'SOIL3P_vr','SOIL4_HR','SOIL4C_vr','SOIL4N_TNDNCY_VERT_TRANS','SOIL4N_TO_SMINN',
+ 'SOIL4N_vr','SOIL4P_TNDNCY_VERT_TRANS','SOIL4P_TO_SMINP','SOIL4P_vr','SOLUTIONP_vr',
+ 'TCS_MONTH_BEGIN','TCS_MONTH_END','TOTCOLCH4','water_scalar','WF',
+ 'wlim_m','WOODC_LOSS','WTGQ'
+hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC'
+hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE', 'FIRA'
+hist_mfilt = 1,365
+hist_nhtfrq = -24,-24
+hist_avgflag_pertape = 'A','A'
diff --git a/cime_config/testmods_dirs/allactive/wcprod_1850_r05/README b/cime_config/testmods_dirs/allactive/wcprod_1850_r05/README
deleted file mode 100644
index 020bbf93e9f2..000000000000
--- a/cime_config/testmods_dirs/allactive/wcprod_1850_r05/README
+++ /dev/null
@@ -1,6 +0,0 @@
-These modifications should result in a case that has the same namelist settings as the
-water cycle production sims
-
-Run these for at least 1 day to see all output.
-Also use the CMIP6 compsets.
-If running longer, change the nhtfrq for the first history file.
diff --git a/cime_config/testmods_dirs/allactive/wcprod_1850_r05/shell_commands b/cime_config/testmods_dirs/allactive/wcprod_1850_r05/shell_commands
deleted file mode 100644
index 6e8ae38ac8e9..000000000000
--- a/cime_config/testmods_dirs/allactive/wcprod_1850_r05/shell_commands
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-./xmlchange --append CAM_CONFIG_OPTS='-cosp'
-
diff --git a/cime_config/testmods_dirs/allactive/wcprod_1850_r05/user_nl_eam b/cime_config/testmods_dirs/allactive/wcprod_1850_r05/user_nl_eam
deleted file mode 100644
index eeac1d647b1d..000000000000
--- a/cime_config/testmods_dirs/allactive/wcprod_1850_r05/user_nl_eam
+++ /dev/null
@@ -1,11 +0,0 @@
- nhtfrq = -24,-24,-6,-6,-3,-24,-24
- mfilt = 1,30,120,120,240,30,1
- avgflag_pertape = 'A','A','I','A','A','A','I'
- fexcl1 = 'CFAD_SR532_CAL', 'LINOZ_DO3', 'LINOZ_DO3_PSC', 'LINOZ_O3CLIM', 'LINOZ_O3COL', 'LINOZ_SSO3', 'hstobie_linoz'
- fincl1 = 'extinct_sw_inp','extinct_lw_bnd7','extinct_lw_inp','CLD_CAL', 'TREFMNAV', 'TREFMXAV'
- fincl2 = 'FLUT','PRECT','U200','V200','U850','V850','Z500','OMEGA500','UBOT','VBOT','TREFHT','TREFHTMN:M','TREFHTMX:X','QREFHT','TS','PS','TMQ','TUQ','TVQ','TOZ', 'FLDS', 'FLNS', 'FSDS', 'FSNS', 'SHFLX', 'LHFLX', 'TGCLDCWP', 'TGCLDIWP', 'TGCLDLWP', 'CLDTOT', 'T250', 'T200', 'T150', 'T100', 'T050', 'T025', 'T010', 'T005', 'T002', 'T001', 'TTOP', 'U250', 'U150', 'U100', 'U050', 'U025', 'U010', 'U005', 'U002', 'U001', 'UTOP', 'FSNT', 'FLNT'
- fincl3 = 'PSL','T200','T500','U850','V850','UBOT','VBOT','TREFHT', 'Z700', 'TBOT:M'
- fincl4 = 'FLUT','U200','U850','PRECT','OMEGA500'
- fincl5 = 'PRECT','PRECC','TUQ','TVQ','QFLX','SHFLX','U90M','V90M'
- fincl6 = 'CLDTOT_ISCCP','MEANCLDALB_ISCCP','MEANTAU_ISCCP','MEANPTOP_ISCCP','MEANTB_ISCCP','CLDTOT_CAL','CLDTOT_CAL_LIQ','CLDTOT_CAL_ICE','CLDTOT_CAL_UN','CLDHGH_CAL','CLDHGH_CAL_LIQ','CLDHGH_CAL_ICE','CLDHGH_CAL_UN','CLDMED_CAL','CLDMED_CAL_LIQ','CLDMED_CAL_ICE','CLDMED_CAL_UN','CLDLOW_CAL','CLDLOW_CAL_LIQ','CLDLOW_CAL_ICE','CLDLOW_CAL_UN'
- fincl7 = 'O3', 'PS', 'TROP_P'
diff --git a/cime_config/testmods_dirs/allactive/wcprod_1850_r05/user_nl_elm b/cime_config/testmods_dirs/allactive/wcprod_1850_r05/user_nl_elm
deleted file mode 100644
index 9974e1edeb95..000000000000
--- a/cime_config/testmods_dirs/allactive/wcprod_1850_r05/user_nl_elm
+++ /dev/null
@@ -1,7 +0,0 @@
-! Finidat to be updated, The one below not compatible with v3 lnd config (with TOP and BGC mode, new grid)
-! finidat = '${DIN_LOC_ROOT}/lnd/clm2/initdata_map/clmi.WCYCL1850.ne30pg2_r05_EC30to60E2r2.SMS_Ld1.c20230213.nc'
- hist_dov2xy = .true.,.true.
- hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE', 'FIRA'
- hist_mfilt = 1,365
- hist_nhtfrq = -24,-24
- hist_avgflag_pertape = 'A','A'
diff --git a/cime_config/testmods_dirs/allactive/wcprod_1850_r05/user_nl_mosart b/cime_config/testmods_dirs/allactive/wcprod_1850_r05/user_nl_mosart
deleted file mode 100644
index b0a170bcec25..000000000000
--- a/cime_config/testmods_dirs/allactive/wcprod_1850_r05/user_nl_mosart
+++ /dev/null
@@ -1,4 +0,0 @@
- rtmhist_fincl2 = 'RIVER_DISCHARGE_OVER_LAND_LIQ'
- rtmhist_mfilt = 1,365
- rtmhist_ndens = 2
- rtmhist_nhtfrq = -24,-24
diff --git a/cime_config/testmods_dirs/allactive/wcprodrrm/README b/cime_config/testmods_dirs/allactive/wcprodrrm/README
index 22610563ff40..5a23081a3db5 100644
--- a/cime_config/testmods_dirs/allactive/wcprodrrm/README
+++ b/cime_config/testmods_dirs/allactive/wcprodrrm/README
@@ -1,5 +1,2 @@
-The namelist (user_nl_*) and shell commands in this drectory should result in a case
-which is considered as a V2 candidate at this moment (01/26/2020)
-The user_nl_* files should be replaced with "use case" files once v2 configuration
-is finalized.
+These mods should result in output for an RRM production case
diff --git a/cime_config/testmods_dirs/allactive/wcprodrrm/user_nl_eam b/cime_config/testmods_dirs/allactive/wcprodrrm/user_nl_eam
index eeac1d647b1d..095c6946f5de 100644
--- a/cime_config/testmods_dirs/allactive/wcprodrrm/user_nl_eam
+++ b/cime_config/testmods_dirs/allactive/wcprodrrm/user_nl_eam
@@ -1,11 +1,59 @@
- nhtfrq = -24,-24,-6,-6,-3,-24,-24
- mfilt = 1,30,120,120,240,30,1
- avgflag_pertape = 'A','A','I','A','A','A','I'
- fexcl1 = 'CFAD_SR532_CAL', 'LINOZ_DO3', 'LINOZ_DO3_PSC', 'LINOZ_O3CLIM', 'LINOZ_O3COL', 'LINOZ_SSO3', 'hstobie_linoz'
- fincl1 = 'extinct_sw_inp','extinct_lw_bnd7','extinct_lw_inp','CLD_CAL', 'TREFMNAV', 'TREFMXAV'
- fincl2 = 'FLUT','PRECT','U200','V200','U850','V850','Z500','OMEGA500','UBOT','VBOT','TREFHT','TREFHTMN:M','TREFHTMX:X','QREFHT','TS','PS','TMQ','TUQ','TVQ','TOZ', 'FLDS', 'FLNS', 'FSDS', 'FSNS', 'SHFLX', 'LHFLX', 'TGCLDCWP', 'TGCLDIWP', 'TGCLDLWP', 'CLDTOT', 'T250', 'T200', 'T150', 'T100', 'T050', 'T025', 'T010', 'T005', 'T002', 'T001', 'TTOP', 'U250', 'U150', 'U100', 'U050', 'U025', 'U010', 'U005', 'U002', 'U001', 'UTOP', 'FSNT', 'FLNT'
- fincl3 = 'PSL','T200','T500','U850','V850','UBOT','VBOT','TREFHT', 'Z700', 'TBOT:M'
- fincl4 = 'FLUT','U200','U850','PRECT','OMEGA500'
- fincl5 = 'PRECT','PRECC','TUQ','TVQ','QFLX','SHFLX','U90M','V90M'
- fincl6 = 'CLDTOT_ISCCP','MEANCLDALB_ISCCP','MEANTAU_ISCCP','MEANPTOP_ISCCP','MEANTB_ISCCP','CLDTOT_CAL','CLDTOT_CAL_LIQ','CLDTOT_CAL_ICE','CLDTOT_CAL_UN','CLDHGH_CAL','CLDHGH_CAL_LIQ','CLDHGH_CAL_ICE','CLDHGH_CAL_UN','CLDMED_CAL','CLDMED_CAL_LIQ','CLDMED_CAL_ICE','CLDMED_CAL_UN','CLDLOW_CAL','CLDLOW_CAL_LIQ','CLDLOW_CAL_ICE','CLDLOW_CAL_UN'
- fincl7 = 'O3', 'PS', 'TROP_P'
+cosp_lite = .true.
+
+empty_htapes = .true.
+
+avgflag_pertape = 'A','A','A','A','I','I'
+nhtfrq = -24,-24,-6,-3,-1,-24
+mfilt = 1,30,120,240,720,1
+
+fincl1 = 'AODALL','AODBC','AODDUST','AODPOM','AODSO4','AODSOA','AODSS','AODVIS',
+ 'CLDLOW','CLDMED','CLDHGH','CLDTOT',
+ 'CLDHGH_CAL','CLDLOW_CAL','CLDMED_CAL','CLD_MISR','CLDTOT_CAL',
+ 'CLMODIS','FISCCP1_COSP','FLDS','FLNS','FLNSC','FLNT','FLUT',
+ 'FLUTC','FSDS','FSDSC','FSNS','FSNSC','FSNT','FSNTOA','FSNTOAC','FSNTC',
+ 'ICEFRAC','LANDFRAC','LWCF','OCNFRAC','OMEGA','PRECC','PRECL','PRECSC','PRECSL','PS','PSL','Q',
+ 'QFLX','QREFHT','RELHUM','SCO','SHFLX','SOLIN','SWCF','T','TAUX','TAUY','TCO',
+ 'TGCLDLWP','TMQ','TREFHT','TREFMNAV','TREFMXAV','TS','U','U10','V','Z3',
+ 'dst_a1DDF','dst_a3DDF','dst_c1DDF','dst_c3DDF','dst_a1SFWET','dst_a3SFWET','dst_c1SFWET','dst_c3SFWET',
+ 'O3','LHFLX',
+ 'O3_2DTDA_trop','O3_2DTDB_trop','O3_2DTDD_trop','O3_2DTDE_trop','O3_2DTDI_trop','O3_2DTDL_trop',
+ 'O3_2DTDN_trop','O3_2DTDO_trop','O3_2DTDS_trop','O3_2DTDU_trop','O3_2DTRE_trop','O3_2DTRI_trop',
+ 'O3_SRF','NO_2DTDS','NO_TDLgt','NO2_2DTDD','NO2_2DTDS','NO2_TDAcf','CO_SRF','TROPE3D_P','TROP_P',
+ 'CDNUMC','SFDMS','so4_a1_sfgaex1','so4_a2_sfgaex1','so4_a3_sfgaex1','so4_a5_sfgaex1','soa_a1_sfgaex1',
+ 'soa_a2_sfgaex1','soa_a3_sfgaex1','GS_soa_a1','GS_soa_a2','GS_soa_a3','AQSO4_H2O2','AQSO4_O3',
+ 'SFSO2','SO2_CLXF','SO2','DF_SO2','AQ_SO2','GS_SO2','WD_SO2','ABURDENSO4_STR','ABURDENSO4_TRO',
+ 'ABURDENSO4','ABURDENBC','ABURDENDUST','ABURDENMOM','ABURDENPOM','ABURDENSEASALT',
+ 'ABURDENSOA','AODSO4_STR','AODSO4_TRO',
+ 'EXTINCT','AODABS','AODABSBC','CLDICE','CLDLIQ','CLD_CAL_TMPLIQ','CLD_CAL_TMPICE','Mass_bc_srf',
+ 'Mass_dst_srf','Mass_mom_srf','Mass_ncl_srf','Mass_pom_srf','Mass_so4_srf','Mass_soa_srf','Mass_bc_850',
+ 'Mass_dst_850','Mass_mom_850','Mass_ncl_850','Mass_pom_850','Mass_so4_850','Mass_soa_850','Mass_bc_500',
+ 'Mass_dst_500','Mass_mom_500','Mass_ncl_500','Mass_pom_500','Mass_so4_500','Mass_soa_500','Mass_bc_330',
+ 'Mass_dst_330','Mass_mom_330','Mass_ncl_330','Mass_pom_330','Mass_so4_330','Mass_soa_330','Mass_bc_200',
+ 'Mass_dst_200','Mass_mom_200','Mass_ncl_200','Mass_pom_200','Mass_so4_200','Mass_soa_200',
+ 'O3_2DTDD','O3_2DCIP','O3_2DCIL','CO_2DTDS','CO_2DTDD','CO_2DCEP','CO_2DCEL','NO_2DTDD',
+ 'FLNTC','SAODVIS',
+ 'H2OLNZ',
+ 'dst_a1SF','dst_a3SF',
+ 'PHIS','CLOUD','TGCLDIWP','TGCLDCWP','AREL',
+ 'CLDTOT_ISCCP','MEANCLDALB_ISCCP','MEANPTOP_ISCCP','CLD_CAL',
+ 'CLDTOT_CAL_LIQ','CLDTOT_CAL_ICE','CLDTOT_CAL_UN',
+ 'CLDHGH_CAL_LIQ','CLDHGH_CAL_ICE','CLDHGH_CAL_UN',
+ 'CLDMED_CAL_LIQ','CLDMED_CAL_ICE','CLDMED_CAL_UN',
+ 'CLDLOW_CAL_LIQ','CLDLOW_CAL_ICE','CLDLOW_CAL_UN',
+ 'CLWMODIS','CLIMODIS'
+
+fincl2 = 'PS', 'FLUT','PRECT','U200','V200','U850','V850',
+ 'TCO','SCO','TREFHTMN','TREFHTMX','TREFHT','QREFHT'
+fincl3 = 'PS', 'PSL','PRECT','TUQ','TVQ','UBOT','VBOT','TREFHT','FLUT','OMEGA500','TBOT','U850','V850','U200','V200','T200','T500','Z700'
+fincl4 = 'PRECT'
+fincl5 = 'O3_SRF'
+fincl6 = 'CO_2DMSD','NO2_2DMSD','NO_2DMSD','O3_2DMSD','O3_2DMSD_trop'
+
+! -- chemUCI settings ------------------
+history_chemdyg_summary = .true.
+history_gaschmbudget_2D = .false.
+history_gaschmbudget_2D_levels = .false.
+history_gaschmbudget_num = 6 !! no impact if history_gaschmbudget_2D = .false.
+
+! -- MAM5 settings ------------------
+is_output_interactive_volc = .true.
diff --git a/cime_config/testmods_dirs/allactive/wcprodrrm/user_nl_elm b/cime_config/testmods_dirs/allactive/wcprodrrm/user_nl_elm
index f6e484326140..cd1adab77404 100644
--- a/cime_config/testmods_dirs/allactive/wcprodrrm/user_nl_elm
+++ b/cime_config/testmods_dirs/allactive/wcprodrrm/user_nl_elm
@@ -1,33 +1,40 @@
-!----------------------------------------------------------------------------------
-! 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 co2_ppmv with CCSM_CO2_PPMV option
-! 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
-!----------------------------------------------------------------------------------
-
- check_finidat_year_consistency = .false.
- hist_dov2xy = .true.,.true. check_finidat_year_consistency = .false.
- hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE'
- hist_mfilt = 1,365
- hist_nhtfrq = 0,-24
- hist_avgflag_pertape = 'A','A'
- check_finidat_year_consistency = .false.
- !finidat = '${case_scripts_dir}/../init/remap_to_naRRMpg2_20201217.beta1_01.piControlSI.compy.elm.r.0121-01-01-00000.nc'
\ No newline at end of file
+hist_dov2xy = .true.,.true.
+hist_fexcl1 = 'AGWDNPP','ALTMAX_LASTYEAR','AVAIL_RETRANSP','AVAILC','BAF_CROP',
+ 'BAF_PEATF','BIOCHEM_PMIN_TO_PLANT','CH4_SURF_AERE_SAT','CH4_SURF_AERE_UNSAT','CH4_SURF_DIFF_SAT',
+ 'CH4_SURF_DIFF_UNSAT','CH4_SURF_EBUL_SAT','CH4_SURF_EBUL_UNSAT','CMASS_BALANCE_ERROR','cn_scalar',
+ 'COL_PTRUNC','CONC_CH4_SAT','CONC_CH4_UNSAT','CONC_O2_SAT','CONC_O2_UNSAT',
+ 'cp_scalar','CWDC_HR','CWDC_LOSS','CWDC_TO_LITR2C','CWDC_TO_LITR3C',
+ 'CWDC_vr','CWDN_TO_LITR2N','CWDN_TO_LITR3N','CWDN_vr','CWDP_TO_LITR2P',
+ 'CWDP_TO_LITR3P','CWDP_vr','DWT_CONV_CFLUX_DRIBBLED','F_CO2_SOIL','F_CO2_SOIL_vr',
+ 'F_DENIT_vr','F_N2O_DENIT','F_N2O_NIT','F_NIT_vr','FCH4_DFSAT',
+ 'FINUNDATED_LAG','FPI_P_vr','FPI_vr','FROOTC_LOSS','HR_vr',
+ 'LABILEP_TO_SECONDP','LABILEP_vr','LAND_UPTAKE','LEAF_MR','leaf_npimbalance',
+ 'LEAFC_LOSS','LEAFC_TO_LITTER','LFC2','LITR1_HR','LITR1C_TO_SOIL1C',
+ 'LITR1C_vr','LITR1N_TNDNCY_VERT_TRANS','LITR1N_TO_SOIL1N','LITR1N_vr','LITR1P_TNDNCY_VERT_TRANS',
+ 'LITR1P_TO_SOIL1P','LITR1P_vr','LITR2_HR','LITR2C_TO_SOIL2C','LITR2C_vr',
+ 'LITR2N_TNDNCY_VERT_TRANS','LITR2N_TO_SOIL2N','LITR2N_vr','LITR2P_TNDNCY_VERT_TRANS','LITR2P_TO_SOIL2P',
+ 'LITR2P_vr','LITR3_HR','LITR3C_TO_SOIL3C','LITR3C_vr','LITR3N_TNDNCY_VERT_TRANS',
+ 'LITR3N_TO_SOIL3N','LITR3N_vr','LITR3P_TNDNCY_VERT_TRANS','LITR3P_TO_SOIL3P','LITR3P_vr',
+ 'M_LITR1C_TO_LEACHING','M_LITR2C_TO_LEACHING','M_LITR3C_TO_LEACHING','M_SOIL1C_TO_LEACHING','M_SOIL2C_TO_LEACHING',
+ 'M_SOIL3C_TO_LEACHING','M_SOIL4C_TO_LEACHING','NDEPLOY','NEM','nlim_m',
+ 'o2_decomp_depth_unsat','OCCLP_vr','PDEPLOY','PLANT_CALLOC','PLANT_NDEMAND',
+ 'PLANT_NDEMAND_COL','PLANT_PALLOC','PLANT_PDEMAND','PLANT_PDEMAND_COL','plim_m',
+ 'POT_F_DENIT','POT_F_NIT','POTENTIAL_IMMOB','POTENTIAL_IMMOB_P','PRIMP_TO_LABILEP',
+ 'PRIMP_vr','PROD1P_LOSS','QOVER_LAG','RETRANSN_TO_NPOOL','RETRANSP_TO_PPOOL',
+ 'SCALARAVG_vr','SECONDP_TO_LABILEP','SECONDP_TO_OCCLP','SECONDP_vr','SMIN_NH4_vr',
+ 'SMIN_NO3_vr','SMINN_TO_SOIL1N_L1','SMINN_TO_SOIL2N_L2','SMINN_TO_SOIL2N_S1','SMINN_TO_SOIL3N_L3',
+ 'SMINN_TO_SOIL3N_S2','SMINN_TO_SOIL4N_S3','SMINP_TO_SOIL1P_L1','SMINP_TO_SOIL2P_L2','SMINP_TO_SOIL2P_S1',
+ 'SMINP_TO_SOIL3P_L3','SMINP_TO_SOIL3P_S2','SMINP_TO_SOIL4P_S3','SMINP_vr','SOIL1_HR','SOIL1C_TO_SOIL2C','SOIL1C_vr','SOIL1N_TNDNCY_VERT_TRANS','SOIL1N_TO_SOIL2N','SOIL1N_vr',
+ 'SOIL1P_TNDNCY_VERT_TRANS','SOIL1P_TO_SOIL2P','SOIL1P_vr','SOIL2_HR','SOIL2C_TO_SOIL3C',
+ 'SOIL2C_vr','SOIL2N_TNDNCY_VERT_TRANS','SOIL2N_TO_SOIL3N','SOIL2N_vr','SOIL2P_TNDNCY_VERT_TRANS',
+ 'SOIL2P_TO_SOIL3P','SOIL2P_vr','SOIL3_HR','SOIL3C_TO_SOIL4C','SOIL3C_vr',
+ 'SOIL3N_TNDNCY_VERT_TRANS','SOIL3N_TO_SOIL4N','SOIL3N_vr','SOIL3P_TNDNCY_VERT_TRANS','SOIL3P_TO_SOIL4P',
+ 'SOIL3P_vr','SOIL4_HR','SOIL4C_vr','SOIL4N_TNDNCY_VERT_TRANS','SOIL4N_TO_SMINN',
+ 'SOIL4N_vr','SOIL4P_TNDNCY_VERT_TRANS','SOIL4P_TO_SMINP','SOIL4P_vr','SOLUTIONP_vr',
+ 'TCS_MONTH_BEGIN','TCS_MONTH_END','TOTCOLCH4','water_scalar','WF',
+ 'wlim_m','WOODC_LOSS','WTGQ'
+hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC'
+hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE', 'FIRA'
+hist_mfilt = 1,365
+hist_nhtfrq = -24,-24
+hist_avgflag_pertape = 'A','A'
diff --git a/cime_config/testmods_dirs/allactive/wcprodrrm_1850/README b/cime_config/testmods_dirs/allactive/wcprodrrm_1850/README
index 22610563ff40..e701b223a6a9 100644
--- a/cime_config/testmods_dirs/allactive/wcprodrrm_1850/README
+++ b/cime_config/testmods_dirs/allactive/wcprodrrm_1850/README
@@ -1,5 +1,2 @@
-The namelist (user_nl_*) and shell commands in this drectory should result in a case
-which is considered as a V2 candidate at this moment (01/26/2020)
-The user_nl_* files should be replaced with "use case" files once v2 configuration
-is finalized.
+These mods should result in production output for an 1850 RRM case
diff --git a/cime_config/testmods_dirs/allactive/wcprodrrm_1850/user_nl_eam b/cime_config/testmods_dirs/allactive/wcprodrrm_1850/user_nl_eam
index eeac1d647b1d..095c6946f5de 100644
--- a/cime_config/testmods_dirs/allactive/wcprodrrm_1850/user_nl_eam
+++ b/cime_config/testmods_dirs/allactive/wcprodrrm_1850/user_nl_eam
@@ -1,11 +1,59 @@
- nhtfrq = -24,-24,-6,-6,-3,-24,-24
- mfilt = 1,30,120,120,240,30,1
- avgflag_pertape = 'A','A','I','A','A','A','I'
- fexcl1 = 'CFAD_SR532_CAL', 'LINOZ_DO3', 'LINOZ_DO3_PSC', 'LINOZ_O3CLIM', 'LINOZ_O3COL', 'LINOZ_SSO3', 'hstobie_linoz'
- fincl1 = 'extinct_sw_inp','extinct_lw_bnd7','extinct_lw_inp','CLD_CAL', 'TREFMNAV', 'TREFMXAV'
- fincl2 = 'FLUT','PRECT','U200','V200','U850','V850','Z500','OMEGA500','UBOT','VBOT','TREFHT','TREFHTMN:M','TREFHTMX:X','QREFHT','TS','PS','TMQ','TUQ','TVQ','TOZ', 'FLDS', 'FLNS', 'FSDS', 'FSNS', 'SHFLX', 'LHFLX', 'TGCLDCWP', 'TGCLDIWP', 'TGCLDLWP', 'CLDTOT', 'T250', 'T200', 'T150', 'T100', 'T050', 'T025', 'T010', 'T005', 'T002', 'T001', 'TTOP', 'U250', 'U150', 'U100', 'U050', 'U025', 'U010', 'U005', 'U002', 'U001', 'UTOP', 'FSNT', 'FLNT'
- fincl3 = 'PSL','T200','T500','U850','V850','UBOT','VBOT','TREFHT', 'Z700', 'TBOT:M'
- fincl4 = 'FLUT','U200','U850','PRECT','OMEGA500'
- fincl5 = 'PRECT','PRECC','TUQ','TVQ','QFLX','SHFLX','U90M','V90M'
- fincl6 = 'CLDTOT_ISCCP','MEANCLDALB_ISCCP','MEANTAU_ISCCP','MEANPTOP_ISCCP','MEANTB_ISCCP','CLDTOT_CAL','CLDTOT_CAL_LIQ','CLDTOT_CAL_ICE','CLDTOT_CAL_UN','CLDHGH_CAL','CLDHGH_CAL_LIQ','CLDHGH_CAL_ICE','CLDHGH_CAL_UN','CLDMED_CAL','CLDMED_CAL_LIQ','CLDMED_CAL_ICE','CLDMED_CAL_UN','CLDLOW_CAL','CLDLOW_CAL_LIQ','CLDLOW_CAL_ICE','CLDLOW_CAL_UN'
- fincl7 = 'O3', 'PS', 'TROP_P'
+cosp_lite = .true.
+
+empty_htapes = .true.
+
+avgflag_pertape = 'A','A','A','A','I','I'
+nhtfrq = -24,-24,-6,-3,-1,-24
+mfilt = 1,30,120,240,720,1
+
+fincl1 = 'AODALL','AODBC','AODDUST','AODPOM','AODSO4','AODSOA','AODSS','AODVIS',
+ 'CLDLOW','CLDMED','CLDHGH','CLDTOT',
+ 'CLDHGH_CAL','CLDLOW_CAL','CLDMED_CAL','CLD_MISR','CLDTOT_CAL',
+ 'CLMODIS','FISCCP1_COSP','FLDS','FLNS','FLNSC','FLNT','FLUT',
+ 'FLUTC','FSDS','FSDSC','FSNS','FSNSC','FSNT','FSNTOA','FSNTOAC','FSNTC',
+ 'ICEFRAC','LANDFRAC','LWCF','OCNFRAC','OMEGA','PRECC','PRECL','PRECSC','PRECSL','PS','PSL','Q',
+ 'QFLX','QREFHT','RELHUM','SCO','SHFLX','SOLIN','SWCF','T','TAUX','TAUY','TCO',
+ 'TGCLDLWP','TMQ','TREFHT','TREFMNAV','TREFMXAV','TS','U','U10','V','Z3',
+ 'dst_a1DDF','dst_a3DDF','dst_c1DDF','dst_c3DDF','dst_a1SFWET','dst_a3SFWET','dst_c1SFWET','dst_c3SFWET',
+ 'O3','LHFLX',
+ 'O3_2DTDA_trop','O3_2DTDB_trop','O3_2DTDD_trop','O3_2DTDE_trop','O3_2DTDI_trop','O3_2DTDL_trop',
+ 'O3_2DTDN_trop','O3_2DTDO_trop','O3_2DTDS_trop','O3_2DTDU_trop','O3_2DTRE_trop','O3_2DTRI_trop',
+ 'O3_SRF','NO_2DTDS','NO_TDLgt','NO2_2DTDD','NO2_2DTDS','NO2_TDAcf','CO_SRF','TROPE3D_P','TROP_P',
+ 'CDNUMC','SFDMS','so4_a1_sfgaex1','so4_a2_sfgaex1','so4_a3_sfgaex1','so4_a5_sfgaex1','soa_a1_sfgaex1',
+ 'soa_a2_sfgaex1','soa_a3_sfgaex1','GS_soa_a1','GS_soa_a2','GS_soa_a3','AQSO4_H2O2','AQSO4_O3',
+ 'SFSO2','SO2_CLXF','SO2','DF_SO2','AQ_SO2','GS_SO2','WD_SO2','ABURDENSO4_STR','ABURDENSO4_TRO',
+ 'ABURDENSO4','ABURDENBC','ABURDENDUST','ABURDENMOM','ABURDENPOM','ABURDENSEASALT',
+ 'ABURDENSOA','AODSO4_STR','AODSO4_TRO',
+ 'EXTINCT','AODABS','AODABSBC','CLDICE','CLDLIQ','CLD_CAL_TMPLIQ','CLD_CAL_TMPICE','Mass_bc_srf',
+ 'Mass_dst_srf','Mass_mom_srf','Mass_ncl_srf','Mass_pom_srf','Mass_so4_srf','Mass_soa_srf','Mass_bc_850',
+ 'Mass_dst_850','Mass_mom_850','Mass_ncl_850','Mass_pom_850','Mass_so4_850','Mass_soa_850','Mass_bc_500',
+ 'Mass_dst_500','Mass_mom_500','Mass_ncl_500','Mass_pom_500','Mass_so4_500','Mass_soa_500','Mass_bc_330',
+ 'Mass_dst_330','Mass_mom_330','Mass_ncl_330','Mass_pom_330','Mass_so4_330','Mass_soa_330','Mass_bc_200',
+ 'Mass_dst_200','Mass_mom_200','Mass_ncl_200','Mass_pom_200','Mass_so4_200','Mass_soa_200',
+ 'O3_2DTDD','O3_2DCIP','O3_2DCIL','CO_2DTDS','CO_2DTDD','CO_2DCEP','CO_2DCEL','NO_2DTDD',
+ 'FLNTC','SAODVIS',
+ 'H2OLNZ',
+ 'dst_a1SF','dst_a3SF',
+ 'PHIS','CLOUD','TGCLDIWP','TGCLDCWP','AREL',
+ 'CLDTOT_ISCCP','MEANCLDALB_ISCCP','MEANPTOP_ISCCP','CLD_CAL',
+ 'CLDTOT_CAL_LIQ','CLDTOT_CAL_ICE','CLDTOT_CAL_UN',
+ 'CLDHGH_CAL_LIQ','CLDHGH_CAL_ICE','CLDHGH_CAL_UN',
+ 'CLDMED_CAL_LIQ','CLDMED_CAL_ICE','CLDMED_CAL_UN',
+ 'CLDLOW_CAL_LIQ','CLDLOW_CAL_ICE','CLDLOW_CAL_UN',
+ 'CLWMODIS','CLIMODIS'
+
+fincl2 = 'PS', 'FLUT','PRECT','U200','V200','U850','V850',
+ 'TCO','SCO','TREFHTMN','TREFHTMX','TREFHT','QREFHT'
+fincl3 = 'PS', 'PSL','PRECT','TUQ','TVQ','UBOT','VBOT','TREFHT','FLUT','OMEGA500','TBOT','U850','V850','U200','V200','T200','T500','Z700'
+fincl4 = 'PRECT'
+fincl5 = 'O3_SRF'
+fincl6 = 'CO_2DMSD','NO2_2DMSD','NO_2DMSD','O3_2DMSD','O3_2DMSD_trop'
+
+! -- chemUCI settings ------------------
+history_chemdyg_summary = .true.
+history_gaschmbudget_2D = .false.
+history_gaschmbudget_2D_levels = .false.
+history_gaschmbudget_num = 6 !! no impact if history_gaschmbudget_2D = .false.
+
+! -- MAM5 settings ------------------
+is_output_interactive_volc = .true.
diff --git a/cime_config/testmods_dirs/allactive/wcprodrrm_1850/user_nl_elm b/cime_config/testmods_dirs/allactive/wcprodrrm_1850/user_nl_elm
index 8570ad3cf598..cd1adab77404 100644
--- a/cime_config/testmods_dirs/allactive/wcprodrrm_1850/user_nl_elm
+++ b/cime_config/testmods_dirs/allactive/wcprodrrm_1850/user_nl_elm
@@ -1,34 +1,40 @@
-!----------------------------------------------------------------------------------
-! 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 co2_ppmv with CCSM_CO2_PPMV option
-! 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
-!----------------------------------------------------------------------------------
-
- check_finidat_year_consistency = .false.
- hist_dov2xy = .true.,.true. check_finidat_year_consistency = .false.
- hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE'
- hist_mfilt = 1,365
- hist_nhtfrq = 0,-24
- hist_avgflag_pertape = 'A','A'
- check_finidat_year_consistency = .false.
-! Finidat to be updated, The one below not compatible with v3 lnd config (with TOP and BGC mode, new grid)
-! finidat = '${DIN_LOC_ROOT}/lnd/clm2/initdata_map/clmi.WCYCL1850.northamericax4v1pg2_WC14to60E2r3.SMS_PS.c20230213.nc'
+hist_dov2xy = .true.,.true.
+hist_fexcl1 = 'AGWDNPP','ALTMAX_LASTYEAR','AVAIL_RETRANSP','AVAILC','BAF_CROP',
+ 'BAF_PEATF','BIOCHEM_PMIN_TO_PLANT','CH4_SURF_AERE_SAT','CH4_SURF_AERE_UNSAT','CH4_SURF_DIFF_SAT',
+ 'CH4_SURF_DIFF_UNSAT','CH4_SURF_EBUL_SAT','CH4_SURF_EBUL_UNSAT','CMASS_BALANCE_ERROR','cn_scalar',
+ 'COL_PTRUNC','CONC_CH4_SAT','CONC_CH4_UNSAT','CONC_O2_SAT','CONC_O2_UNSAT',
+ 'cp_scalar','CWDC_HR','CWDC_LOSS','CWDC_TO_LITR2C','CWDC_TO_LITR3C',
+ 'CWDC_vr','CWDN_TO_LITR2N','CWDN_TO_LITR3N','CWDN_vr','CWDP_TO_LITR2P',
+ 'CWDP_TO_LITR3P','CWDP_vr','DWT_CONV_CFLUX_DRIBBLED','F_CO2_SOIL','F_CO2_SOIL_vr',
+ 'F_DENIT_vr','F_N2O_DENIT','F_N2O_NIT','F_NIT_vr','FCH4_DFSAT',
+ 'FINUNDATED_LAG','FPI_P_vr','FPI_vr','FROOTC_LOSS','HR_vr',
+ 'LABILEP_TO_SECONDP','LABILEP_vr','LAND_UPTAKE','LEAF_MR','leaf_npimbalance',
+ 'LEAFC_LOSS','LEAFC_TO_LITTER','LFC2','LITR1_HR','LITR1C_TO_SOIL1C',
+ 'LITR1C_vr','LITR1N_TNDNCY_VERT_TRANS','LITR1N_TO_SOIL1N','LITR1N_vr','LITR1P_TNDNCY_VERT_TRANS',
+ 'LITR1P_TO_SOIL1P','LITR1P_vr','LITR2_HR','LITR2C_TO_SOIL2C','LITR2C_vr',
+ 'LITR2N_TNDNCY_VERT_TRANS','LITR2N_TO_SOIL2N','LITR2N_vr','LITR2P_TNDNCY_VERT_TRANS','LITR2P_TO_SOIL2P',
+ 'LITR2P_vr','LITR3_HR','LITR3C_TO_SOIL3C','LITR3C_vr','LITR3N_TNDNCY_VERT_TRANS',
+ 'LITR3N_TO_SOIL3N','LITR3N_vr','LITR3P_TNDNCY_VERT_TRANS','LITR3P_TO_SOIL3P','LITR3P_vr',
+ 'M_LITR1C_TO_LEACHING','M_LITR2C_TO_LEACHING','M_LITR3C_TO_LEACHING','M_SOIL1C_TO_LEACHING','M_SOIL2C_TO_LEACHING',
+ 'M_SOIL3C_TO_LEACHING','M_SOIL4C_TO_LEACHING','NDEPLOY','NEM','nlim_m',
+ 'o2_decomp_depth_unsat','OCCLP_vr','PDEPLOY','PLANT_CALLOC','PLANT_NDEMAND',
+ 'PLANT_NDEMAND_COL','PLANT_PALLOC','PLANT_PDEMAND','PLANT_PDEMAND_COL','plim_m',
+ 'POT_F_DENIT','POT_F_NIT','POTENTIAL_IMMOB','POTENTIAL_IMMOB_P','PRIMP_TO_LABILEP',
+ 'PRIMP_vr','PROD1P_LOSS','QOVER_LAG','RETRANSN_TO_NPOOL','RETRANSP_TO_PPOOL',
+ 'SCALARAVG_vr','SECONDP_TO_LABILEP','SECONDP_TO_OCCLP','SECONDP_vr','SMIN_NH4_vr',
+ 'SMIN_NO3_vr','SMINN_TO_SOIL1N_L1','SMINN_TO_SOIL2N_L2','SMINN_TO_SOIL2N_S1','SMINN_TO_SOIL3N_L3',
+ 'SMINN_TO_SOIL3N_S2','SMINN_TO_SOIL4N_S3','SMINP_TO_SOIL1P_L1','SMINP_TO_SOIL2P_L2','SMINP_TO_SOIL2P_S1',
+ 'SMINP_TO_SOIL3P_L3','SMINP_TO_SOIL3P_S2','SMINP_TO_SOIL4P_S3','SMINP_vr','SOIL1_HR','SOIL1C_TO_SOIL2C','SOIL1C_vr','SOIL1N_TNDNCY_VERT_TRANS','SOIL1N_TO_SOIL2N','SOIL1N_vr',
+ 'SOIL1P_TNDNCY_VERT_TRANS','SOIL1P_TO_SOIL2P','SOIL1P_vr','SOIL2_HR','SOIL2C_TO_SOIL3C',
+ 'SOIL2C_vr','SOIL2N_TNDNCY_VERT_TRANS','SOIL2N_TO_SOIL3N','SOIL2N_vr','SOIL2P_TNDNCY_VERT_TRANS',
+ 'SOIL2P_TO_SOIL3P','SOIL2P_vr','SOIL3_HR','SOIL3C_TO_SOIL4C','SOIL3C_vr',
+ 'SOIL3N_TNDNCY_VERT_TRANS','SOIL3N_TO_SOIL4N','SOIL3N_vr','SOIL3P_TNDNCY_VERT_TRANS','SOIL3P_TO_SOIL4P',
+ 'SOIL3P_vr','SOIL4_HR','SOIL4C_vr','SOIL4N_TNDNCY_VERT_TRANS','SOIL4N_TO_SMINN',
+ 'SOIL4N_vr','SOIL4P_TNDNCY_VERT_TRANS','SOIL4P_TO_SMINP','SOIL4P_vr','SOLUTIONP_vr',
+ 'TCS_MONTH_BEGIN','TCS_MONTH_END','TOTCOLCH4','water_scalar','WF',
+ 'wlim_m','WOODC_LOSS','WTGQ'
+hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC'
+hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE', 'FIRA'
+hist_mfilt = 1,365
+hist_nhtfrq = -24,-24
+hist_avgflag_pertape = 'A','A'
diff --git a/cime_config/testmods_dirs/allactive/wcprodssp/README b/cime_config/testmods_dirs/allactive/wcprodssp/README
index 65ebc5afc662..fe36669a02a2 100644
--- a/cime_config/testmods_dirs/allactive/wcprodssp/README
+++ b/cime_config/testmods_dirs/allactive/wcprodssp/README
@@ -1,9 +1,8 @@
Modifications (in shell_commands) to enable a hybrid run for SSP compsets
-(e.g., SSp370 or SSP585), starting from 2015-01-01 of v2.LR.historical_0101
+(e.g., SSp370 or SSP585), starting from v3 long spinup.
Other modifications (same as for wcprod) should result in a case that has the
same namelist settings as the water cycle production sims
Run these for at least 1 day to see all output.
Also use the CMIP6 compsets.
-If running longer, change the nhtfrq for the first history file.
diff --git a/cime_config/testmods_dirs/bench/noio/user_nl_mpaso b/cime_config/testmods_dirs/bench/noio/user_nl_mpaso
index fcaa3656188f..046a22bb8831 100644
--- a/cime_config/testmods_dirs/bench/noio/user_nl_mpaso
+++ b/cime_config/testmods_dirs/bench/noio/user_nl_mpaso
@@ -6,3 +6,4 @@ config_am_timeseriesstatsmonthlymin_enable=false
config_am_timeseriesstatsmonthlymax_enable=false
config_am_eddyproductvariables_enable=false
config_am_oceanheatcontent_enable=false
+config_am_conservationcheck_enable=false
diff --git a/cime_config/tests.py b/cime_config/tests.py
index c92870ad9f7a..ab5fa2ce9493 100644
--- a/cime_config/tests.py
+++ b/cime_config/tests.py
@@ -213,16 +213,16 @@
"e3sm_atm_prod" : {
"tests" : (
"SMS_Ln5.ne30pg2_r05_IcoswISC30E3r5.F2010.eam-wcprod_F2010",
- "SMS.ne30pg2_r05_IcoswISC30E3r5.F20TR.eam-wcprod_F20TR",
+ "SMS_Ld1.ne30pg2_r05_IcoswISC30E3r5.F20TR.eam-wcprod_F20TR",
)
},
#atmopheric nbfb tests
"e3sm_atm_nbfb" : {
"tests" : (
- "PGN_P1x1.ne4_oQU240.F2010",
- "TSC_PS.ne4_oQU240.F2010",
- "MVK_PS.ne4_oQU240.F2010",
+ "PGN_P1x1.ne4pg2_oQU480.F2010",
+ "TSC_PS.ne4pg2_oQU480.F2010",
+ "MVK_PS.ne4pg2_oQU480.F2010",
)
},
@@ -292,7 +292,6 @@
"SMS_D_Ld1.ne30pg2_r05_IcoswISC30E3r5.WCYCL1850.allactive-wcprod",
"SMS_D_Ld1.ne30pg2_r05_IcoswISC30E3r5.WCYCLSSP370.allactive-wcprodssp",
"ERS_Ld3.ne4pg2_oQU480.F2010",
- #"ERT_Ld31.ne16_g37.B1850C5",#add this line back in with the new correct compset
"NCK.ne4pg2_oQU480.WCYCL1850NS",
"PET.f19_g16.X.allactive-mach-pet",
"PET.f45_g37_rx1.A.allactive-mach-pet",
@@ -302,7 +301,6 @@
"SMS_Ld2.ne30pg2_r05_IcoswISC30E3r5.BGCEXP_CNTL_CNPECACNT_1850.elm-bgcexp",
"SMS_Ld2.ne30pg2_r05_IcoswISC30E3r5.BGCEXP_CNTL_CNPRDCTC_1850.elm-bgcexp",
"SMS_D_Ld3.T62_oQU120.CMPASO-IAF",
- "SMS_D_Ld1.ne30pg2_r05_IcoswISC30E3r5.WCYCL1850",
"SMS_Ln5.ne30pg2_ne30pg2.F2010-SCREAM-LR-DYAMOND2",
"ERS_Ld3.ne30pg2_r05_IcoswISC30E3r5.WCYCL1850.allactive-nlmaps",
"SMS_D_Ld1.ne30pg2_r05_IcoswISC30E3r5.CRYO1850-DISMF",
@@ -347,13 +345,12 @@
"e3sm_prod" : {
"inherit" : "e3sm_atm_prod",
"tests" : (
- "SMS_Ld1.ne30pg2_r05_IcoswISC30E3r5.WCYCL1850.allactive-wcprod_1850_r05",
"SMS_Ld1.ne30pg2_r05_IcoswISC30E3r5.WCYCL1850-1pctCO2.allactive-wcprod_1850_1pctCO2",
"SMS_Ld1.ne30pg2_r05_IcoswISC30E3r5.WCYCL1850-4xCO2.allactive-wcprod_1850_4xCO2",
"SMS_Ld1.ne30pg2_r05_IcoswISC30E3r5.WCYCL1850.allactive-wcprod_1850",
"SMS_Ld1.ne30pg2_r05_IcoswISC30E3r5.WCYCLSSP370.allactive-wcprodssp",
"SMS_Ld1.ne30pg2_r05_IcoswISC30E3r5.WCYCLSSP585.allactive-wcprodssp",
- "SMS_PS.northamericax4v1pg2_WC14to60E2r3.WCYCL1850.allactive-wcprodrrm_1850",
+ "SMS_Ld1_PS.northamericax4v1pg2_WC14to60E2r3.WCYCL1850.allactive-wcprodrrm_1850",
"SMS_D_Ld1.ne30pg2_r05_IcoswISC30E3r5.CRYO1850",
)
},
@@ -371,11 +368,8 @@
#e3sm performance-benching of production-like runs
"e3sm_prod_bench" : {
"tests" : (
- "PFS.ne30pg2_r05_oECv3.F2010.bench-noio",
- "PFS.ne30pg2_r05_oECv3.F20TR.bench-noio",
- "PFS.ne30pg2_r05_EC30to60E2r2.WCYCL1850.bench-noio",
- "PFS.ne30pg2_EC30to60E2r2.WCYCL1850.bench-noio",
- "PFS_PS.northamericax4v1pg2_WC14to60E2r3.WCYCL1850.bench-noio",
+ "PFS.ne30pg2_r05_IcoswISC30E3r5.F2010.bench-noio",
+ "PFS.ne30pg2_r05_IcoswISC30E3r5.WCYCL1850.bench-noio",
)
},
diff --git a/components/eam/cime_config/config_pes.xml b/components/eam/cime_config/config_pes.xml
index 8d46f9371934..15a45fe92726 100644
--- a/components/eam/cime_config/config_pes.xml
+++ b/components/eam/cime_config/config_pes.xml
@@ -771,6 +771,21 @@
+
+
+ improv pelayout for tri-grid BGC tests with EAM+DOCN
+
+ -4
+ -4
+ -4
+ -4
+ -4
+ -4
+ -4
+ -4
+
+
+
@@ -1093,6 +1108,21 @@
+
+
+ --res conusx4v1_r05_oECv3 --compset F2010
+
+ -4
+ -4
+ -4
+ -4
+ -4
+ -4
+ -4
+ -4
+
+
+
--res conusx4v1_r05_oECv3 --compset F2010
diff --git a/components/eam/cime_config/testdefs/testmods_dirs/eam/wcprod/user_nl_eam b/components/eam/cime_config/testdefs/testmods_dirs/eam/wcprod/user_nl_eam
index 9cabe55f775e..095c6946f5de 100644
--- a/components/eam/cime_config/testdefs/testmods_dirs/eam/wcprod/user_nl_eam
+++ b/components/eam/cime_config/testdefs/testmods_dirs/eam/wcprod/user_nl_eam
@@ -3,7 +3,7 @@ cosp_lite = .true.
empty_htapes = .true.
avgflag_pertape = 'A','A','A','A','I','I'
-nhtfrq = -24,-24,-6,-3,-1,0
+nhtfrq = -24,-24,-6,-3,-1,-24
mfilt = 1,30,120,240,720,1
fincl1 = 'AODALL','AODBC','AODDUST','AODPOM','AODSO4','AODSOA','AODSS','AODVIS',
diff --git a/components/eam/cime_config/testdefs/testmods_dirs/eam/wcprod_F2010/user_nl_eam b/components/eam/cime_config/testdefs/testmods_dirs/eam/wcprod_F2010/user_nl_eam
index 9cabe55f775e..095c6946f5de 100644
--- a/components/eam/cime_config/testdefs/testmods_dirs/eam/wcprod_F2010/user_nl_eam
+++ b/components/eam/cime_config/testdefs/testmods_dirs/eam/wcprod_F2010/user_nl_eam
@@ -3,7 +3,7 @@ cosp_lite = .true.
empty_htapes = .true.
avgflag_pertape = 'A','A','A','A','I','I'
-nhtfrq = -24,-24,-6,-3,-1,0
+nhtfrq = -24,-24,-6,-3,-1,-24
mfilt = 1,30,120,240,720,1
fincl1 = 'AODALL','AODBC','AODDUST','AODPOM','AODSO4','AODSOA','AODSS','AODVIS',
diff --git a/components/eam/cime_config/testdefs/testmods_dirs/eam/wcprod_F20TR/user_nl_eam b/components/eam/cime_config/testdefs/testmods_dirs/eam/wcprod_F20TR/user_nl_eam
index 9cabe55f775e..095c6946f5de 100644
--- a/components/eam/cime_config/testdefs/testmods_dirs/eam/wcprod_F20TR/user_nl_eam
+++ b/components/eam/cime_config/testdefs/testmods_dirs/eam/wcprod_F20TR/user_nl_eam
@@ -3,7 +3,7 @@ cosp_lite = .true.
empty_htapes = .true.
avgflag_pertape = 'A','A','A','A','I','I'
-nhtfrq = -24,-24,-6,-3,-1,0
+nhtfrq = -24,-24,-6,-3,-1,-24
mfilt = 1,30,120,240,720,1
fincl1 = 'AODALL','AODBC','AODDUST','AODPOM','AODSO4','AODSOA','AODSS','AODVIS',
diff --git a/components/elm/cime_config/config_pes.xml b/components/elm/cime_config/config_pes.xml
index 86acd12be937..acf6c6911b92 100644
--- a/components/elm/cime_config/config_pes.xml
+++ b/components/elm/cime_config/config_pes.xml
@@ -218,9 +218,9 @@
-
+
- elm: ascent|summit PEs for grid l%1.9x2.5|l%0.9x1.25|l%360x720cru
+ elm: ascent|summit|improv PEs for grid l%1.9x2.5|l%0.9x1.25|l%360x720cru
-2
-2
@@ -509,9 +509,9 @@
-
+
- elm: ascent|summit PEs for grid l%r05_*r%r05
+ elm: ascent|summit|improv PEs for grid l%r05_*r%r05
-2
-2
@@ -523,4 +523,33 @@
+
+
+
+ elm on chrysalis: any compset on ne4 grid, 3x32x2 NODESxMPIxOMP
+ 32
+ 64
+
+ 96
+ 96
+ 96
+ 96
+ 96
+ 96
+ 96
+ 96
+
+
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
diff --git a/components/elm/src/external_models/sbetr b/components/elm/src/external_models/sbetr
index 1fd5a14f903e..66260f4991d6 160000
--- a/components/elm/src/external_models/sbetr
+++ b/components/elm/src/external_models/sbetr
@@ -1 +1 @@
-Subproject commit 1fd5a14f903e789e7b86030ff564ff9ea5e0b058
+Subproject commit 66260f4991d61439d4cba92eb633590b09f97920
diff --git a/components/homme/src/share/cxx/HybridVCoord.cpp b/components/homme/src/share/cxx/HybridVCoord.cpp
index 569eef1d6849..199b6bc4f739 100644
--- a/components/homme/src/share/cxx/HybridVCoord.cpp
+++ b/components/homme/src/share/cxx/HybridVCoord.cpp
@@ -158,8 +158,8 @@ void HybridVCoord::random_init(int seed) {
Errors::runtime_check(curr>prev,"Error! hybrid_a+hybrid_b is not increasing.\n", -1);
- host_hybrid_am_real(i-1) = (host_hybrid_ai(i) + host_hybrid_ai(i))/2.0;
- host_hybrid_bm_real(i-1) = (host_hybrid_bi(i) + host_hybrid_bi(i))/2.0;
+ host_hybrid_am_real(i-1) = (host_hybrid_ai(i) + host_hybrid_ai(i-1))/2.0;
+ host_hybrid_bm_real(i-1) = (host_hybrid_bi(i) + host_hybrid_bi(i-1))/2.0;
}
Kokkos::deep_copy(hybrid_ai, host_hybrid_ai);
diff --git a/components/homme/src/share/prim_driver_base.F90 b/components/homme/src/share/prim_driver_base.F90
index 27df23dba4d4..df83e1cc386b 100644
--- a/components/homme/src/share/prim_driver_base.F90
+++ b/components/homme/src/share/prim_driver_base.F90
@@ -1613,16 +1613,17 @@ subroutine applyCAMforcing_tracers(elem,hvcoord,np1,np1_qdp,dt,adjustment)
#ifdef MODEL_THETA_L
if (dt_remap_factor==0) then
- adjust_ps=.true. ! stay on reference levels for Eulerian case
+ adjust_ps=.true. ! stay on reference levels for Eulerian case
else
-#ifdef SCREAM
- adjust_ps=.false. ! Lagrangian case can support adjusting dp3d or ps
-#else
- adjust_ps=.true. ! Lagrangian case can support adjusting dp3d or ps
-#endif
+ adjust_ps=.false. ! Lagrangian case can support adjusting dp3d or ps
endif
#else
- adjust_ps=.true. ! preqx requires forcing to stay on reference levels
+ adjust_ps=.true. ! preqx requires forcing to stay on reference levels
+#endif
+
+#if defined(CAM) && !defined(SCREAM)
+ adjust_ps=.true. ! Special case when CAM is defined, and SCREAM is not defined,
+ ! require forcing to stay on reference levels no matter dt_remap_factor
#endif
dp=elem%state%dp3d(:,:,:,np1)
diff --git a/components/homme/src/theta-l_kokkos/cxx/ElementsState.cpp b/components/homme/src/theta-l_kokkos/cxx/ElementsState.cpp
index f4ea57b71ca5..e7fe7f569c7d 100644
--- a/components/homme/src/theta-l_kokkos/cxx/ElementsState.cpp
+++ b/components/homme/src/theta-l_kokkos/cxx/ElementsState.cpp
@@ -238,6 +238,80 @@ void ElementsState::randomize(const int seed,
Kokkos::fence();
}
+
+void ElementsState::randomize(const int seed,
+ const HybridVCoord& hvcoord) {
+ // Check elements were inited
+ assert (m_num_elems>0);
+
+ // Check data makes sense
+ assert (hvcoord.ps0>0);
+ assert (hvcoord.hybrid_ai0>=0);
+
+ // Arbitrary minimum value to generate
+ constexpr const Real min_value = 0.015625;
+
+ std::mt19937_64 engine(seed);
+ std::uniform_real_distribution random_dist(min_value, 1.0 / min_value);
+ std::uniform_real_distribution pdf_vtheta_dp(100.0, 1000.0);
+
+ genRandArray(m_v, engine, random_dist);
+ genRandArray(m_w_i, engine, random_dist);
+ genRandArray(m_vtheta_dp, engine, pdf_vtheta_dp);
+ // Note: to avoid errors in the equation of state, we need phi to be increasing.
+ // Rather than using a constraint (which may call the function many times,
+ // we simply ask that there are no duplicates, then we sort it later.
+ auto sort_and_chek = [](const ExecViewManaged::HostMirror v)->bool {
+ Real* start = reinterpret_cast(v.data());
+ Real* end = reinterpret_cast(v.data()) + NUM_LEV_P*VECTOR_SIZE;
+ std::sort(start,end);
+ std::reverse(start,end);
+ auto it = std::unique(start,end);
+ return it==end;
+ };
+ for (int ie=0; ie pressure_pdf(800, 1200);
+ genRandArray(m_ps_v, engine, pressure_pdf);
+
+ auto dp = m_dp3d;
+ auto ps = m_ps_v;
+ auto ps0 = hvcoord.ps0;
+ auto hyai = hvcoord.hybrid_ai_packed;
+ auto hybi = hvcoord.hybrid_bi_packed;
+ auto hyai_delta = hvcoord.hybrid_ai_delta;
+ auto hybi_delta = hvcoord.hybrid_bi_delta;
+ const auto tu = m_tu;
+ Kokkos::parallel_for(m_policy, KOKKOS_LAMBDA(const TeamMember& team) {
+ KernelVariables kv(team, tu);
+ const int ie = kv.ie / NUM_TIME_LEVELS;
+ const int tl = kv.ie % NUM_TIME_LEVELS;
+
+ Kokkos::parallel_for(Kokkos::TeamThreadRange(kv.team,NP*NP),
+ [&](const int idx) {
+ const int igp = idx / NP;
+ const int jgp = idx % NP;
+ ColumnOps::compute_midpoint_delta(kv,hyai,hyai_delta);
+ ColumnOps::compute_midpoint_delta(kv,hybi,hybi_delta);
+ team.team_barrier();
+ Kokkos::parallel_for(Kokkos::ThreadVectorRange(kv.team,NUM_LEV),
+ [&](const int ilev) {
+ dp(ie,tl,igp,jgp,ilev) = ps0*hyai_delta(ilev)
+ + ps(ie,tl,igp,jgp)*hybi_delta(ilev);
+ });
+ });
+ });
+ Kokkos::fence();
+}
+
void ElementsState::pull_from_f90_pointers (CF90Ptr& state_v, CF90Ptr& state_w_i,
CF90Ptr& state_vtheta_dp, CF90Ptr& state_phinh_i,
CF90Ptr& state_dp3d, CF90Ptr& state_ps_v) {
diff --git a/components/homme/src/theta-l_kokkos/cxx/ElementsState.hpp b/components/homme/src/theta-l_kokkos/cxx/ElementsState.hpp
index 4fa353141402..aec7701661fa 100644
--- a/components/homme/src/theta-l_kokkos/cxx/ElementsState.hpp
+++ b/components/homme/src/theta-l_kokkos/cxx/ElementsState.hpp
@@ -63,10 +63,10 @@ class ElementsState {
void randomize(const int seed);
void randomize(const int seed, const Real max_pressure);
void randomize(const int seed, const Real max_pressure, const Real ps0, const Real hyai0);
-
void randomize(const int seed, const Real max_pressure, const Real ps0, const Real hyai0,
const ExecViewUnmanaged& phis);
-
+ void randomize(const int seed, const HybridVCoord& hvcoord);
+
KOKKOS_INLINE_FUNCTION
int num_elems() const { return m_num_elems; }
diff --git a/components/homme/src/theta-l_kokkos/cxx/ForcingFunctor.hpp b/components/homme/src/theta-l_kokkos/cxx/ForcingFunctor.hpp
index 80993d1d0f1d..28a702c1d273 100644
--- a/components/homme/src/theta-l_kokkos/cxx/ForcingFunctor.hpp
+++ b/components/homme/src/theta-l_kokkos/cxx/ForcingFunctor.hpp
@@ -99,8 +99,7 @@ class ForcingFunctor
m_hydrostatic = p.theta_hydrostatic_mode;
m_qsize = p.qsize;
- // TODO: this may change, depending on the simulation params
- m_adjust_ps = true;
+ m_adjust_ps = (p.dt_remap_factor == 0);
m_eos.init(m_hydrostatic,m_hvcoord);
m_elem_ops.init(m_hvcoord);
@@ -153,7 +152,7 @@ class ForcingFunctor
constexpr int int_size = NP*NP*NUM_LEV_P*VECTOR_SIZE;
// 3 persistent midlayers, 2 non-persistent midlayer, and 1 non-persistent interface
- return mid_size*(nelems*4+nslots) + (m_hydrostatic ? int_size*nslots : 0);
+ return mid_size*(nelems*4+nslots) + int_size*nslots;
}
void init_buffers (const FunctorsBuffersManager& fbm) {
@@ -370,7 +369,7 @@ class ForcingFunctor
});
if (!m_adjust_ps) {
Kokkos::parallel_for(Kokkos::ThreadVectorRange(kv.team,NUM_LEV),
- [&](const int ilev) {
+ [&](const int ilev) {
dp_adj(ilev) = dp(ilev) + dp(ilev)*(fq(ilev)-q(ilev));
});
}
@@ -386,7 +385,7 @@ class ForcingFunctor
});
if (!m_adjust_ps) {
Kokkos::parallel_for(Kokkos::ThreadVectorRange(kv.team,NUM_LEV),
- [&](const int& ilev) {
+ [&](const int& ilev) {
dp_adj(ilev) = dp(ilev) + compute_fqdt_pack(ilev,fq,qdp);
});
}
@@ -472,14 +471,14 @@ class ForcingFunctor
} else {
// Compute hydrostatic p from dp. Store in exner, then add to pnh
auto p_i = Homme::subview(m_pi_i,kv.team_idx,igp,jgp);
- m_elem_ops.compute_hydrostatic_p(kv,dp,p_i,exner);
+ m_elem_ops.compute_hydrostatic_p(kv,dp_adj,p_i,exner);
Kokkos::parallel_for(Kokkos::ThreadVectorRange(kv.team,NUM_LEV),
- [&](const int ilev) {
+ [&](const int ilev) {
pnh(ilev) += exner(ilev);
dp(ilev) = dp_adj(ilev);
});
}
-
+
Kokkos::parallel_for(Kokkos::ThreadVectorRange(kv.team,NUM_LEV),
[&](const int ilev) {
using namespace PhysicalConstants;
diff --git a/components/homme/src/theta-l_kokkos/cxx/LimiterFunctor.hpp b/components/homme/src/theta-l_kokkos/cxx/LimiterFunctor.hpp
index bf93be710e94..cd3bf7c32526 100644
--- a/components/homme/src/theta-l_kokkos/cxx/LimiterFunctor.hpp
+++ b/components/homme/src/theta-l_kokkos/cxx/LimiterFunctor.hpp
@@ -67,10 +67,10 @@ struct LimiterFunctor {
, m_hvcoord(hvcoord)
, m_state(elements.m_state)
, m_geometry(elements.m_geometry)
- , m_policy_dp3d_lim (Homme::get_default_team_policy(m_num_elems))
- , m_tu(m_policy_dp3d_lim)
, m_dp3d_thresh(params.dp3d_thresh)
, m_vtheta_thresh(params.vtheta_thresh)
+ , m_policy_dp3d_lim (Homme::get_default_team_policy(m_num_elems))
+ , m_tu(m_policy_dp3d_lim)
{
m_np1 = -1;
}
diff --git a/components/homme/test_execs/thetal_kokkos_ut/forcing_ut.cpp b/components/homme/test_execs/thetal_kokkos_ut/forcing_ut.cpp
index 7bfeeab0d748..5e4c51c7ca11 100644
--- a/components/homme/test_execs/thetal_kokkos_ut/forcing_ut.cpp
+++ b/components/homme/test_execs/thetal_kokkos_ut/forcing_ut.cpp
@@ -60,7 +60,8 @@ TEST_CASE("forcing", "forcing") {
// Init everything through singleton, which is what happens in normal runs
auto& c = Context::singleton();
auto& p = c.create();
-
+ p.dt_remap_factor = 1;
+
auto& hv = c.create();
hv.random_init(seed);
@@ -165,7 +166,7 @@ TEST_CASE("forcing", "forcing") {
std::cout << " -> adjustment: " << (adjustment ? "true" : "false") << "\n";
// Reset state, tracers, and forcing to the original random values
- state.randomize(seed, 10*hv.ps0, hv.ps0, hv.hybrid_ai0);
+ state.randomize(seed, hv);
tracers.randomize(seed,-1e-3,1e-3);
forcing.randomize(seed);
@@ -289,7 +290,7 @@ TEST_CASE("forcing", "forcing") {
// Reset state and forcing to the original random values
std::cout << "Testing dynamics forcing.\n";
- state.randomize(seed, 10*hv.ps0, hv.ps0, hv.hybrid_ai0);
+ state.randomize(seed, hv);
forcing.randomize(seed);
// Sync views
diff --git a/components/mpas-ocean/bld/build-namelist b/components/mpas-ocean/bld/build-namelist
index 0b8d3c782fa7..955328186fb7 100755
--- a/components/mpas-ocean/bld/build-namelist
+++ b/components/mpas-ocean/bld/build-namelist
@@ -67,6 +67,8 @@ OPTIONS
-ice_bgc check for coupling with sea ice BGC
-ntasks_ocn NTASKS_OCN for this case
-ninst_ocn NINST_OCN for this case
+ -ocn_tidal_mixing variable for defining if to run with parameterized tidal mixing
+ Options are: false, true. Default is false
NOTE: The precedence for setting the values of namelist variables is (highest to lowest):
1. namelist values set by specific command-line options, i.e. (none right now)
@@ -119,6 +121,7 @@ my %opts = ( help => 0,
cfg_dir => $cfgdir,
ntasks_ocn => 0,
ninst_ocn => 0,
+ ocn_tidal_mixing => undef,
);
GetOptions(
@@ -145,6 +148,7 @@ GetOptions(
"ntasks_ocn=i" => \$opts{'ntasks_ocn'},
"ninst_ocn=i" => \$opts{'ninst_ocn'},
"preview" => \$opts{'preview'},
+ "ocn_tidal_mixing=s" => \$opts{'ocn_tidal_mixing'},
) or usage();
# Give usage message.
@@ -185,6 +189,7 @@ my $atm_co2_const_val = $opts{'atm_co2_const_val'};
my $ice_bgc = $opts{'ice_bgc'};
my $NINST_OCN = $opts{'ninst_ocn'};
my $NTASKS_OCN = $opts{'ntasks_ocn'};
+my $OCN_TIDAL_MIXING = $opts{'ocn_tidal_mixing'};
$cfgdir = $opts{'cfg_dir'};
my $CIMEROOT;
@@ -205,6 +210,7 @@ print $fh <<"EOF";
+
@@ -450,6 +456,7 @@ my $ntasks = $NTASKS_OCN / $NINST_OCN;
print "MPASO build-namelist: ocn_grid is $OCN_GRID \n";
print "MPASO build-namelist: ocn_forcing is $OCN_FORCING \n";
+print "MPASO build-namelist: ocn_tidal_mixing is $OCN_TIDAL_MIXING \n";
(-d $DIN_LOC_ROOT) or mkdir $DIN_LOC_ROOT;
if ($print>=2) { print "CIME inputdata root directory: $DIN_LOC_ROOT$eol"; }
@@ -557,9 +564,9 @@ add_default($nl, 'config_Redi_constant_kappa');
add_default($nl, 'config_Redi_maximum_slope');
add_default($nl, 'config_Redi_use_slope_taper');
add_default($nl, 'config_Redi_use_surface_taper');
+add_default($nl, 'config_Redi_limit_term1');
add_default($nl, 'config_Redi_use_quasi_monotone_limiter');
add_default($nl, 'config_Redi_quasi_monotone_safety_factor');
-add_default($nl, 'config_Redi_limit_term1');
add_default($nl, 'config_Redi_min_layers_diag_terms');
add_default($nl, 'config_Redi_horizontal_taper');
add_default($nl, 'config_Redi_horizontal_ramp_min');
@@ -776,6 +783,15 @@ if ($OCN_ISMF eq 'coupled') {
} else {
add_default($nl, 'config_land_ice_flux_mode');
}
+if ($OCN_TIDAL_MIXING eq 'true') {
+ add_default($nl, 'config_land_ice_flux_tidal_Jourdain_alpha', 'val'=>"0.777");
+ add_default($nl, 'config_land_ice_flux_tidal_Jourdain_A0', 'val'=>"0.656");
+ add_default($nl, 'config_land_ice_flux_tidal_Jourdain_U0', 'val'=>"0.003");
+} else {
+ add_default($nl, 'config_land_ice_flux_tidal_Jourdain_alpha');
+ add_default($nl, 'config_land_ice_flux_tidal_Jourdain_A0');
+ add_default($nl, 'config_land_ice_flux_tidal_Jourdain_U0');
+}
add_default($nl, 'config_land_ice_flux_formulation');
add_default($nl, 'config_land_ice_flux_useHollandJenkinsAdvDiff');
add_default($nl, 'config_land_ice_flux_attenuation_coefficient');
@@ -785,7 +801,6 @@ add_default($nl, 'config_land_ice_flux_cp_ice');
add_default($nl, 'config_land_ice_flux_rho_ice');
add_default($nl, 'config_land_ice_flux_explicit_topDragCoeff');
add_default($nl, 'config_land_ice_flux_ISOMIP_gammaT');
-add_default($nl, 'config_land_ice_flux_rms_tidal_velocity');
add_default($nl, 'config_land_ice_flux_jenkins_heat_transfer_coefficient');
add_default($nl, 'config_land_ice_flux_jenkins_salt_transfer_coefficient');
diff --git a/components/mpas-ocean/bld/build-namelist-section b/components/mpas-ocean/bld/build-namelist-section
index 28030392442d..b34d6dcb5438 100644
--- a/components/mpas-ocean/bld/build-namelist-section
+++ b/components/mpas-ocean/bld/build-namelist-section
@@ -96,9 +96,9 @@ add_default($nl, 'config_Redi_constant_kappa');
add_default($nl, 'config_Redi_maximum_slope');
add_default($nl, 'config_Redi_use_slope_taper');
add_default($nl, 'config_Redi_use_surface_taper');
+add_default($nl, 'config_Redi_limit_term1');
add_default($nl, 'config_Redi_use_quasi_monotone_limiter');
add_default($nl, 'config_Redi_quasi_monotone_safety_factor');
-add_default($nl, 'config_Redi_limit_term1');
add_default($nl, 'config_Redi_min_layers_diag_terms');
add_default($nl, 'config_Redi_horizontal_taper');
add_default($nl, 'config_Redi_horizontal_ramp_min');
@@ -302,9 +302,11 @@ add_default($nl, 'config_land_ice_flux_cp_ice');
add_default($nl, 'config_land_ice_flux_rho_ice');
add_default($nl, 'config_land_ice_flux_explicit_topDragCoeff');
add_default($nl, 'config_land_ice_flux_ISOMIP_gammaT');
-add_default($nl, 'config_land_ice_flux_rms_tidal_velocity');
add_default($nl, 'config_land_ice_flux_jenkins_heat_transfer_coefficient');
add_default($nl, 'config_land_ice_flux_jenkins_salt_transfer_coefficient');
+add_default($nl, 'config_land_ice_flux_tidal_Jourdain_alpha');
+add_default($nl, 'config_land_ice_flux_tidal_Jourdain_A0');
+add_default($nl, 'config_land_ice_flux_tidal_Jourdain_U0');
#############################
# Namelist group: advection #
diff --git a/components/mpas-ocean/bld/namelist_files/namelist_defaults_mpaso.xml b/components/mpas-ocean/bld/namelist_files/namelist_defaults_mpaso.xml
index 4069eb144cff..5092ed24d9bc 100644
--- a/components/mpas-ocean/bld/namelist_files/namelist_defaults_mpaso.xml
+++ b/components/mpas-ocean/bld/namelist_files/namelist_defaults_mpaso.xml
@@ -146,15 +146,14 @@
0.01
.true.
.true.
+.true.
.true.
0.9
-.true.
0
15
'ramp'
'RossbyRadius'
'RossbyRadius'
-
'ramp'
20e3
30e3
@@ -180,7 +179,6 @@
'constant'
'N2_dependent'
'N2_dependent'
-
'constant'
900.0
600.0
@@ -198,7 +196,6 @@
3.0
1.0
1.0
-
3.0
0.13
1000.0
@@ -209,7 +206,6 @@
'ramp'
'RossbyRadius'
'RossbyRadius'
-
'ramp'
20e3
30e3
@@ -361,7 +357,6 @@
4.48e-3
4.48e-3
1e-4
-5e-2
0.011
0.00295
0.00295
@@ -374,6 +369,9 @@
8.42e-5
8.42e-5
8.42e-5
+1.0
+0.0
+5e-2
'flux-form'
diff --git a/components/mpas-ocean/bld/namelist_files/namelist_definition_mpaso.xml b/components/mpas-ocean/bld/namelist_files/namelist_definition_mpaso.xml
index 01456cd6583a..c990bbf8452b 100644
--- a/components/mpas-ocean/bld/namelist_files/namelist_definition_mpaso.xml
+++ b/components/mpas-ocean/bld/namelist_files/namelist_definition_mpaso.xml
@@ -202,9 +202,9 @@ Default: Defined in namelist_defaults.xml
-Time integration method.
+Time integration method. These options are only supported in standalone, not E3SM: 'LTS', 'FB_LTS'.
-Valid values: 'split_explicit', 'RK4', 'unsplit_explicit', 'split_implicit', 'LTS', 'split_explicit_ab2'
+Valid values: 'split_explicit', 'RK4', 'unsplit_explicit', 'split_implicit', 'split_explicit_ab2', 'LTS', 'FB_LTS'
Default: Defined in namelist_defaults.xml
@@ -1590,25 +1590,41 @@ Valid values: Any positive real number
Default: Defined in namelist_defaults.xml
-
-Parameterization of tidal velocity used in computing the sub-ice-shelf friction velocity
+constant nondimensional heat transfer coefficient across the ice-ocean boundary layer
-Valid values: Any non-negative real number
+Valid values: Any positive real number
Default: Defined in namelist_defaults.xml
-
-constant nondimensional heat transfer coefficient across the ice-ocean boundary layer
+constant nondimensional salt transfer coefficient across the ice-ocean boundary layer
Valid values: Any positive real number
Default: Defined in namelist_defaults.xml
-
-constant nondimensional salt transfer coefficient across the ice-ocean boundary layer
+Constant in parameterization of tidal velocity used in computing the sub-ice-shelf friction velocity
+
+Valid values: Any positive real number
+Default: Defined in namelist_defaults.xml
+
+
+
+Constant in parameterization of tidal velocity used in computing the sub-ice-shelf friction velocity
+
+Valid values: Any positive real number
+Default: Defined in namelist_defaults.xml
+
+
+
+Constant in parameterization of tidal velocity used in computing the sub-ice-shelf friction velocity
Valid values: Any positive real number
Default: Defined in namelist_defaults.xml
@@ -2038,7 +2054,7 @@ Default: Defined in namelist_defaults.xml
-number of large iterations over stages 1-3
+number of large iterations over stages 1-3; For the split_explicit_ab2 time integrator, this value only affects the first time step when it is not a restart run. For restart runs, this value has no effect on the split_explicit_ab2 time integrator.
Valid values: any positive integer, but typically 1, 2, or 3
Default: Defined in namelist_defaults.xml
diff --git a/components/mpas-ocean/cime_config/buildnml b/components/mpas-ocean/cime_config/buildnml
index 4dd4c228d484..76a6722714f5 100755
--- a/components/mpas-ocean/cime_config/buildnml
+++ b/components/mpas-ocean/cime_config/buildnml
@@ -37,6 +37,7 @@ def buildnml(case, caseroot, compname):
ocn_ismf = case.get_value("MPASO_ISMF")
ocn_bgc = case.get_value("MPASO_BGC")
ocn_wave = case.get_value("MPASO_WAVE")
+ ocn_tidal_mixing = case.get_value("MPASO_TIDAL_MIXING")
ocn_co2_type = case.get_value("OCN_CO2_TYPE")
atm_co2_const_val = case.get_value("CCSM_CO2_PPMV")
ice_bgc = case.get_value("MPASI_BGC")
@@ -74,6 +75,7 @@ def buildnml(case, caseroot, compname):
data_ismf_file = ''
analysis_mask_file = ''
eco_forcing_file = ''
+ u_tidal_rms_file = ''
if ocn_grid == 'oEC60to30v3':
decomp_date = '230424'
@@ -134,6 +136,8 @@ def buildnml(case, caseroot, compname):
if ocn_ic_mode == 'spunup':
logger.warning("WARNING: The specified compset is requesting ocean ICs spunup from a G-case")
logger.warning(" But no file available for this grid.")
+ if ocn_tidal_mixing == 'true':
+ u_tidal_rms_file = 'velocityTidalRMS_CATS2008.oQU240wLI.20240221.nc'
elif ocn_grid == 'oQU120':
decomp_date = '230424'
@@ -269,6 +273,8 @@ def buildnml(case, caseroot, compname):
ic_prefix = 'mpaso.SOwISC12to60E2r4.rstFromG-anvil'
if ocn_ismf == 'data':
data_ismf_file = 'prescribed_ismf_adusumilli2020.SOwISC12to60E2r4.230516.nc'
+ if ocn_tidal_mixing == 'true':
+ u_tidal_rms_file = 'velocityTidalRMS_CATS2008.SOwISC12to60E2r4.20210114.nc'
elif ocn_grid == 'ECwISC30to60E2r1':
decomp_date = '200915'
@@ -282,6 +288,8 @@ def buildnml(case, caseroot, compname):
ic_prefix = 'mpaso.ECwISC30to60E2r1.rstFromG-anvil'
if ocn_ismf == 'data':
data_ismf_file = 'prescribed_ismf_adusumilli2020.ECwISC30to60E2r1.230429.nc'
+ if ocn_tidal_mixing == 'true':
+ u_tidal_rms_file = 'velocityTidalRMS_CATS2008.ECwISC30to60E2r1.20240221.nc'
elif ocn_grid == 'IcoswISC30E3r5':
decomp_date = '20231120'
@@ -298,7 +306,9 @@ def buildnml(case, caseroot, compname):
ic_prefix = 'mpaso.IcoswISC30E3r5.20231120+MARBL_ICfromOMIP_64levels'
eco_forcing_file = 'ecoForcingSurfaceMonthly.IcoswISC30E3r5.20231215.nc'
if ocn_ismf == 'data':
- data_ismf_file = 'prescribed_ismf_adusumilli2020.IcoswISC30E3r5.20231120.nc'
+ data_ismf_file = 'prescribed_ismf_paolo2023.IcoswISC30E3r5.20240227.nc'
+ if ocn_tidal_mixing == 'true':
+ u_tidal_rms_file = 'velocityTidalRMS_CATS2008.IcoswISC30E3r5.20231120.nc'
#--------------------------------------------------------------------
# Set OCN_FORCING = datm_forced_restoring if restoring file is available
@@ -336,6 +346,9 @@ def buildnml(case, caseroot, compname):
if data_ismf_file != '':
input_list.write("data_ismf = {}/ocn/mpas-o/{}/{}\n".format(din_loc_root, ocn_mask, data_ismf_file))
+ if u_tidal_rms_file != '':
+ input_list.write("u_tidal_rms = {}/ocn/mpas-o/{}/{}\n".format(din_loc_root, ocn_mask, u_tidal_rms_file))
+
#--------------------------------------------------------------------
# Invoke mpas build-namelist - output will go in $CASEBUILD/mpasoconf
#--------------------------------------------------------------------
@@ -397,6 +410,7 @@ def buildnml(case, caseroot, compname):
sysmod += " -ocn_ismf '{}'".format(ocn_ismf)
sysmod += " -ocn_bgc '{}'".format(ocn_bgc)
sysmod += " -ocn_wave '{}'".format(ocn_wave)
+ sysmod += " -ocn_tidal_mixing '{}'".format(ocn_tidal_mixing)
sysmod += " -ocn_co2_type '{}'".format(ocn_co2_type)
sysmod += " -atm_co2_const_val '{}'".format(atm_co2_const_val)
sysmod += " -ice_bgc '{}'".format(ice_bgc)
@@ -583,6 +597,18 @@ def buildnml(case, caseroot, compname):
lines.append('')
lines.append('')
+ if u_tidal_rms_file != '':
+ lines.append('')
+ lines.append('')
+ lines.append(' ')
+ lines.append('')
+ lines.append('')
+
if analysis_mask_file != '':
lines.append('')
lines.append(' ')
lines.append(' ')
+ lines.append(' ')
lines.append(' ')
lines.append(' ')
lines.append(' ')
@@ -1269,6 +1296,7 @@ def buildnml(case, caseroot, compname):
lines.append(' ')
lines.append(' ')
lines.append(' ')
+ lines.append(' ')
if ocn_iceberg == 'true':
lines.append(' ')
lines.append(' ')
diff --git a/components/mpas-ocean/cime_config/config_component.xml b/components/mpas-ocean/cime_config/config_component.xml
index c07170ae42b9..e95b63682d95 100644
--- a/components/mpas-ocean/cime_config/config_component.xml
+++ b/components/mpas-ocean/cime_config/config_component.xml
@@ -26,6 +26,19 @@
Option to describe the MPASO surface forcing
+
+ char
+ false,true
+ false
+
+ false
+ true
+
+ case_comp
+ env_case.xml
+ Option to describe the MPASO prescribed tidal mixing
+
+
char
false,true
diff --git a/components/mpas-ocean/cime_config/config_compsets.xml b/components/mpas-ocean/cime_config/config_compsets.xml
index b15f9111be44..689f208713b1 100644
--- a/components/mpas-ocean/cime_config/config_compsets.xml
+++ b/components/mpas-ocean/cime_config/config_compsets.xml
@@ -72,6 +72,11 @@
2000_DATM%JRA-1p5_SLND_MPASSI%DIB_MPASO%IBDISMFDATMFORCED_DROF%JRA-1p5-AIS0ROF_SGLC_SWAV
+
+ GMPAS-JRA1p5-DIB-PISMF-TMIX
+ 2000_DATM%JRA-1p5_SLND_MPASSI%DIB_MPASO%IBPISMFDATMFORCEDTMIX_DROF%JRA-1p5-AIS0ROF_SGLC_SWAV
+
+
GMPAS-JRA1p4
2000_DATM%JRA-1p4-2018_SLND_MPASSI_MPASO%DATMFORCED_DROF%JRA-1p4-2018_SGLC_SWAV
diff --git a/components/mpas-ocean/src/Registry.xml b/components/mpas-ocean/src/Registry.xml
index f8b56c083d44..1c4e2e68147d 100644
--- a/components/mpas-ocean/src/Registry.xml
+++ b/components/mpas-ocean/src/Registry.xml
@@ -201,8 +201,8 @@
possible_values="Any time stamp in 'YYYY-MM-DD_hh:mm:ss' format. Items can be removed from the left if they are unused."
/>
-
+
+
+
@@ -1196,6 +1204,20 @@
possible_values="Any positive integer greater than or equal to one. A value of one employs the same dt in all regions."
/>
+
+
+
+
+
+
@@ -3228,6 +3251,10 @@
description="The friction velocity $u_*$ under land ice"
packages="landIceFluxesPKG"
/>
+
\brief MPAS barotropic ocean LTS Time integration scheme
+!> \author Jeremy Lilly
+!> \date October 2023
+!> \details
+!> This module contains the FB_LTS init routine and the FB_LTS
+!> barotropic ocean time integration scheme with splitting
+!> on the fast and slow tendency terms.
+!
+!-----------------------------------------------------------------------
+
+module ocn_time_integration_fblts
+
+ use mpas_pool_routines
+ use mpas_dmpar
+ use mpas_threading
+ use mpas_vector_reconstruction
+ use mpas_timer
+
+ use ocn_tendency
+ use ocn_diagnostics
+ use ocn_mesh
+ use ocn_vmix
+ use ocn_config
+ use ocn_time_average_coupled
+
+ implicit none
+ private
+ save
+
+ !--------------------------------------------------------------------
+ !
+ ! Public member functions
+ !
+ !--------------------------------------------------------------------
+ public :: ocn_time_integrator_fblts, &
+ ocn_time_integration_fblts_init
+
+ contains
+
+
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! ocn_time_integrator_fblts
+!
+!> \brief MPAS barotropic ocean FB_LTS time integration scheme
+!> \author Jeremy Lilly
+!> \date October 2023
+!> \details
+!> This routine integrates one timestep (dt) using an FB_LTS time
+!> integrator with a splitting of the fast and slow tendency terms
+!
+!-----------------------------------------------------------------------
+
+ subroutine ocn_time_integrator_fblts(domain, dt)!{{{
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! Advance model state forward in time by the specified time step
+ ! using a local time stepping scheme with splitting of the fast and
+ ! slow tendencies
+ !
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+ implicit none
+
+ !-----------------------------------------------------------------
+ ! Input variables
+ !-----------------------------------------------------------------
+
+ real (kind=RKIND), intent(in) :: &
+ dt !< [in] time step (sec) to move forward
+
+ !-----------------------------------------------------------------
+ ! Input/output variables
+ !-----------------------------------------------------------------
+
+ type (domain_type), intent(inout) :: &
+ domain !< [inout] model state to advance forward
+
+ !-----------------------------------------------------------------
+ ! Local variables
+ !-----------------------------------------------------------------
+
+ integer :: &
+ iCell, iEdge, iRegion, k, ic, ie, im, & ! iterators
+ M, & ! M = dtCoarse / dtFine
+ nRegions ! number of interface regions (two)
+
+ type (block_type), pointer :: &
+ block ! structure with subdomain data
+
+ type (mpas_pool_type), pointer :: &
+ tendPool, & ! structure holding tendencies
+ statePool, & ! structure holding state variables
+ meshPool, & ! structure holding mesh variables
+ verticalMeshPool, & ! structure holding mesh variables
+ forcingPool, & ! structure holding forcing variables
+ scratchPool, & ! structure holding temporary variables
+ tracersPool ! structure holding tracers variables
+
+ ! LTS Pools
+ type (mpas_pool_type), pointer :: &
+ LTSPool, & ! structure holding LTS variables
+ tendSlowPool, & ! structure holding the slow tendency variables
+ tendSum3rdPool, & ! structure holding one of the correction terms for the interface
+ prevTendSlowPool, nextTendSlowPool, & ! structures containing intermediate data
+ prevTendSum3rdPool, nextTendSum3rdPool ! structures containing intermediate data
+
+ ! Tend Array Pointers
+ real (kind=RKIND), dimension(:,:), pointer :: &
+ normalVelocityTend, & ! normal velocity fast tendency
+ layerThicknessTend, & ! layer thickness tendency
+ normalVelocityTendSlow, & ! normal velocity slow tendency
+ normalVelocityTendSum3rd, & ! one of the normal velocity correction terms for the interface
+ layerThicknessTendSum3rd ! one of the layer thickness correction terms for the interface
+
+ ! State Array Pointers
+ real (kind=RKIND), dimension(:,:), pointer :: &
+ normalVelocityCur, & ! normal velocity at time n
+ normalVelocityNew, & ! normal velocity at time n+1
+ normalVelocityFirstStage, & ! normal velocity at first stage of LTS
+ normalVelocitySecondStage, & ! normal velocity at second stage of LTS
+ normalVelocityForTend, & ! extra variable to store averages of data for tends calculations
+ layerThicknessCur, & ! layer thickness at time n
+ layerThicknessNew, & ! layer thickness at time n+1
+ layerThicknessFirstStage, & ! layer thickness at first stage of LTS
+ layerThicknessSecondStage, & ! layer thickness at second stage of LTS
+ layerThicknessForTend ! extra variable to store averages of data for tends calculations
+
+ ! Local pointer for ssh
+ real (kind=RKIND), dimension(:), pointer :: &
+ ssh
+
+ ! LTS objects
+ real (kind=RKIND) :: &
+ dtFine ! fine dt, defined as dt / M
+ integer, dimension(:,:), pointer :: &
+ nCellsInLTSRegion, & ! number of cells in a given LTS region
+ nEdgesInLTSRegion ! number of edges in a given LTS region
+ integer, dimension(:,:,:), pointer :: &
+ cellsInLTSRegion, & ! list of cells in a given LTS region
+ edgesInLTSRegion ! list of edges in a given LTS region
+ real (kind=RKIND) :: &
+ weight1st, weight2nd ! coefficients for each RK stage
+ real (kind=RKIND) :: &
+ weightTendSum3rd ! coefficients for the interface correction
+
+ integer err
+ err = 0
+
+ !-----------------------------------------------------------------
+ ! Begin routine
+ !-----------------------------------------------------------------
+
+ if (.not. config_disable_tr_all_tend) then
+ call mpas_log_write("ERROR: tracers are not currently implemented for local time-stepping")
+ call mpas_log_write("config_disable_tr_all_tend should be true in the namelist file")
+ call abort
+ end if
+
+
+ call mpas_timer_start("FB_LTS time-step prep")
+
+ ! LTS parameters
+ M = config_dt_scaling_LTS
+ nRegions = 2
+ dtFine = dt / M
+
+ ! Weights for RK stages, weight for third stage is 1
+ weight1st = 1.0_RKIND / 3.0_RKIND
+ weight2nd = 1.0_RKIND / 2.0_RKIND
+
+ block => domain % blocklist
+
+ ! Retrieve model state, pools
+ call mpas_pool_get_subpool(block%structs, 'mesh', meshPool)
+ call mpas_pool_get_subpool(block%structs, 'verticalMesh', verticalMeshPool)
+ call mpas_pool_get_subpool(block%structs, 'state', statePool)
+ call mpas_pool_get_subpool(block%structs, 'forcing', forcingPool)
+ call mpas_pool_get_subpool(block%structs, 'LTS', LTSPool)
+ call mpas_pool_get_subpool(block%structs, 'tend', tendPool)
+ call mpas_pool_get_subpool(block%structs, 'scratch', scratchPool)
+ call mpas_pool_get_subpool(statePool, 'tracers', tracersPool)
+
+ ! Retrieve state variables at necessary time levels
+ call mpas_pool_get_array(statePool, 'normalVelocity', &
+ normalVelocityCur, 1)
+ call mpas_pool_get_array(statePool, 'normalVelocity', &
+ normalVelocityNew, 2)
+ call mpas_pool_get_array(statePool, 'normalVelocity', &
+ normalVelocityFirstStage, 3)
+ call mpas_pool_get_array(statePool, 'normalVelocity', &
+ normalVelocitySecondStage, 4)
+ call mpas_pool_get_array(statePool, 'normalVelocity', &
+ normalVelocityForTend, 5)
+ call mpas_pool_get_array(statePool, 'layerThickness', &
+ layerThicknessCur, 1)
+ call mpas_pool_get_array(statePool, 'layerThickness', &
+ layerThicknessNew, 2)
+ call mpas_pool_get_array(statePool, 'layerThickness', &
+ layerThicknessFirstStage, 3)
+ call mpas_pool_get_array(statePool, 'layerThickness', &
+ layerThicknessSecondStage, 4)
+ call mpas_pool_get_array(statePool, 'layerThickness', &
+ layerThicknessForTend, 5)
+
+ ! Retrieve tendency variables
+ call mpas_pool_get_array(tendPool, 'normalVelocity', normalVelocityTend)
+ call mpas_pool_get_array(tendPool, 'layerThickness', layerThicknessTend)
+
+ ! Retrieve LTS arrays
+ call mpas_pool_get_array(LTSPool, 'cellsInLTSRegion', cellsInLTSRegion)
+ call mpas_pool_get_array(LTSPool, 'nCellsInLTSRegion', nCellsInLTSRegion)
+ call mpas_pool_get_array(LTSPool, 'edgesInLTSRegion', edgesInLTSRegion)
+ call mpas_pool_get_array(LTSPool, 'nEdgesInLTSRegion', nEdgesInLTSRegion)
+
+ ! Create and retrieve additional pools for LTS
+ call mpas_pool_create_pool(tendSum3rdPool)
+ call mpas_pool_clone_pool(tendPool, tendSum3rdPool, 1)
+ call mpas_pool_create_pool(tendSlowPool)
+ call mpas_pool_clone_pool(tendPool, tendSlowPool, 1)
+
+ call mpas_pool_add_subpool(block % structs, 'tend_sum_3rd', tendSum3rdPool)
+ call mpas_pool_add_subpool(block % structs, 'tend_slow', tendSlowPool)
+
+ call mpas_pool_get_array(tendSlowPool, 'normalVelocity', &
+ normalVelocityTendSlow)
+ call mpas_pool_get_array(tendSum3rdPool, 'normalVelocity', &
+ normalVelocityTendSum3rd)
+ call mpas_pool_get_array(tendSum3rdPool, 'layerThickness', &
+ layerThicknessTendSum3rd)
+
+ ! Init variables
+ do iEdge = 1, nEdgesAll ! do we need this?
+ do k = 1, maxLevelEdgeTop(iEdge)
+ normalVelocityNew(k, iEdge) = normalVelocityCur(k, iEdge)
+ normalVelocityFirstStage(k, iEdge) = normalVelocityCur(k, iEdge)
+ normalVelocitySecondStage(k, iEdge) = normalVelocityCur(k, iEdge)
+ end do
+ end do
+
+ do iCell = 1, nCellsAll ! do we need this?
+ do k = 1, maxLevelCell(iCell)
+ layerThicknessNew(k, iCell) = layerThicknessCur(k, iCell)
+ layerThicknessFirstStage(k, iCell) = layerThicknessCur(k, iCell)
+ layerThicknessSecondStage(k, iCell) = layerThicknessCur(k, iCell)
+ end do
+ end do
+
+ normalVelocityTendSum3rd(:,:) = 0.0_RKIND
+ layerThicknessTendSum3rd(:,:) = 0.0_RKIND
+
+ if (associated(block % prev)) then
+ call mpas_pool_get_subpool(block % prev % structs, 'tend_sum_3rd', tendSum3rdPool)
+ call mpas_pool_get_subpool(block % prev % structs, 'tend_slow', tendSlowPool)
+ else
+ nullify(prevTendSum3rdPool)
+ nullify(prevTendSlowPool)
+ end if
+
+ if (associated(block % next)) then
+ call mpas_pool_get_subpool(block % next % structs, 'tend_sum_3rd', nextTendSum3rdPool)
+ call mpas_pool_get_subpool(block % next % structs, 'tend_slow', nextTendSlowPool)
+ else
+ nullify(nextTendSum3rdPool)
+ nullify(nextTendSlowPool)
+ end if
+
+ call mpas_pool_get_subpool(block % structs, 'tend_sum_3rd', tendSum3rdPool)
+ call mpas_pool_get_subpool(block % structs, 'tend_slow', tendSlowPool)
+
+ if (associated(prevTendSum3rdPool) .and. associated(nextTendSum3rdPool)) then
+ call mpas_pool_link_pools(tendSum3rdPool, prevTendSum3rdPool, nextTendSum3rdPool)
+ else if (associated(prevTendSum3rdPool)) then
+ call mpas_pool_link_pools(tendSum3rdPool, prevTendSum3rdPool)
+ else if (associated(nextTendSum3rdPool)) then
+ call mpas_pool_link_pools(tendSum3rdPool,nextPool=nextTendSum3rdPool)
+ else
+ call mpas_pool_link_pools(tendSum3rdPool)
+ end if
+
+ if (associated(prevTendSlowPool) .and. associated(nextTendSlowPool)) then
+ call mpas_pool_link_pools(tendSlowPool, prevTendSlowPool, nextTendSlowPool)
+ else if (associated(prevTendSlowPool)) then
+ call mpas_pool_link_pools(tendSlowPool, prevTendSlowPool)
+ else if (associated(nextTendSlowPool)) then
+ call mpas_pool_link_pools(tendSlowPool,nextPool=nextTendSlowPool)
+ else
+ call mpas_pool_link_pools(tendSlowPool)
+ end if
+
+ call mpas_pool_link_parinfo(block, tendSum3rdPool)
+ call mpas_pool_link_parinfo(block, tendSlowPool)
+
+ call mpas_timer_stop("FB_LTS time-step prep")
+
+
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !
+ ! BEGIN FB_LTS SCHEME
+ !
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+ call mpas_timer_start("FB_LTS main loop")
+
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! BEGIN: Slow tendency calculation
+ ! Calculate the slow tendencies on all LTS regions (only the
+ ! momentum equation contains slow terms)
+ call mpas_timer_start("FB_LTS compute slow tendencies")
+
+ call ocn_tend_vel(domain, tendSlowPool, statePool, forcingPool, 1, &
+ domain % dminfo, dt)
+
+ call mpas_timer_stop("FB_LTS compute slow tendencies")
+ ! END: Slow tendency calculation
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! BEGIN COARSE ADVANCEMENT
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! BEGIN: Thickness stage 1
+ ! Compute the first stage of the thickness on fine*, interface 1,
+ ! interface 2, and coarse
+
+ ! Compute fast tendencies for thickness
+ call mpas_timer_start("FB_LTS compute fast tendencies")
+ call mpas_timer_start("FB_LTS compute fast thickness tendencies")
+
+ call ocn_lts_thick_tend(LTSPool, tendPool, &
+ normalVelocityCur, layerThicknessCur, &
+ 0, 1, 1, 1, 1)
+
+ call mpas_timer_stop("FB_LTS compute fast thickness tendencies")
+ call mpas_timer_stop("FB_LTS compute fast tendencies")
+
+ ! Advance thickness solution with first stage
+ call mpas_timer_start("FB_LTS advance solution")
+ call mpas_timer_start("FB_LTS advance thickness solution")
+
+ ! Interface layers
+ do iRegion = 1,nRegions
+ do ic = 1, nCellsInLTSRegion(iRegion,2)
+ iCell = cellsInLTSRegion(iRegion,2,ic)
+ layerThicknessFirstStage(:,iCell) = layerThicknessCur(:,iCell) &
+ + weight1st * dt * layerThicknessTend(:,iCell)
+ end do
+ end do
+ ! Coarse
+ do ic = 1, nCellsInLTSRegion(2,1)
+ iCell = cellsInLTSRegion(2,1,ic)
+ layerThicknessFirstStage(:,iCell) = layerThicknessCur(:,iCell) &
+ + weight1st * dt * layerThicknessTend(:,iCell)
+ end do
+ ! Fine layers close to interface layers
+ do ic = 1, nCellsInLTSRegion(1,3)
+ iCell = cellsInLTSRegion(1,3,ic)
+ layerThicknessFirstStage(:,iCell) = layerThicknessCur(:,iCell) &
+ + weight1st * dt * layerThicknessTend(:,iCell)
+ end do
+
+ call mpas_timer_stop("FB_LTS advance thickness solution")
+ call mpas_timer_stop("FB_LTS advance solution")
+
+ ! END: Thickness stage 1
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! BEGIN: Normal velocity stage 1
+ ! Compute the first stage of the normal velocity on fine*,
+ ! interface 1, interface 2, and coarse
+
+ ! Perform forward-backward average of thickness for stage one of
+ ! FB-RK(3,2):
+ ! h = weight1*stage1 + (1-weight1)*current
+ layerThicknessForTend(:,:) = config_fb_weight_1 * layerThicknessFirstStage(:,:) &
+ + (1.0_RKIND - config_fb_weight_1) * layerThicknessCur(:,:)
+
+ ! Halo update before tend calculation
+ ! Might be able to remove this?
+ call mpas_timer_start("FB_LTS prognostic halo update")
+
+ ! Don't need to update normalVelocityCur, already updated
+
+ call mpas_timer_start("FB_LTS thickness halo update")
+ call mpas_dmpar_field_halo_exch(domain, 'layerThickness', timeLevel=5)
+ call mpas_timer_stop("FB_LTS thickness halo update")
+
+ call mpas_timer_stop("FB_LTS prognostic halo update")
+
+ ! Compute fast tendencies for normal velocity
+ call mpas_timer_start("FB_LTS compute fast tendencies")
+ call mpas_timer_start("FB_LTS compute fast velocity tendencies")
+
+ call ocn_lts_vel_tend(LTSPool, tendPool, &
+ normalVelocityCur, layerThicknessForTend, &
+ 0, 1, 1, 1, 1)
+
+ normalVelocityTend(:,:) = normalVelocityTend(:,:) &
+ + normalVelocityTendSlow(:,:)
+
+ call mpas_timer_stop("FB_LTS compute fast velocity tendencies")
+ call mpas_timer_stop("FB_LTS compute fast tendencies")
+
+ ! Advance normal velocity solution with first stage
+ call mpas_timer_start("FB_LTS advance solution")
+ call mpas_timer_start("FB_LTS advance velocity solution")
+
+ ! Interface regions
+ do iRegion = 1,nRegions
+ do ie = 1, nEdgesInLTSRegion(iRegion,2)
+ iEdge = edgesInLTSRegion(iRegion,2,ie)
+ normalVelocityFirstStage(:,iEdge) = normalVelocityCur(:,iEdge) &
+ + weight1st * dt * normalVelocityTend(:,iEdge)
+ end do
+ end do
+ ! Coarse
+ do ie = 1, nEdgesInLTSRegion(2,1)
+ iEdge = edgesInLTSRegion(2,1,ie)
+ normalVelocityFirstStage(:,iEdge) = normalVelocityCur(:,iEdge) &
+ + weight1st * dt * normalVelocityTend(:,iEdge)
+ end do
+ ! Fine layers close to interface layers
+ do ie = 1, nEdgesInLTSRegion(1,3)
+ iEdge = edgesInLTSRegion(1,3,ie)
+ normalVelocityFirstStage(:,iEdge) = normalVelocityCur(:,iEdge) &
+ + weight1st * dt * normalVelocityTend(:,iEdge)
+ end do
+
+ call mpas_timer_stop("FB_LTS advance velocity solution")
+ call mpas_timer_stop("FB_LTS advance solution")
+
+ ! END: Normal velocity stage 1
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! BEGIN: Thickness stage 2
+ ! Compute the second stage of the thickness on fine*, interface 1,
+ ! interface 2, and coarse
+
+ ! Halo update before tend calculation
+ call mpas_timer_start("FB_LTS prognostic halo update")
+
+ call mpas_timer_start("FB_LTS velocity halo update")
+ call mpas_dmpar_field_halo_exch(domain, 'normalVelocity', timeLevel=3)
+ call mpas_timer_stop("FB_LTS velocity halo update")
+
+ call mpas_timer_start("FB_LTS thickness halo update")
+ call mpas_dmpar_field_halo_exch(domain, 'layerThickness', timeLevel=3)
+ call mpas_timer_stop("FB_LTS thickness halo update")
+
+ call mpas_timer_stop("FB_LTS prognostic halo update")
+
+ ! Compute fast tendencies for thickness
+ call mpas_timer_start("FB_LTS compute fast tendencies")
+ call mpas_timer_start("FB_LTS compute fast thickness tendencies")
+
+ call ocn_lts_thick_tend(LTSPool, tendPool, &
+ normalVelocityFirstStage, layerThicknessFirstStage, &
+ 0, 1, 1, 1, 1)
+
+ call mpas_timer_stop("FB_LTS compute fast thickness tendencies")
+ call mpas_timer_stop("FB_LTS compute fast tendencies")
+
+ ! Advance thickness solution with first stage
+ call mpas_timer_start("FB_LTS advance solution")
+ call mpas_timer_start("FB_LTS advance thickness solution")
+
+ ! Interface layers
+ do iRegion = 1,nRegions
+ do ic = 1, nCellsInLTSRegion(iRegion,2)
+ iCell = cellsInLTSRegion(iRegion,2,ic)
+ layerThicknessSecondStage(:,iCell) = layerThicknessCur(:,iCell) &
+ + weight2nd * dt * layerThicknessTend(:,iCell)
+ end do
+ end do
+ ! Coarse
+ do ic = 1, nCellsInLTSRegion(2,1)
+ iCell = cellsInLTSRegion(2,1,ic)
+ layerThicknessSecondStage(:,iCell) = layerThicknessCur(:,iCell) &
+ + weight2nd * dt * layerThicknessTend(:,iCell)
+ end do
+ ! Fine layers close to interface layers
+ do ic = 1, nCellsInLTSRegion(1,3)
+ iCell = cellsInLTSRegion(1,3,ic)
+ layerThicknessSecondStage(:,iCell) = layerThicknessCur(:,iCell) &
+ + weight2nd * dt * layerThicknessTend(:,iCell)
+ end do
+
+ call mpas_timer_stop("FB_LTS advance thickness solution")
+ call mpas_timer_stop("FB_LTS advance solution")
+
+ ! END: Thickness stage 2
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! BEGIN: Normal velocity stage 2
+ ! Compute the second stage of the normal velocity on fine*,
+ ! interface 1, interface 2, and coarse
+
+ ! Perform forward-backward average of thickness for stage two of
+ ! FB-RK(3,2):
+ ! h = weight2*stage2 + (1-weight2)*current
+ layerThicknessForTend(:,:) = config_fb_weight_2 * layerThicknessSecondStage(:,:) &
+ + (1.0_RKIND - config_fb_weight_2) * layerThicknessCur(:,:)
+
+ ! Halo update before tend calculation
+ ! Might be able to remove this?
+ call mpas_timer_start("FB_LTS prognostic halo update")
+
+ ! Don't need to update normalVelocityFirstStage, previously updated
+
+ call mpas_timer_start("FB_LTS thickness halo update")
+ call mpas_dmpar_field_halo_exch(domain, 'layerThickness', timeLevel=5)
+ call mpas_timer_stop("FB_LTS thickness halo update")
+
+ call mpas_timer_stop("FB_LTS prognostic halo update")
+
+ ! Compute fast tendencies for normal velocity
+ call mpas_timer_start("FB_LTS compute fast tendencies")
+ call mpas_timer_start("FB_LTS compute fast velocity tendencies")
+
+ call ocn_lts_vel_tend(LTSPool, tendPool, &
+ normalVelocityFirstStage, layerThicknessForTend, &
+ 0, 1, 1, 1, 1)
+
+ normalVelocityTend(:,:) = normalVelocityTend(:,:) &
+ + normalVelocityTendSlow(:,:)
+
+ call mpas_timer_stop("FB_LTS compute fast velocity tendencies")
+ call mpas_timer_stop("FB_LTS compute fast tendencies")
+
+ ! Advance normal velocity solution with first stage
+ call mpas_timer_start("FB_LTS advance solution")
+ call mpas_timer_start("FB_LTS advance velocity solution")
+
+ ! Interface regions
+ do iRegion = 1,nRegions
+ do ie = 1, nEdgesInLTSRegion(iRegion,2)
+ iEdge = edgesInLTSRegion(iRegion,2,ie)
+ normalVelocitySecondStage(:,iEdge) = normalVelocityCur(:,iEdge) &
+ + weight2nd * dt * normalVelocityTend(:,iEdge)
+ end do
+ end do
+ ! Coarse
+ do ie = 1, nEdgesInLTSRegion(2,1)
+ iEdge = edgesInLTSRegion(2,1,ie)
+ normalVelocitySecondStage(:,iEdge) = normalVelocityCur(:,iEdge) &
+ + weight2nd * dt * normalVelocityTend(:,iEdge)
+ end do
+ ! Fine layers close to interface layers
+ do ie = 1, nEdgesInLTSRegion(1,3)
+ iEdge = edgesInLTSRegion(1,3,ie)
+ normalVelocitySecondStage(:,iEdge) = normalVelocityCur(:,iEdge) &
+ + weight2nd * dt * normalVelocityTend(:,iEdge)
+ end do
+
+ call mpas_timer_stop("FB_LTS advance velocity solution")
+ call mpas_timer_stop("FB_LTS advance solution")
+
+ ! END: Normal velocity stage 2
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! BEGIN: Thickness stage 3
+ ! Compute the third stage of the thickness on fine*, interface 1,
+ ! interface 2, and coarse
+
+ ! Halo update before tends calculation
+ call mpas_timer_start("FB_LTS prognostic halo update")
+
+ call mpas_timer_start("FB_LTS velocity halo update")
+ call mpas_dmpar_field_halo_exch(domain, 'normalVelocity', timeLevel=4)
+ call mpas_timer_stop("FB_LTS velocity halo update")
+
+ call mpas_timer_start("FB_LTS thickness halo update")
+ call mpas_dmpar_field_halo_exch(domain, 'layerThickness', timeLevel=4)
+ call mpas_timer_stop("FB_LTS thickness halo update")
+
+ call mpas_timer_stop("FB_LTS prognostic halo update")
+
+ ! Compute fast tendencies for thickness
+ call mpas_timer_start("FB_LTS compute fast tendencies")
+ call mpas_timer_start("FB_LTS compute fast thickness tendencies")
+
+ call ocn_lts_thick_tend(LTSPool, tendPool, &
+ normalVelocitySecondStage, layerThicknessSecondStage, &
+ 0, 1, 1, 1, 1)
+
+ call mpas_timer_stop("FB_LTS compute fast thickness tendencies")
+ call mpas_timer_stop("FB_LTS compute fast tendencies")
+
+ ! Advance thickness solution with first stage
+ call mpas_timer_start("FB_LTS advance solution")
+ call mpas_timer_start("FB_LTS advance thickness solution")
+
+ ! Interface layers
+ do iRegion = 1,nRegions
+ do ic = 1, nCellsInLTSRegion(iRegion,2)
+ iCell = cellsInLTSRegion(iRegion,2,ic)
+ layerThicknessNew(:,iCell) = layerThicknessCur(:,iCell) &
+ + dt * layerThicknessTend(:,iCell)
+ end do
+ end do
+ ! Coarse
+ do ic = 1, nCellsInLTSRegion(2,1)
+ iCell = cellsInLTSRegion(2,1,ic)
+ layerThicknessNew(:,iCell) = layerThicknessCur(:,iCell) &
+ + dt * layerThicknessTend(:,iCell)
+ end do
+ ! Fine layers close to interface layers
+ do ic = 1, nCellsInLTSRegion(1,3)
+ iCell = cellsInLTSRegion(1,3,ic)
+ layerThicknessNew(:,iCell) = layerThicknessCur(:,iCell) &
+ + dt * layerThicknessTend(:,iCell)
+ end do
+
+ call mpas_timer_stop("FB_LTS advance thickness solution")
+ call mpas_timer_stop("FB_LTS advance solution")
+
+ ! END: Thickness stage 3
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! BEGIN: Normal velocity stage 3
+ ! Compute the third stage of the normal velocity on, interface 1,
+ ! and coarse
+
+ ! Perform forward-backward average of thickness for stage three of
+ ! FB-RK(3,2):
+ ! h = weight3*new + (1-2*weight3)*secondStage + weight3*current
+ layerThicknessForTend(:,:) = config_fb_weight_3 * layerThicknessNew(:,:) &
+ + (1.0_RKIND - 2.0_RKIND*config_fb_weight_3) * layerThicknessSecondStage(:,:) &
+ + config_fb_weight_3 * layerThicknessCur(:,:)
+
+ ! Halo update before tend calculation
+ ! Might be able to remove this?
+ call mpas_timer_start("FB_LTS prognostic halo update")
+
+ ! Don't need to update normalVelocitySecondStage, previously updated
+
+ call mpas_timer_start("FB_LTS thickness halo update")
+ call mpas_dmpar_field_halo_exch(domain, 'layerThickness', timeLevel=5)
+ call mpas_timer_stop("FB_LTS thickness halo update")
+
+ call mpas_timer_stop("FB_LTS prognostic halo update")
+
+ ! Compute fast tendencies for normal velocity
+ call mpas_timer_start("FB_LTS compute fast tendencies")
+ call mpas_timer_start("FB_LTS compute fast velocity tendencies")
+
+ call ocn_lts_vel_tend(LTSPool, tendPool, &
+ normalVelocitySecondStage, layerThicknessForTend, &
+ 0, 0, 1, 0, 1)
+
+ normalVelocityTend(:,:) = normalVelocityTend(:,:) &
+ + normalVelocityTendSlow(:,:)
+
+ call mpas_timer_stop("FB_LTS compute fast velocity tendencies")
+ call mpas_timer_stop("FB_LTS compute fast tendencies")
+
+ ! Advance normal velocity solution with first stage
+ call mpas_timer_start("FB_LTS advance solution")
+ call mpas_timer_start("FB_LTS advance velocity solution")
+
+ ! Interface 1
+ do ie = 1, nEdgesInLTSRegion(1,2)
+ iEdge = edgesInLTSRegion(1,2,ie)
+ normalVelocityNew(:,iEdge) = normalVelocityCur(:,iEdge) &
+ + dt * normalVelocityTend(:,iEdge)
+ end do
+ ! Coarse
+ do ie = 1, nEdgesInLTSRegion(2,1)
+ iEdge = edgesInLTSRegion(2,1,ie)
+ normalVelocityNew(:,iEdge) = normalVelocityCur(:,iEdge) &
+ + dt * normalVelocityTend(:,iEdge)
+ end do
+
+ call mpas_timer_stop("FB_LTS advance velocity solution")
+ call mpas_timer_stop("FB_LTS advance solution")
+
+ ! END: Normal velocity stage 3
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! END COARSE ADVANCEMENT
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! BEGIN FINE ADVANCEMENT
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ do im = 0, M-1
+
+
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! BEGIN: Thickness stage 1
+ ! Compute the first stage of the thickness on fine
+
+ ! Calculate predicted 'current' data at intermediate
+ ! time-level on interface 1:
+ ! u,h = (im/M)*new + (1- (im/M))*current
+ call mpas_timer_start('FB_LTS interface prediction')
+
+ normalVelocityForTend(:,:) = normalVelocityCur(:,:)
+ do ie = 1, nEdgesInLTSRegion(1,2)
+ iEdge = edgesInLTSRegion(1,2,ie)
+ normalVelocityForTend(:,iEdge) = (REAL(im)/M) * normalVelocityNew(:,iEdge) &
+ + (1.0_RKIND - REAL(im)/M) * normalVelocityCur(:,iEdge)
+ end do
+
+ layerThicknessForTend(:,:) = layerThicknessCur(:,:)
+ do ic = 1, nCellsInLTSRegion(1,2)
+ iCell = cellsInLTSRegion(1,2,ic)
+ layerThicknessForTend(:,iCell) = (REAL(im)/M) * layerThicknessNew(:,iCell) &
+ + (1.0_RKIND - REAL(im)/M) * layerThicknessCur(:,iCell)
+ end do
+
+ call mpas_timer_stop('FB_LTS interface prediction')
+
+ ! Halo update before tend calculation
+ call mpas_timer_start("FB_LTS prognostic halo update")
+
+ call mpas_timer_start("FB_LTS velocity halo update")
+ call mpas_dmpar_field_halo_exch(domain, 'normalVelocity', timeLevel=5)
+ call mpas_timer_stop("FB_LTS velocity halo update")
+
+ call mpas_timer_start("FB_LTS thickness halo update")
+ call mpas_dmpar_field_halo_exch(domain, 'layerThickness', timeLevel=5)
+ call mpas_timer_stop("FB_LTS thickness halo update")
+
+ call mpas_timer_stop("FB_LTS prognostic halo update")
+
+ ! Compute fast tendencies for thickness
+ call mpas_timer_start("FB_LTS compute fast tendencies")
+ call mpas_timer_start("FB_LTS compute fast thickness tendencies")
+
+ call ocn_lts_thick_tend(LTSPool, tendPool, &
+ normalVelocityForTend, layerThicknessForTend, &
+ 1, 1, 0, 0, 0)
+
+ call mpas_timer_stop("FB_LTS compute fast thickness tendencies")
+ call mpas_timer_stop("FB_LTS compute fast tendencies")
+
+ ! Advance thickness solution with first stage
+ call mpas_timer_start("FB_LTS advance solution")
+ call mpas_timer_start("FB_LTS advance thickness solution")
+
+ ! Fine cells adjacent to interface 1
+ do ic = 1, nCellsInLTSRegion(1,3)
+ iCell = cellsInLTSRegion(1,3,ic)
+ layerThicknessFirstStage(:,iCell) = layerThicknessCur(:,iCell) &
+ + weight1st * dtFine * layerThicknessTend(:,iCell)
+ end do
+ ! Fine in the interior, away from interface 1
+ do ic = 1, nCellsInLTSRegion(1,1)
+ iCell = cellsInLTSRegion(1,1,ic)
+ layerThicknessFirstStage(:,iCell) = layerThicknessCur(:,iCell) &
+ + weight1st * dtFine * layerThicknessTend(:,iCell)
+ end do
+
+ call mpas_timer_stop("FB_LTS advance thickness solution")
+ call mpas_timer_stop("FB_LTS advance solution")
+
+ ! END: Thickness stage 1
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! BEGIN: Normal velocity stage 1
+ ! Compute the first stage of the normal velocity on fine
+
+ ! Perform forward-backward average of thickness for stage one of
+ ! FB-RK(3,2):
+ ! h = weight1*stage1 + (1-weight1)*current
+ layerThicknessForTend(:,:) = config_fb_weight_1 * layerThicknessFirstStage(:,:) &
+ + (1.0_RKIND - config_fb_weight_1) * layerThicknessCur(:,:)
+
+ ! Calculate predicted FB averaged thickness data at
+ ! intermediate time-level on interface 1:
+ ! h = weight1*'firstStage' + (1-weight1)*'current'
+ ! = weight1*( (im/M)*new + (1/M)*firstStage + (1-(im+1)/M)*current )
+ ! + (1-weight1)*( (im/M)*new + (1-im/M)*current )
+ call mpas_timer_start('FB_LTS interface prediction')
+
+ do ic = 1, nCellsInLTSRegion(1,2)
+ iCell = cellsInLTSRegion(1,2,ic)
+ layerThicknessForTend(:,iCell) = config_fb_weight_1 &
+ * ( (REAL(im)/M) * layerThicknessNew(:,iCell) &
+ + (1.0_RKIND/M) * layerThicknessFirstStage(:,iCell) &
+ + (1.0_RKIND - (REAL(im)+1.0_RKIND)/M) * layerThicknessCur(:,iCell) ) &
+ + (1.0_RKIND - config_fb_weight_1) &
+ * ( (REAL(im)/M) * layerThicknessNew(:,iCell) &
+ + (1.0_RKIND - REAL(im)/M) * layerThicknessCur(:,iCell) )
+ end do
+
+ call mpas_timer_stop('FB_LTS interface prediction')
+
+ ! Halo update before tend calculation
+ call mpas_timer_start("FB_LTS prognostic halo update")
+
+ ! Don't need to update normalVelocityForTend, previously updated
+
+ call mpas_timer_start("FB_LTS thickness halo update")
+ call mpas_dmpar_field_halo_exch(domain, 'layerThickness', timeLevel=5)
+ call mpas_timer_stop("FB_LTS thickness halo update")
+
+ call mpas_timer_stop("FB_LTS prognostic halo update")
+
+ ! Compute fast tendencies for normal velocity
+ call mpas_timer_start("FB_LTS compute fast tendencies")
+ call mpas_timer_start("FB_LTS compute fast velocity tendencies")
+
+ call ocn_lts_vel_tend(LTSPool, tendPool, &
+ normalVelocityForTend, layerThicknessForTend, &
+ 1, 1, 0, 0, 0)
+
+ normalVelocityTend(:,:) = normalVelocityTend(:,:) &
+ + normalVelocityTendSlow(:,:)
+
+ call mpas_timer_stop("FB_LTS compute fast velocity tendencies")
+ call mpas_timer_stop("FB_LTS compute fast tendencies")
+
+ ! Advance normal velocity solution with first stage
+ call mpas_timer_start("FB_LTS advance solution")
+ call mpas_timer_start("FB_LTS advance velocity solution")
+
+ ! Fine cells adjacent to interface 1
+ do ie = 1, nEdgesInLTSRegion(1,3)
+ iEdge = edgesInLTSRegion(1,3,ie)
+ normalVelocityFirstStage(:,iEdge) = normalVelocityCur(:,iEdge) &
+ + weight1st * dtFine * normalVelocityTend(:,iEdge)
+ end do
+ ! Fine in the interior, away from interface 1
+ do ie = 1, nEdgesInLTSRegion(1,1)
+ iEdge = edgesInLTSRegion(1,1,ie)
+ normalVelocityFirstStage(:,iEdge) = normalVelocityCur(:,iEdge) &
+ + weight1st * dtFine * normalVelocityTend(:,iEdge)
+ end do
+
+ call mpas_timer_stop("FB_LTS advance velocity solution")
+ call mpas_timer_stop("FB_LTS advance solution")
+
+ ! END: Normal velocity stage 1
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! BEGIN: Thickness stage 2
+ ! Compute the second stage of the thickness on fine
+
+ ! Calculate predicted stage 1 data at intermediate
+ ! time-level on interface 1:
+ ! u,h = (im/M)*new + (1/M)*firstStage + (1-(im+1)/M)*current
+ call mpas_timer_start('FB_LTS interface prediction')
+
+ normalVelocityForTend(:,:) = normalVelocityFirstStage(:,:)
+ do ie = 1, nEdgesInLTSRegion(1,2)
+ iEdge = edgesInLTSRegion(1,2,ie)
+ normalVelocityForTend(:,iEdge) = (REAL(im)/M) * normalVelocityNew(:,iEdge) &
+ + (1.0_RKIND/M) * normalVelocityFirstStage(:,iEdge) &
+ + (1.0_RKIND - (REAL(im)+1.0_RKIND)/M) * normalVelocityCur(:,iEdge)
+ end do
+
+ layerThicknessForTend(:,:) = layerThicknessFirstStage(:,:)
+ do ic = 1, nCellsInLTSRegion(1,2)
+ iCell = cellsInLTSRegion(1,2,ic)
+ layerThicknessForTend(:,iCell) = (REAL(im)/M) * layerThicknessNew(:,iCell) &
+ + (1.0_RKIND/M) * layerThicknessFirstStage(:,iCell) &
+ + (1.0_RKIND - (REAL(im)+1.0_RKIND)/M) * layerThicknessCur(:,iCell)
+ end do
+
+ call mpas_timer_stop('FB_LTS interface prediction')
+
+ ! Halo update before tend calculation
+ call mpas_timer_start("FB_LTS prognostic halo update")
+
+ call mpas_timer_start("FB_LTS velocity halo update")
+ call mpas_dmpar_field_halo_exch(domain, 'normalVelocity', timeLevel=5)
+ call mpas_timer_stop("FB_LTS velocity halo update")
+
+ call mpas_timer_start("FB_LTS thickness halo update")
+ call mpas_dmpar_field_halo_exch(domain, 'layerThickness', timeLevel=5)
+ call mpas_timer_stop("FB_LTS thickness halo update")
+
+ call mpas_timer_stop("FB_LTS prognostic halo update")
+
+ ! Compute fast tendencies for thickness
+ call mpas_timer_start("FB_LTS compute fast tendencies")
+ call mpas_timer_start("FB_LTS compute fast thickness tendencies")
+
+ call ocn_lts_thick_tend(LTSPool, tendPool, &
+ normalVelocityForTend, layerThicknessForTend, &
+ 1, 1, 0, 0, 0)
+
+ call mpas_timer_stop("FB_LTS compute fast thickness tendencies")
+ call mpas_timer_stop("FB_LTS compute fast tendencies")
+
+ ! Advance thickness solution with second stage
+ call mpas_timer_start("FB_LTS advance solution")
+ call mpas_timer_start("FB_LTS advance thickness solution")
+
+ ! Fine cells adjacent to interface 1
+ do ic = 1, nCellsInLTSRegion(1,3)
+ iCell = cellsInLTSRegion(1,3,ic)
+ layerThicknessSecondStage(:,iCell) = layerThicknessCur(:,iCell) &
+ + weight2nd * dtFine * layerThicknessTend(:,iCell)
+ end do
+ ! Fine in the interior, away from interface 1
+ do ic = 1, nCellsInLTSRegion(1,1)
+ iCell = cellsInLTSRegion(1,1,ic)
+ layerThicknessSecondStage(:,iCell) = layerThicknessCur(:,iCell) &
+ + weight2nd * dtFine * layerThicknessTend(:,iCell)
+ end do
+
+ call mpas_timer_stop("FB_LTS advance thickness solution")
+ call mpas_timer_stop("FB_LTS advance solution")
+
+ ! END: Thickness stage 2
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! BEGIN: Normal velocity stage 2
+ ! Compute the second stage of the normal velocity on fine
+
+ ! Perform forward-backward average of thickness for stage two of
+ ! FB-RK(3,2):
+ ! h = weight2*stage2 + (1-weight2)*current
+ layerThicknessForTend(:,:) = config_fb_weight_2 * layerThicknessSecondStage(:,:) &
+ + (1.0_RKIND - config_fb_weight_2) * layerThicknessCur(:,:)
+
+ ! Calculate predicted FB averaged thickness data at
+ ! intermediate time-level on interface 1:
+ ! h = weight2*'secondStage' + (1-weight2)*'current'
+ ! = weight2*( (im/M)*new + (1/M)*secondStage + (1-(im+1)/M)*current )
+ ! + (1-weight2)*( (im/M)*new + (1-im/M)*current )
+ call mpas_timer_start('FB_LTS interface prediction')
+
+ do ic = 1, nCellsInLTSRegion(1,2)
+ iCell = cellsInLTSRegion(1,2,ic)
+ layerThicknessForTend(:,iCell) = config_fb_weight_2 &
+ * ( (REAL(im)/M) * layerThicknessNew(:,iCell) &
+ + (1.0_RKIND/M) * layerThicknessSecondStage(:,iCell) &
+ + (1.0_RKIND - (REAL(im)+1.0_RKIND)/M) * layerThicknessCur(:,iCell) ) &
+ + (1.0_RKIND - config_fb_weight_2) &
+ * ( (REAL(im)/M) * layerThicknessNew(:,iCell) &
+ + (1.0_RKIND - REAL(im)/M) * layerThicknessCur(:,iCell) )
+ end do
+
+ call mpas_timer_stop('FB_LTS interface prediction')
+
+ ! Halo update before tend calculation
+ call mpas_timer_start("FB_LTS prognostic halo update")
+
+ ! Don't need to update normalVelocityForTend, previously updated
+
+ call mpas_timer_start("FB_LTS thickness halo update")
+ call mpas_dmpar_field_halo_exch(domain, 'layerThickness', timeLevel=5)
+ call mpas_timer_stop("FB_LTS thickness halo update")
+
+ call mpas_timer_stop("FB_LTS prognostic halo update")
+
+ ! Compute fast tendencies for normal velocity
+ call mpas_timer_start("FB_LTS compute fast tendencies")
+ call mpas_timer_start("FB_LTS compute fast velocity tendencies")
+
+ call ocn_lts_vel_tend(LTSPool, tendPool, &
+ normalVelocityForTend, layerThicknessForTend, &
+ 1, 1, 0, 0, 0)
+
+ normalVelocityTend(:,:) = normalVelocityTend(:,:) &
+ + normalVelocityTendSlow(:,:)
+
+ call mpas_timer_stop("FB_LTS compute fast velocity tendencies")
+ call mpas_timer_stop("FB_LTS compute fast tendencies")
+
+ ! Advance normal velocity solution with second stage
+ call mpas_timer_start("FB_LTS advance solution")
+ call mpas_timer_start("FB_LTS advance velocity solution")
+
+ ! Fine cells adjacent to interface 1
+ do ie = 1, nEdgesInLTSRegion(1,3)
+ iEdge = edgesInLTSRegion(1,3,ie)
+ normalVelocitySecondStage(:,iEdge) = normalVelocityCur(:,iEdge) &
+ + weight2nd * dtFine * normalVelocityTend(:,iEdge)
+ end do
+ ! Fine in the interior, away from interface 1
+ do ie = 1, nEdgesInLTSRegion(1,1)
+ iEdge = edgesInLTSRegion(1,1,ie)
+ normalVelocitySecondStage(:,iEdge) = normalVelocityCur(:,iEdge) &
+ + weight2nd * dtFine * normalVelocityTend(:,iEdge)
+ end do
+
+ call mpas_timer_stop("FB_LTS advance velocity solution")
+ call mpas_timer_stop("FB_LTS advance solution")
+
+ ! END: Normal velocity stage 2
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! BEGIN: Thickness stage 3
+ ! Compute the third stage of the thickness on fine and
+ ! increment the third stage interface correction terms
+
+ ! Calculate predicted stage 2 data at intermediate
+ ! time-level on interface 1:
+ ! u,h = (im/M)*new + (1/M)*secondStage + (1-(im+1)/M)*current
+ call mpas_timer_start('FB_LTS interface prediction')
+
+ normalVelocityForTend(:,:) = normalVelocitySecondStage(:,:)
+ do ie = 1, nEdgesInLTSRegion(1,2)
+ iEdge = edgesInLTSRegion(1,2,ie)
+ normalVelocityForTend(:,iEdge) = (REAL(im)/M) * normalVelocityNew(:,iEdge) &
+ + (1.0_RKIND/M) * normalVelocitySecondStage(:,iEdge) &
+ + (1.0_RKIND - (REAL(im)+1.0_RKIND)/M) * normalVelocityCur(:,iEdge)
+ end do
+
+ layerThicknessForTend(:,:) = layerThicknessSecondStage(:,:)
+ do ic = 1, nCellsInLTSRegion(1,2)
+ iCell = cellsInLTSRegion(1,2,ic)
+ layerThicknessForTend(:,iCell) = (REAL(im)/M) * layerThicknessNew(:,iCell) &
+ + (1.0_RKIND/M) * layerThicknessSecondStage(:,iCell) &
+ + (1.0_RKIND - (REAL(im)+1.0_RKIND)/M) * layerThicknessCur(:,iCell)
+ end do
+
+ call mpas_timer_stop('FB_LTS interface prediction')
+
+ ! Halo update before tend calculation
+ call mpas_timer_start("FB_LTS prognostic halo update")
+
+ call mpas_timer_start("FB_LTS velocity halo update")
+ call mpas_dmpar_field_halo_exch(domain, 'normalVelocity', timeLevel=5)
+ call mpas_timer_stop("FB_LTS velocity halo update")
+
+ call mpas_timer_start("FB_LTS thickness halo update")
+ call mpas_dmpar_field_halo_exch(domain, 'layerThickness', timeLevel=5)
+ call mpas_timer_stop("FB_LTS thickness halo update")
+
+ call mpas_timer_stop("FB_LTS prognostic halo update")
+
+ ! Compute fast tendencies for thickness
+ call mpas_timer_start("FB_LTS compute fast tendencies")
+ call mpas_timer_start("FB_LTS compute fast thickness tendencies")
+
+ call ocn_lts_thick_tend(LTSPool, tendPool, &
+ normalVelocityForTend, layerThicknessForTend, &
+ 1, 1, 1, 1, 0)
+
+ call mpas_timer_stop("FB_LTS compute fast thickness tendencies")
+ call mpas_timer_stop("FB_LTS compute fast tendencies")
+
+ ! Advance thickness solution with third stage
+ call mpas_timer_start("FB_LTS advance solution")
+ call mpas_timer_start("FB_LTS advance thickness solution")
+
+ ! Increment interface correction terms
+ do iRegion = 1,nRegions
+ do ic = 1, nCellsInLTSRegion(iRegion,2)
+ iCell = cellsInLTSRegion(iRegion,2,ic)
+ layerThicknessTendSum3rd(:,iCell) = layerThicknessTendSum3rd(:,iCell) &
+ + layerThicknessTend(:,iCell)
+ end do
+ end do
+ ! Fine cells adjacent to interface 1
+ do ic = 1, nCellsInLTSRegion(1,3)
+ iCell = cellsInLTSRegion(1,3,ic)
+ layerThicknessNew(:,iCell) = layerThicknessCur(:,iCell) &
+ + dtFine * layerThicknessTend(:,iCell)
+ end do
+ ! Fine in the interior, away from interface 1
+ do ic = 1, nCellsInLTSRegion(1,1)
+ iCell = cellsInLTSRegion(1,1,ic)
+ layerThicknessNew(:,iCell) = layerThicknessCur(:,iCell) &
+ + dtFine * layerThicknessTend(:,iCell)
+ end do
+
+ call mpas_timer_stop("FB_LTS advance thickness solution")
+ call mpas_timer_stop("FB_LTS advance solution")
+
+ ! END: Thickness stage 3
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! BEGIN: Normal velocity stage 3
+ ! Compute the third stage of the normal velocity on fine and
+ ! increment the third stage interface correction terms
+
+ ! Perform forward-backward average of thickness for stage three of
+ ! FB-RK(3,2):
+ ! h = weight3*new + (1-2*weight3)*stageTwo + weight3*current
+ layerThicknessForTend(:,:) = config_fb_weight_3 * layerThicknessNew(:,:) &
+ + (1.0_RKIND - 2.0_RKIND*config_fb_weight_3) * layerThicknessSecondStage(:,:) &
+ + config_fb_weight_3 * layerThicknessCur(:,:)
+
+ ! Calculate predicted FB averaged thickness data at
+ ! intermediate time-level on interface 1:
+ ! h = weight3*new + (1-2*weight3)*'secondStage' + weight3*'current'
+ ! = weight3*( ((im+1)/M)*new + (1-(im+1)/M)*current )
+ ! + (1-2*weight3)*( (im/M)*new + (1/M)*secondStage + (1-(im+1)/M)*current )
+ ! + weight3*( (im/M)*new + (1-im/M)*current )
+ call mpas_timer_start('FB_LTS interface prediction')
+
+ do ic = 1, nCellsInLTSRegion(1,2)
+ iCell = cellsInLTSRegion(1,2,ic)
+ layerThicknessForTend(:,iCell) = config_fb_weight_3 &
+ * ( ((REAL(im)+1.0_RKIND)/M) * layerThicknessNew(:,iCell) &
+ + (1.0_RKIND - (REAL(im)+1.0_RKIND)/M) * layerThicknessCur(:,iCell) ) &
+ + (1.0_RKIND - 2.0_RKIND*config_fb_weight_3) &
+ * ( (REAL(im)/M) * layerThicknessNew(:,iCell) &
+ + (1.0_RKIND/M) * layerThicknessSecondStage(:,iCell) &
+ + (1.0_RKIND - (REAL(im)+1.0_RKIND)/M) * layerThicknessCur(:,iCell) ) &
+ + config_fb_weight_3 &
+ * ( (REAL(im)/M) * layerThicknessNew(:,iCell) &
+ + (1.0_RKIND - REAL(im)/M) * layerThicknessCur(:,iCell) )
+ end do
+
+ call mpas_timer_stop('FB_LTS interface prediction')
+
+ ! Halo update before tend calculation
+ call mpas_timer_start("FB_LTS prognostic halo update")
+
+ ! Don't need to update normalVelocityForTend, previously updated
+
+ call mpas_timer_start("FB_LTS thickness halo update")
+ call mpas_dmpar_field_halo_exch(domain, 'layerThickness', timeLevel=5)
+ call mpas_timer_stop("FB_LTS thickness halo update")
+
+ call mpas_timer_stop("FB_LTS prognostic halo update")
+
+ ! Compute fast tendencies for normal velocity
+ call mpas_timer_start("FB_LTS compute fast tendencies")
+ call mpas_timer_start("FB_LTS compute fast velocity tendencies")
+
+ call ocn_lts_vel_tend(LTSPool, tendPool, &
+ normalVelocityForTend, layerThicknessForTend, &
+ 1, 1, 1, 1, 0)
+
+ normalVelocityTend(:,:) = normalVelocityTend(:,:) &
+ + normalVelocityTendSlow(:,:)
+
+ call mpas_timer_stop("FB_LTS compute fast velocity tendencies")
+ call mpas_timer_stop("FB_LTS compute fast tendencies")
+
+ ! Advance normal velocity solution with third stage
+ ! Here, we write into normalVelocityCur, rather than
+ ! normalVelocityNew, so that the New data is stored
+ ! in normalVelocityCur to be used at the beginning of the
+ ! next subcycled time-step
+ call mpas_timer_start("FB_LTS advance solution")
+ call mpas_timer_start("FB_LTS advance velocity solution")
+
+ ! Increment interface correction terms
+ do iRegion = 1,nRegions
+ do ie = 1, nEdgesInLTSRegion(iRegion,2)
+ iEdge = edgesInLTSRegion(iRegion,2,ie)
+ normalVelocityTendSum3rd(:,iEdge) = normalVelocityTendSum3rd(:,iEdge) &
+ + normalVelocityTend(:,iEdge)
+ end do
+ end do
+ ! Fine cells adjacent to interface 1
+ do ie = 1, nEdgesInLTSRegion(1,3)
+ iEdge = edgesInLTSRegion(1,3,ie)
+ normalVelocityCur(:,iEdge) = normalVelocityCur(:,iEdge) &
+ + dtFine * normalVelocityTend(:,iEdge)
+ end do
+ ! Fine in the interior, away from interface 1
+ do ie = 1, nEdgesInLTSRegion(1,1)
+ iEdge = edgesInLTSRegion(1,1,ie)
+ normalVelocityCur(:,iEdge) = normalVelocityCur(:,iEdge) &
+ + dtFine * normalVelocityTend(:,iEdge)
+ end do
+
+ call mpas_timer_stop("FB_LTS advance velocity solution")
+ call mpas_timer_stop("FB_LTS advance solution")
+
+ ! END: Normal velocity stage 3
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+ ! Copy new solution into cur solution for use at the beginning
+ ! of the next substep
+ ! We only do this for layerThickness here because we write
+ ! into normalVelocityCur rather than normalVelocityNew above
+ ! for stage 3 of the subcycled normal velocity
+ call mpas_timer_start("FB_LTS copy soln")
+
+ ! Fine adjacent to interface 1
+ do ic = 1, nCellsInLTSRegion(1,3)
+ iCell = cellsInLTSRegion(1,3,ic)
+ layerThicknessCur(:,iCell) = layerThicknessNew(:,iCell)
+ end do
+ ! Fine in the interior, away from interface 1
+ do ic = 1, nCellsInLTSRegion(1,1)
+ iCell = cellsInLTSRegion(1,1,ic)
+ layerThicknessCur(:,iCell) = layerThicknessNew(:,iCell)
+ end do
+
+ call mpas_timer_stop("FB_LTS copy soln")
+
+ end do ! end of fine time-step subcycling loop
+
+
+ ! Copy data from normalVelocityCur into normalVelocityNew
+ ! which currently holds the New data.
+ call mpas_timer_start("FB_LTS copy soln")
+
+ ! Fine adjacent to interface 1
+ do ie = 1, nEdgesInLTSRegion(1,3)
+ iEdge = edgesInLTSRegion(1,3,ie)
+ normalVelocityNew(:,iEdge) = normalVelocityCur(:,iEdge)
+ end do
+ ! Fine in the interior, away from interface 1
+ do ie = 1, nEdgesInLTSRegion(1,1)
+ iEdge = edgesInLTSRegion(1,1,ie)
+ normalVelocityNew(:,iEdge) = normalVelocityCur(:,iEdge)
+ end do
+
+ call mpas_timer_stop("FB_LTS copy soln")
+
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! END FINE ADVANCEMENT
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! BEGIN INTERFACE CORRECTION
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+ ! Calculate the corrected solution in the interface layers
+ call mpas_timer_start("FB_LTS interface correction")
+
+ ! Perform the correction on interface 1 and 2
+ do iRegion = 1, nRegions
+ ! Normal velocity correction
+ do ie = 1, nEdgesInLTSRegion(iRegion,2)
+ iEdge = edgesInLTSRegion(iRegion,2,ie)
+ normalVelocityNew(:,iEdge) = normalVelocityCur(:,iEdge) &
+ + dtFine * normalVelocityTendSum3rd(:,iEdge)
+ end do
+ ! Layer thickness correction
+ do ic = 1, nCellsInLTSRegion(iRegion,2)
+ iCell = cellsInLTSRegion(iRegion,2,ic)
+ layerThicknessNew(:,iCell) = layerThicknessCur(:,iCell) &
+ + dtFine * layerThicknessTendSum3rd(:,iCell)
+ end do
+ end do
+
+ call mpas_timer_stop("FB_LTS interface correction")
+
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! END INTERFACE CORRECTION
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+ ! Final prognostic halo update, is this needed?
+ call mpas_timer_start("FB_LTS prognostic halo update")
+
+ call mpas_timer_start("FB_LTS velocity halo update")
+ call mpas_dmpar_field_halo_exch(domain, 'normalVelocity', timeLevel=2)
+ call mpas_timer_stop("FB_LTS velocity halo update")
+
+ call mpas_timer_start("FB_LTS thickness halo update")
+ call mpas_dmpar_field_halo_exch(domain, 'layerThickness', timeLevel=2)
+ call mpas_timer_stop("FB_LTS thickness halo update")
+
+ call mpas_timer_stop("FB_LTS prognostic halo update")
+
+ ! Implicit vmix, DO WE NEED THIS?
+ call mpas_timer_start("FB_LTS implicit vmix")
+ if (.not. config_disable_vel_vmix) then
+ call ocn_diagnostic_solve(dt, statePool, forcingPool, meshPool, &
+ verticalMeshPool, scratchPool, tracersPool, 2)
+ call ocn_vmix_implicit(dt, meshPool, statePool, forcingPool, scratchPool, err, 2)
+
+ ! Halo update
+ call mpas_timer_start("FB_LTS prognostic halo update")
+
+ call mpas_timer_start("FB_LTS velocity halo update")
+ call mpas_dmpar_field_halo_exch(domain, 'normalVelocity', timeLevel=2)
+ call mpas_timer_stop("FB_LTS velocity halo update")
+
+ call mpas_timer_start("FB_LTS thickness halo update")
+ call mpas_dmpar_field_halo_exch(domain, 'layerThickness', timeLevel=2)
+ call mpas_timer_stop("FB_LTS thickness halo update")
+
+ call mpas_timer_stop("FB_LTS prognostic halo update")
+ end if
+ call mpas_timer_stop("FB_LTS implicit vmix")
+
+ call mpas_timer_stop("FB_LTS main loop")
+
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !
+ ! END FB_LTS SCHEME
+ !
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+ call mpas_timer_start("FB_LTS cleanup")
+
+ if (config_prescribe_velocity) then
+ do iEdge = 1, nEdgesAll
+ normalVelocityNew(:,iEdge) = normalVelocityCur(:,iEdge)
+ end do
+ end if
+
+ if (config_prescribe_thickness) then
+ do iCell = 1, nCellsAll
+ layerThicknessNew(:,iCell) = layerThicknessCur(:,iCell)
+ end do
+ end if
+
+ do iEdge = 1, nEdgesAll
+ normalTransportVelocity(:,iEdge) = normalVelocityNew(:,iEdge)
+ end do
+
+ call mpas_reconstruct(meshPool, normalVelocityNew, &
+ velocityX, velocityY, velocityZ, &
+ velocityZonal, velocityMeridional, &
+ includeHalos = .true.)
+
+ call mpas_reconstruct(meshPool, gradSSH, &
+ gradSSHX, gradSSHY, gradSSHZ, &
+ gradSSHZonal, gradSSHMeridional, &
+ includeHalos = .true.)
+
+ do iCell = 1, nCellsAll
+ surfaceVelocity(indexSurfaceVelocityZonal, iCell) = velocityZonal(1, iCell)
+ surfaceVelocity(indexSurfaceVelocityMeridional, iCell) = velocityMeridional(1, iCell)
+
+ SSHGradient(indexSSHGradientZonal, iCell) = gradSSHZonal(iCell)
+ SSHGradient(indexSSHGradientMeridional, iCell) = gradSSHMeridional(iCell)
+ end do
+
+ call ocn_time_average_coupled_accumulate(statePool, forcingPool, 2)
+
+ do iCell = 1, nCellsAll
+ surfaceVelocity(indexSurfaceVelocityZonal, iCell) = velocityZonal(1, iCell)
+ surfaceVelocity(indexSurfaceVelocityMeridional, iCell) = velocityMeridional(1, iCell)
+
+ SSHGradient(indexSSHGradientZonal, iCell) = gradSSHZonal(iCell)
+ SSHGradient(indexSSHGradientMeridional, iCell) = gradSSHMeridional(iCell)
+ end do
+
+ ! Update diagnostics
+ call ocn_diagnostic_solve(dt, statePool, forcingPool, meshPool, &
+ verticalMeshPool, scratchPool, tracersPool, 2)
+
+ call mpas_pool_destroy_pool(tendSum3rdPool)
+ call mpas_pool_destroy_pool(tendSlowPool)
+
+ call mpas_pool_remove_subpool(block % structs, 'tend_sum_3rd')
+ call mpas_pool_remove_subpool(block % structs, 'tend_slow')
+
+ call mpas_timer_stop("FB_LTS cleanup")
+
+ end subroutine ocn_time_integrator_fblts!}}}
+
+
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! ocn_time_integration_fblts_init
+!
+!> \brief Initialization for MPAS ocean FB_LTS time integration scheme
+!> \author Giacomo Capodaglio
+!> \date November 2022
+!> \details
+!> This routine computes the LTS arrays
+!
+!-----------------------------------------------------------------------
+
+ subroutine ocn_time_integration_fblts_init(domain)!{{{
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! Sets the LTS arrays
+ !
+ ! Output: LTS arrays are written
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+ implicit none
+
+ !-----------------------------------------------------------------
+ ! Input/output variables
+ !-----------------------------------------------------------------
+
+ type (domain_type), intent(inout) :: &
+ domain !< Input/output: model state
+
+ !-----------------------------------------------------------------
+ ! Local variables
+ !-----------------------------------------------------------------
+
+ type (block_type), pointer :: &
+ block
+
+ type (mpas_pool_type), pointer :: &
+ LTSPool
+
+ integer, dimension(:), allocatable :: &
+ isLTSRegionEdgeAssigned
+
+ integer, dimension(:), pointer :: &
+ LTSRegion
+
+ integer, dimension(:,:), pointer :: &
+ nCellsInLTSRegion, &
+ nEdgesInLTSRegion
+
+ integer, dimension(:,:,:), pointer :: &
+ cellsInLTSRegion, &
+ edgesInLTSRegion
+
+ integer, dimension(2) :: &
+ minMaxLTSRegion
+
+ integer :: &
+ i, iCell, iEdge, iRegion, coarseRegions, &
+ fineRegions, fineRegionsM1
+
+ !-----------------------------------------------------------------
+ ! Begin routine
+ !-----------------------------------------------------------------
+
+ minMaxLTSRegion(1) = 1
+ minMaxLTSRegion(2) = 2
+
+ block => domain % blocklist
+ call mpas_pool_get_subpool(block % structs, 'LTS', LTSPool)
+
+ call mpas_pool_get_array(LTSPool, 'LTSRegion', LTSRegion)
+ call mpas_pool_get_array(LTSPool, 'cellsInLTSRegion', cellsInLTSRegion)
+ call mpas_pool_get_array(LTSPool, 'nCellsInLTSRegion', nCellsInLTSRegion)
+ call mpas_pool_get_array(LTSPool, 'edgesInLTSRegion', edgesInLTSRegion)
+ call mpas_pool_get_array(LTSPool, 'nEdgesInLTSRegion', nEdgesInLTSRegion)
+
+ ! LTS Regions code:
+ ! 1 = fine
+ ! 2 = coarse
+ ! 3 = interface layer 1
+ ! 4 = interface layer 2
+ ! 5 = fine (to advance when doing 1st, 2nd, 3rd stage on interface)
+
+ nCellsInLTSRegion(:,:) = 0
+ nEdgesInLTSRegion(:,:) = 0
+
+ ! This is a loop to build the lists of elements in the fine, coarse,
+ ! and interface regions. Only loops up to nCellsOwned because in the
+ ! time-stepping we only want to advance the cells owned by the MPI process
+ do iCell = 1, nCellsOwned
+ do iRegion = 1,2
+ if (iRegion == minMaxLTSRegion(iRegion)) then
+ if(LTSRegion(iCell) == minMaxLTSRegion(iRegion)) then
+ nCellsInLTSRegion(iRegion,1) = nCellsInLTSRegion(iRegion,1) + 1
+ cellsInLTSRegion(iRegion,1,nCellsInLTSRegion(iRegion,1)) = iCell
+ end if
+ if(LTSRegion(iCell) == (minMaxLTSRegion(iRegion) + 2) ) then
+ nCellsInLTSRegion(iRegion,2) = nCellsInLTSRegion(iRegion,2) + 1
+ cellsInLTSRegion(iRegion,2,nCellsInLTSRegion(iRegion,2)) = iCell
+ end if
+ end if
+ end do
+ if (LTSRegion(iCell) == 5) then
+ nCellsInLTSRegion(1,3) = nCellsInLTSRegion(1,3) + 1
+ cellsInLTSRegion(1,3,nCellsInLTSRegion(1,3)) = iCell
+ end if
+ end do
+
+ ! Below we fill out the lists for the edges, according to the LTSRegion
+ ! that have been assigned to the cells. We move from the fine to the
+ ! coarse (i.e. from the fine to the nearest LTS region in the direction
+ ! of the coarse). Note that edges shared between cells of different LTS
+ ! regions are owned by the cell in the LTS region closest to the fine
+ ! region, see Figure 3 in "Conservative explicit local time-stepping
+ ! schemes for the shallow water equations" by Hoang et al. (halo edges
+ ! however are owned by whatever processor they are initially assigned to).
+
+ allocate(isLTSRegionEdgeAssigned(nEdgesOwned))
+ isLTSRegionEdgeAssigned(:) = 0
+
+ do iCell = 1, nCellsInLTSRegion(1,1)
+ do i = 1, nEdgesOnCell(cellsInLTSRegion(1,1,iCell))
+ iEdge = edgesOnCell(i,cellsInLTSRegion(1,1,iCell))
+ if (iEdge .le. nEdgesOwned) then
+ if (isLTSRegionEdgeAssigned(iEdge) == 0) then
+ nEdgesInLTSRegion(1,1) = nEdgesInLTSRegion(1,1) + 1
+ edgesInLTSRegion(1,1, nEdgesInLTSRegion(1,1)) = iEdge
+ isLTSRegionEdgeAssigned(iEdge) = 1
+ end if
+ end if
+ end do
+ end do
+
+ fineRegions = 3
+ fineRegionsM1 = 2
+ do iRegion = 1, fineRegionsM1
+ do iCell = 1, nCellsInLTSRegion(1, fineRegions - iRegion + 1)
+ do i = 1, nEdgesOnCell(cellsInLTSRegion(1, fineRegions - iRegion + 1, iCell))
+ iEdge = edgesOnCell(i,cellsInLTSRegion(1, fineRegions - iRegion + 1, iCell))
+ if (iEdge .le. nEdgesOwned) then
+ if (isLTSRegionEdgeAssigned(iEdge) == 0) then
+ nEdgesInLTSRegion(1, fineRegions - iRegion + 1) &
+ = nEdgesInLTSRegion(1, fineRegions - iRegion + 1) + 1
+ edgesInLTSRegion(1, fineRegions - iRegion + 1, &
+ nEdgesInLTSRegion(1, fineRegions - iRegion + 1)) &
+ = iEdge
+ isLTSRegionEdgeAssigned(iEdge) = 1
+ end if
+ end if
+ end do
+ end do
+ end do
+
+ coarseRegions = 2
+ do iRegion = 1, coarseRegions
+ do iCell = 1, nCellsInLTSRegion(2, coarseRegions - iRegion + 1)
+ do i = 1, nEdgesOnCell(cellsInLTSRegion(2,coarseRegions - iRegion + 1,iCell))
+ iEdge = edgesOnCell(i,cellsInLTSRegion(2,coarseRegions - iRegion + 1,iCell))
+ if (iEdge .le. nEdgesOwned) then
+ if (isLTSRegionEdgeAssigned(iEdge) == 0) then
+ nEdgesInLTSRegion(2, coarseRegions - iRegion + 1) &
+ = nEdgesInLTSRegion(2, coarseRegions - iRegion + 1) + 1
+ edgesInLTSRegion(2, coarseRegions - iRegion + 1, &
+ nEdgesInLTSRegion(2, coarseRegions - iRegion + 1)) &
+ = iEdge
+ isLTSRegionEdgeAssigned(iEdge) = 1
+ end if
+ end if
+ end do
+ end do
+ end do
+
+ deallocate(isLTSRegionEdgeAssigned)
+
+ end subroutine ocn_time_integration_fblts_init!}}}
+
+
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! ocn_lts_thick_tend
+!
+!> \brief Calculate thickness tendencies for FB_LTS
+!> \author Jeremy Lilly
+!> \date October 2023
+!> \details
+!> This routine calculates the thickness tendency on different
+!> LTS regions
+!
+!-----------------------------------------------------------------------
+
+ subroutine ocn_lts_thick_tend(LTSPool, tendPool, &
+ normalVelocity, layerThickness, &
+ computeOnFineInterior, computeOnFineInterfaceAdjacent, &
+ computeOnInterfaceOne, computeOnInterfaceTwo, &
+ computeOnCoarse)!{{{
+
+ !-----------------------------------------------------------------
+ ! Input variables
+ !-----------------------------------------------------------------
+
+ integer, intent(in) :: &
+ computeOnFineInterior, &
+ computeOnFineInterfaceAdjacent, &
+ computeOnInterfaceOne, &
+ computeOnInterfaceTwo, &
+ computeOnCoarse
+
+ real (kind=RKIND), dimension(:,:), pointer, intent(in) :: &
+ layerThickness, &
+ normalVelocity
+
+ type (mpas_pool_type), intent(in) :: &
+ LTSPool !< Input: LTS data
+
+ !-----------------------------------------------------------------
+ ! Input/output variables
+ !-----------------------------------------------------------------
+
+ type (mpas_pool_type), intent(inout) :: &
+ tendPool !< Input/output: tendency variables
+
+ !-----------------------------------------------------------------
+ ! Local variables
+ !-----------------------------------------------------------------
+
+ integer, dimension(:,:), pointer :: &
+ nCellsInLTSRegion
+
+ integer, dimension(:,:,:), pointer :: &
+ cellsInLTSRegion
+
+ real (kind=RKIND), dimension(:,:), pointer :: &
+ layerThicknessTend
+
+ integer :: &
+ iEdge, cell1, cell2, k, ie, &
+ ic, i, iCell, kmin, kmax
+ real (kind=RKIND) :: &
+ invdcEdge, flux
+
+ !-----------------------------------------------------------------
+ ! Begin routine
+ !-----------------------------------------------------------------
+
+ call mpas_pool_get_array(LTSPool, 'cellsInLTSRegion', cellsInLTSRegion)
+ call mpas_pool_get_array(LTSPool, 'nCellsInLTSRegion', nCellsInLTSRegion)
+
+ call mpas_pool_get_array(tendPool, 'layerThickness', layerThicknessTend)
+
+ ! calculate layerThickEdgeFlux
+ if (config_thickness_flux_type == 'centered') then
+
+ do iEdge = 1, nEdgesAll
+ kmin = minLevelEdgeBot(iEdge)
+ kmax = maxLevelEdgeTop(iEdge)
+ cell1 = cellsOnEdge(1,iEdge)
+ cell2 = cellsOnEdge(2,iEdge)
+ do k = 1,nVertLevels
+ ! initialize layerThicknessEdgeMean to avoid divide by
+ ! zero and NaN problems.
+ layerThickEdgeFlux(k,iEdge) = -1.0e34_RKIND
+ end do
+ do k = kmin,kmax
+ ! central differenced
+ layerThickEdgeFlux(k,iEdge) = 0.5_RKIND * &
+ ( layerThickness(k,cell1) + &
+ layerThickness(k,cell2) )
+ end do
+ end do
+
+ else if (config_thickness_flux_type == 'upwind') then
+
+ do iEdge = 1, nEdgesAll
+ kmin = minLevelEdgeBot(iEdge)
+ kmax = maxLevelEdgeTop(iEdge)
+ cell1 = cellsOnEdge(1,iEdge)
+ cell2 = cellsOnEdge(2,iEdge)
+ do k=1,nVertLevels
+ ! initialize layerThicknessEdgeFlux to avoid divide by
+ ! zero and NaN problems.
+ layerThickEdgeFlux(k,iEdge) = -1.0e34_RKIND
+ end do
+ do k = kmin,kmax
+ if (normalVelocity(k,iEdge) > 0.0_RKIND) then
+ layerThickEdgeFlux(k,iEdge) = layerThickness(k,cell1)
+ elseif (normalVelocity(k,iEdge) < 0.0_RKIND) then
+ layerThickEdgeFlux(k,iEdge) = layerThickness(k,cell2)
+ else
+ layerThickEdgeFlux(k,iEdge) = max(layerThickness(k,cell1), &
+ layerThickness(k,cell2))
+ end if
+ end do
+ end do
+
+ else
+
+ call mpas_log_write('ERROR: config_thickness_flux_type selected not implemented for FB_LTS', &
+ messageType=MPAS_LOG_CRIT)
+ call abort
+
+ end if
+
+ layerThicknessTend(:, :) = 0.0_RKIND
+
+ ! Fine in the interior, away from interface 1
+ if (computeOnFineInterior == 1) then
+ do ic = 1, nCellsInLTSRegion(1,1)
+ iCell = cellsInLTSRegion(1,1,ic)
+ do i = 1, nEdgesOnCell(iCell)
+ iEdge = edgesOnCell(i, iCell)
+ do k = minLevelEdgeBot(iEdge), maxLevelEdgeTop(iEdge)
+ flux = normalVelocity(k, iEdge) * dvEdge(iEdge) * layerThickEdgeFlux(k, iEdge)
+ layerThicknessTend(k, iCell) = layerThicknessTend(k,iCell) &
+ + edgeSignOnCell(i, iCell) * flux * invAreaCell(iCell)
+ end do
+ end do
+ end do
+ end if
+
+ ! Fine adjacent to interface 1
+ if (computeOnFineInterfaceAdjacent == 1) then
+ do ic = 1, nCellsInLTSRegion(1,3)
+ iCell = cellsInLTSRegion(1,3,ic)
+ do i = 1, nEdgesOnCell(iCell)
+ iEdge = edgesOnCell(i, iCell)
+ do k = minLevelEdgeBot(iEdge), maxLevelEdgeTop(iEdge)
+ flux = normalVelocity(k, iEdge) * dvEdge(iEdge) * layerThickEdgeFlux(k, iEdge)
+ layerThicknessTend(k, iCell) = layerThicknessTend(k,iCell) &
+ + edgeSignOnCell(i, iCell) * flux * invAreaCell(iCell)
+ end do
+ end do
+ end do
+ end if
+
+ ! Interface 1
+ if (computeOnInterfaceOne == 1) then
+ do ic = 1, nCellsInLTSRegion(1,2)
+ iCell = cellsInLTSRegion(1,2,ic)
+ do i = 1, nEdgesOnCell(iCell)
+ iEdge = edgesOnCell(i, iCell)
+ do k = minLevelEdgeBot(iEdge), maxLevelEdgeTop(iEdge)
+ flux = normalVelocity(k, iEdge) * dvEdge(iEdge) * layerThickEdgeFlux(k, iEdge)
+ layerThicknessTend(k, iCell) = layerThicknessTend(k, iCell) &
+ + edgeSignOnCell(i, iCell) * flux * invAreaCell(iCell)
+ end do
+ end do
+ end do
+ end if
+
+ ! Interface 2
+ if (computeOnInterfaceTwo == 1) then
+ do ic = 1, nCellsInLTSRegion(2,2)
+ iCell = cellsInLTSRegion(2,2,ic)
+ do i = 1, nEdgesOnCell(iCell)
+ iEdge = edgesOnCell(i, iCell)
+ do k = minLevelEdgeBot(iEdge), maxLevelEdgeTop(iEdge)
+ flux = normalVelocity(k, iEdge) * dvEdge(iEdge) * layerThickEdgeFlux(k, iEdge)
+ layerThicknessTend(k, iCell) = layerThicknessTend(k, iCell) &
+ + edgeSignOnCell(i, iCell) * flux * invAreaCell(iCell)
+ end do
+ end do
+ end do
+ end if
+
+ ! Coarse
+ if (computeOnCoarse == 1) then
+ do ic = 1, nCellsInLTSRegion(2,1)
+ iCell = cellsInLTSRegion(2,1,ic)
+ do i = 1, nEdgesOnCell(iCell)
+ iEdge = edgesOnCell(i, iCell)
+ do k = minLevelEdgeBot(iEdge), maxLevelEdgeTop(iEdge)
+ flux = normalVelocity(k, iEdge) * dvEdge(iEdge) * layerThickEdgeFlux(k, iEdge)
+ layerThicknessTend(k, iCell) = layerThicknessTend(k,iCell) &
+ + edgeSignOnCell(i, iCell) * flux * invAreaCell(iCell)
+ end do
+ end do
+ end do
+ end if
+
+ end subroutine ocn_lts_thick_tend!}}}
+
+
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! ocn_lts_vel_tend
+!
+!> \brief Calculate velocity tendencies for FB_LTS
+!> \author Jeremy Lilly
+!> \date October 2023
+!> \details
+!> This routine calculates the velocity tendency on different
+!> LTS regions
+!
+!-----------------------------------------------------------------------
+
+ subroutine ocn_lts_vel_tend(LTSPool, tendPool, &
+ normalVelocity, layerThickness, &
+ computeOnFineInterior, computeOnFineInterfaceAdjacent, &
+ computeOnInterfaceOne, computeOnInterfaceTwo, &
+ computeOnCoarse)!{{{
+
+ !-----------------------------------------------------------------
+ ! Input variables
+ !-----------------------------------------------------------------
+
+ integer, intent(in) :: &
+ computeOnFineInterior, &
+ computeOnFineInterfaceAdjacent, &
+ computeOnInterfaceOne, &
+ computeOnInterfaceTwo, &
+ computeOnCoarse
+
+ real (kind=RKIND), dimension(:,:), pointer, intent(in) :: &
+ layerThickness, &
+ normalVelocity
+
+ type (mpas_pool_type), intent(in) :: &
+ LTSPool !< Input: LTS data
+
+ !-----------------------------------------------------------------
+ ! Input/output variables
+ !-----------------------------------------------------------------
+
+ type (mpas_pool_type), intent(inout) :: &
+ tendPool !< Input/output: tendency variables
+
+ !-----------------------------------------------------------------
+ ! Local variables
+ !-----------------------------------------------------------------
+
+ integer, dimension(:,:), pointer :: &
+ nEdgesInLTSRegion
+
+ integer, dimension(:,:,:), pointer :: &
+ edgesInLTSRegion
+
+ real (kind=RKIND), dimension(nCellsAll) :: &
+ ssh
+
+ real (kind=RKIND), dimension(:,:), pointer :: &
+ normalVelocityTend
+
+ integer :: &
+ iEdge, cell1, cell2, k, ie, &
+ ic, i, iCell, kmin, kmax
+
+ real (kind=RKIND) :: &
+ invdcEdge, betaSelfAttrLoad, flux, ssh_sal_on, tidal_pot_for_on
+
+ !-----------------------------------------------------------------
+ ! Begin routine
+ !-----------------------------------------------------------------
+
+ betaSelfAttrLoad = config_self_attraction_and_loading_beta
+
+ call mpas_pool_get_array(LTSPool, 'edgesInLTSRegion', edgesInLTSRegion)
+ call mpas_pool_get_array(LTSPool, 'nEdgesInLTSRegion', nEdgesInLTSRegion)
+
+ call mpas_pool_get_array(tendPool, 'normalVelocity', normalVelocityTend)
+
+ if (config_use_self_attraction_loading) then
+ ssh_sal_on = 1.0_RKIND
+ else
+ ssh_sal_on = 0.0_RKIND
+ endif
+ if (config_use_tidal_potential_forcing) then
+ tidal_pot_for_on = 1.0_RKIND
+ else
+ tidal_pot_for_on = 0.0_RKIND
+ end if
+
+ ! ssh
+ do iCell = 1, nCellsAll
+ k = maxLevelCell(iCell)
+ zTop(k:nVertLevels,iCell) = -bottomDepth(iCell) + layerThickness(k,iCell)
+ do k = maxLevelCell(iCell)-1, minLevelCell(iCell), -1
+ zTop(k,iCell) = zTop(k+1,iCell) + layerThickness(k,iCell)
+ end do
+ ! copy zTop(1,iCell) into sea-surface height array
+ ssh(iCell) = zTop(minLevelCell(iCell),iCell)
+ end do
+
+ normalVelocityTend(:,:) = 0.0_RKIND
+
+ ! Fine in the interior, away from interface 1
+ if (computeOnFineInterior == 1) then
+ do ie = 1, nEdgesInLTSRegion(1,1)
+ iEdge = edgesInLTSRegion(1,1,ie)
+ cell1 = cellsOnEdge(1,iEdge)
+ cell2 = cellsOnEdge(2,iEdge)
+ invdcEdge = 1.0_RKIND / dcEdge(iEdge)
+ kMin = minLevelEdgeBot(iEdge)
+ kMax = maxLevelEdgeTop(iEdge)
+ do k=kMin,kMax
+ normalVelocityTend(k,iEdge) = normalVelocityTend(k,iEdge) &
+ - edgeMask(k,iEdge) * invdcEdge &
+ * ( gravity * ( (ssh(cell2) - ssh(cell1)) &
+ - tidal_pot_for_on * (1.0_RKIND - ssh_sal_on) &
+ * betaSelfAttrLoad * (ssh(cell2) - ssh(cell1)) ) )
+ end do
+ end do
+ end if
+
+ ! Fine adjacent to interface 1
+ if (computeOnFineInterfaceAdjacent == 1) then
+ do ie = 1, nEdgesInLTSRegion(1,3)
+ iEdge = edgesInLTSRegion(1,3,ie)
+ cell1 = cellsOnEdge(1,iEdge)
+ cell2 = cellsOnEdge(2,iEdge)
+ invdcEdge = 1.0_RKIND / dcEdge(iEdge)
+ kMin = minLevelEdgeBot(iEdge)
+ kMax = maxLevelEdgeTop(iEdge)
+ do k=kMin,kMax
+ normalVelocityTend(k,iEdge) = normalVelocityTend(k,iEdge) &
+ - edgeMask(k,iEdge) * invdcEdge &
+ * ( gravity * ( (ssh(cell2) - ssh(cell1)) &
+ - tidal_pot_for_on * (1.0_RKIND - ssh_sal_on) &
+ * betaSelfAttrLoad * (ssh(cell2) - ssh(cell1)) ) )
+ end do
+ end do
+ end if
+
+ ! Interface 1
+ if (computeOnInterfaceOne == 1) then
+ do ie = 1, nEdgesInLTSRegion(1,2)
+ iEdge = edgesInLTSRegion(1,2,ie)
+ cell1 = cellsOnEdge(1,iEdge)
+ cell2 = cellsOnEdge(2,iEdge)
+ invdcEdge = 1.0_RKIND / dcEdge(iEdge)
+ kMin = minLevelEdgeBot(iEdge)
+ kMax = maxLevelEdgeTop(iEdge)
+ do k=kMin,kMax
+ normalVelocityTend(k,iEdge) = normalVelocityTend(k,iEdge) &
+ - edgeMask(k,iEdge) * invdcEdge &
+ * ( gravity * ( (ssh(cell2) - ssh(cell1)) &
+ - tidal_pot_for_on * (1.0_RKIND - ssh_sal_on) &
+ * betaSelfAttrLoad * (ssh(cell2) - ssh(cell1)) ) )
+ end do
+ end do
+ end if
+
+ ! Interface 2
+ if (computeOnInterfaceTwo == 1) then
+ do ie = 1, nEdgesInLTSRegion(2,2)
+ iEdge = edgesInLTSRegion(2,2,ie)
+ cell1 = cellsOnEdge(1,iEdge)
+ cell2 = cellsOnEdge(2,iEdge)
+ invdcEdge = 1.0_RKIND / dcEdge(iEdge)
+ kMin = minLevelEdgeBot(iEdge)
+ kMax = maxLevelEdgeTop(iEdge)
+ do k=kMin,kMax
+ normalVelocityTend(k,iEdge) = normalVelocityTend(k,iEdge) &
+ - edgeMask(k,iEdge) * invdcEdge &
+ * ( gravity * ( (ssh(cell2) - ssh(cell1)) &
+ - tidal_pot_for_on * (1.0_RKIND - ssh_sal_on) &
+ * betaSelfAttrLoad * (ssh(cell2) - ssh(cell1)) ) )
+ end do
+ end do
+ end if
+
+ ! Coarse
+ if (computeOnCoarse == 1) then
+ do ie = 1, nEdgesInLTSRegion(2,1)
+ iEdge = edgesInLTSRegion(2,1,ie)
+ cell1 = cellsOnEdge(1,iEdge)
+ cell2 = cellsOnEdge(2,iEdge)
+ invdcEdge = 1.0_RKIND / dcEdge(iEdge)
+ kMin = minLevelEdgeBot(iEdge)
+ kMax = maxLevelEdgeTop(iEdge)
+ do k=kMin,kMax
+ normalVelocityTend(k,iEdge) = normalVelocityTend(k,iEdge) &
+ - edgeMask(k,iEdge) * invdcEdge &
+ * ( gravity * ( (ssh(cell2) - ssh(cell1)) &
+ - tidal_pot_for_on * (1.0_RKIND - ssh_sal_on) &
+ * betaSelfAttrLoad * (ssh(cell2) - ssh(cell1)) ) )
+ end do
+ end do
+ end if
+
+ end subroutine ocn_lts_vel_tend!}}}
+
+
+end module ocn_time_integration_fblts
+
diff --git a/components/mpas-ocean/src/ocean.cmake b/components/mpas-ocean/src/ocean.cmake
index 3c0614ee38d5..b353c231df79 100644
--- a/components/mpas-ocean/src/ocean.cmake
+++ b/components/mpas-ocean/src/ocean.cmake
@@ -32,6 +32,7 @@ list(APPEND RAW_SOURCES
core_ocean/mode_forward/mpas_ocn_time_integration_split.F
core_ocean/mode_forward/mpas_ocn_time_integration_si.F
core_ocean/mode_forward/mpas_ocn_time_integration_lts.F
+ core_ocean/mode_forward/mpas_ocn_time_integration_fblts.F
core_ocean/mode_forward/mpas_ocn_time_integration_split_ab2.F
core_ocean/mode_analysis/mpas_ocn_analysis_mode.F
diff --git a/components/mpas-ocean/src/shared/mpas_ocn_diagnostics.F b/components/mpas-ocean/src/shared/mpas_ocn_diagnostics.F
index 7b8e5154495b..946b9fd5cee5 100644
--- a/components/mpas-ocean/src/shared/mpas_ocn_diagnostics.F
+++ b/components/mpas-ocean/src/shared/mpas_ocn_diagnostics.F
@@ -3612,9 +3612,12 @@ subroutine ocn_compute_land_ice_flux_input_fields(layerThickness, normalVelocity
do iCell = 1, nCellsAll
! the friction velocity is the square root of the top drag + variance of tidal velocity
! (computed regardless of land-ice coverage)
+
landIceFrictionVelocity(iCell) = sqrt(landIceTopDragCoeff * &
(2.0_RKIND * kineticEnergyCell(minLevelCell(iCell),iCell) &
- + config_land_ice_flux_rms_tidal_velocity**2))
+ + config_land_ice_flux_tidal_Jourdain_alpha**2 * &
+ (config_land_ice_flux_tidal_Jourdain_A0 * velocityTidalRMS(iCell) + &
+ config_land_ice_flux_tidal_Jourdain_U0)**2))
end do
#ifndef MPAS_OPENACC
!$omp end do
@@ -4485,8 +4488,10 @@ subroutine ocn_diagnostics_init(domain, err)!{{{
ke_cell_flag = 1
endif
- if ((trim(config_time_integrator) == 'RK4') .or.(trim(config_time_integrator) == 'LTS') ) then
- ! For RK4 or LTS, PV includes f: PV = (eta+f)/h.
+ if ( (trim(config_time_integrator) == 'RK4') &
+ .or. (trim(config_time_integrator) == 'LTS') &
+ .or. (trim(config_time_integrator) == 'FB_LTS') ) then
+ ! For RK4, LTS, or FB_LTS, PV includes f: PV = (eta+f)/h.
fCoef = 1
elseif (trim(config_time_integrator) == 'split_explicit' &
.or.trim(config_time_integrator) == 'unsplit_explicit' &
diff --git a/components/mpas-ocean/src/shared/mpas_ocn_diagnostics_variables.F b/components/mpas-ocean/src/shared/mpas_ocn_diagnostics_variables.F
index 567c3efc183c..195243a124ce 100644
--- a/components/mpas-ocean/src/shared/mpas_ocn_diagnostics_variables.F
+++ b/components/mpas-ocean/src/shared/mpas_ocn_diagnostics_variables.F
@@ -83,6 +83,8 @@ module ocn_diagnostics_variables
real (kind=RKIND), dimension(:), pointer :: surfaceFluxAttenuationCoefficientRunoff
real (kind=RKIND), dimension(:), pointer :: landIceFrictionVelocity
+ real (kind=RKIND), dimension(:), pointer :: velocityTidalRMS
+
real (kind=RKIND), dimension(:), pointer :: topDrag
real (kind=RKIND), dimension(:), pointer :: topDragMag
real (kind=RKIND), dimension(:), pointer :: topographic_wave_drag
@@ -349,6 +351,8 @@ subroutine ocn_diagnostics_variables_init(domain, jenkinsOn, hollandJenkinsOn, e
landIceTracerTransferVelocities)
call mpas_pool_get_array(diagnosticsPool, &
'landIceFrictionVelocity', landIceFrictionVelocity)
+ call mpas_pool_get_array(diagnosticsPool, &
+ 'velocityTidalRMS', velocityTidalRMS)
end if
if ( trim(config_ocean_run_mode) == 'init' ) then
@@ -685,7 +689,8 @@ subroutine ocn_diagnostics_variables_init(domain, jenkinsOn, hollandJenkinsOn, e
!$acc topDragMag, &
!$acc landIceBoundaryLayerTracers, &
!$acc landIceTracerTransferVelocities, &
- !$acc landIceFrictionVelocity)
+ !$acc landIceFrictionVelocity, &
+ !$acc velocityTidalRMS)
end if
if (config_use_topographic_wave_drag) then
!$acc enter data create(topographic_wave_drag)
@@ -932,7 +937,8 @@ subroutine ocn_diagnostics_variables_destroy(err) !{{{
!$acc topDragMag, &
!$acc landIceBoundaryLayerTracers, &
!$acc landIceTracerTransferVelocities, &
- !$acc landIceFrictionVelocity)
+ !$acc landIceFrictionVelocity, &
+ !$acc velocityTidalRMS)
end if
if (config_use_topographic_wave_drag) then
!$acc exit data delete(topographic_wave_drag)
@@ -1147,7 +1153,8 @@ subroutine ocn_diagnostics_variables_destroy(err) !{{{
topDragMag, &
landIceBoundaryLayerTracers, &
landIceTracerTransferVelocities, &
- landIceFrictionVelocity)
+ landIceFrictionVelocity, &
+ velocityTidalRMS)
end if
if ( trim(config_ocean_run_mode) == 'init' ) then
nullify(rx1Edge, &
diff --git a/components/mpas-ocean/src/shared/mpas_ocn_tendency.F b/components/mpas-ocean/src/shared/mpas_ocn_tendency.F
index 2719e1526930..91f182db9993 100644
--- a/components/mpas-ocean/src/shared/mpas_ocn_tendency.F
+++ b/components/mpas-ocean/src/shared/mpas_ocn_tendency.F
@@ -437,7 +437,9 @@ subroutine ocn_tend_vel(domain, tendPool, statePool, forcingPool, &
! Add tidal potential (if needed)
call ocn_compute_tidal_potential_forcing(err)
- if ((config_time_integrator == 'RK4') .or. (config_time_integrator =='LTS')) then
+ if ( (config_time_integrator == 'RK4') &
+ .or. (config_time_integrator =='LTS') &
+ .or. (config_time_integrator == 'FB_LTS') ) then
! for split explicit, tidal forcing is added in barotropic subcycles
call ocn_vel_tidal_potential_tend(ssh,surfacePressure, tendVel, err)
endif
diff --git a/components/mpas-ocean/src/shared/mpas_ocn_vel_hadv_coriolis.F b/components/mpas-ocean/src/shared/mpas_ocn_vel_hadv_coriolis.F
index 3bc9e3e9284c..8ba260596b31 100644
--- a/components/mpas-ocean/src/shared/mpas_ocn_vel_hadv_coriolis.F
+++ b/components/mpas-ocean/src/shared/mpas_ocn_vel_hadv_coriolis.F
@@ -359,6 +359,10 @@ subroutine ocn_vel_hadv_coriolis_init(err)!{{{
case ('LTS','lts')
! For LTS, coriolis tendency term includes f: (eta+f)/h.
usePlanetVorticity = .true.
+
+ case ('FB_LTS','fb_lts')
+ ! For FB_LTS, coriolis tendency term includes f: (eta+f)/h.
+ usePlanetVorticity = .true.
case ('split_explicit')
! For split explicit, Coriolis tendency uses eta/h because
diff --git a/components/mpas-ocean/src/shared/mpas_ocn_vel_pressure_grad.F b/components/mpas-ocean/src/shared/mpas_ocn_vel_pressure_grad.F
index 0615856f6673..8e23913960f5 100644
--- a/components/mpas-ocean/src/shared/mpas_ocn_vel_pressure_grad.F
+++ b/components/mpas-ocean/src/shared/mpas_ocn_vel_pressure_grad.F
@@ -709,7 +709,8 @@ subroutine ocn_vel_pressure_grad_init(err)!{{{
end select
- if (config_time_integrator == 'LTS') then
+ if ( (config_time_integrator == 'LTS') &
+ .or. (config_time_integrator == 'FB_LTS') ) then
timeIntegratorLTS = .true.
else
timeIntegratorLTS = .false.
diff --git a/components/mpas-ocean/src/shared/mpas_ocn_vel_tidal_potential.F b/components/mpas-ocean/src/shared/mpas_ocn_vel_tidal_potential.F
index a13105200ed5..092c52c54d09 100644
--- a/components/mpas-ocean/src/shared/mpas_ocn_vel_tidal_potential.F
+++ b/components/mpas-ocean/src/shared/mpas_ocn_vel_tidal_potential.F
@@ -503,7 +503,8 @@ subroutine ocn_vel_tidal_potential_init(domain,err)!{{{
call mpas_log_write(' ')
end do
- if (config_time_integrator == 'LTS') then
+ if ( (config_time_integrator == 'LTS') &
+ .or. (config_time_integrator == 'FB_LTS') ) then
timeIntegratorLTS = .true.
else
timeIntegratorLTS = .false.