diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py
index 1128d1b52..5b93b18cc 100755
--- a/ccpp/config/ccpp_prebuild_config.py
+++ b/ccpp/config/ccpp_prebuild_config.py
@@ -17,6 +17,8 @@
# actual variable definition files
'ccpp/physics/physics/machine.F',
'ccpp/physics/physics/radsw_param.f',
+ 'ccpp/physics/physics/h2o_def.f',
+ 'ccpp/physics/physics/ozne_def.f',
'ccpp/physics/physics/radlw_param.f',
'scm/src/GFS_typedefs.F90',
'scm/src/gmtb_scm_kinds.F90',
@@ -158,7 +160,6 @@
'ccpp/physics/physics/ozphys_2015.f' ,
'ccpp/physics/physics/precpd.f' ,
'ccpp/physics/physics/phys_tend.F90' ,
- 'ccpp/physics/physics/tracer_sanitizer.F90' ,
'ccpp/physics/physics/radlw_main.F90' ,
'ccpp/physics/physics/radsw_main.F90' ,
'ccpp/physics/physics/rascnv.F90' ,
@@ -170,7 +171,6 @@
'ccpp/physics/physics/sfc_diag.f' ,
'ccpp/physics/physics/sfc_diag_post.F90' ,
'ccpp/physics/physics/sfc_drv_ruc.F90' ,
- 'ccpp/physics/physics/lsm_ruc_sfc_sice_interstitial.F90',
'ccpp/physics/physics/sfc_cice.f' ,
'ccpp/physics/physics/sfc_diff.f' ,
'ccpp/physics/physics/sfc_drv.f' ,
@@ -212,22 +212,22 @@
DEFAULT_BUILD_DIR = 'scm/bin'
# Auto-generated makefile/cmakefile snippets that contain all type definitions
-TYPEDEFS_MAKEFILE = 'ccpp/physics/CCPP_TYPEDEFS.mk'
-TYPEDEFS_CMAKEFILE = 'ccpp/physics/CCPP_TYPEDEFS.cmake'
-TYPEDEFS_SOURCEFILE = 'ccpp/physics/CCPP_TYPEDEFS.sh'
+TYPEDEFS_MAKEFILE = '{build_dir}/ccpp/physics/CCPP_TYPEDEFS.mk'
+TYPEDEFS_CMAKEFILE = '{build_dir}/ccpp/physics/CCPP_TYPEDEFS.cmake'
+TYPEDEFS_SOURCEFILE = '{build_dir}/ccpp/physics/CCPP_TYPEDEFS.sh'
# Auto-generated makefile/cmakefile snippets that contain all schemes
-SCHEMES_MAKEFILE = 'ccpp/physics/CCPP_SCHEMES.mk'
-SCHEMES_CMAKEFILE = 'ccpp/physics/CCPP_SCHEMES.cmake'
-SCHEMES_SOURCEFILE = 'ccpp/physics/CCPP_SCHEMES.sh'
+SCHEMES_MAKEFILE = '{build_dir}/ccpp/physics/CCPP_SCHEMES.mk'
+SCHEMES_CMAKEFILE = '{build_dir}/ccpp/physics/CCPP_SCHEMES.cmake'
+SCHEMES_SOURCEFILE = '{build_dir}/ccpp/physics/CCPP_SCHEMES.sh'
# Auto-generated makefile/cmakefile snippets that contain all caps
-CAPS_MAKEFILE = 'ccpp/physics/CCPP_CAPS.mk'
-CAPS_CMAKEFILE = 'ccpp/physics/CCPP_CAPS.cmake'
-CAPS_SOURCEFILE = 'ccpp/physics/CCPP_CAPS.sh'
+CAPS_MAKEFILE = '{build_dir}/ccpp/physics/CCPP_CAPS.mk'
+CAPS_CMAKEFILE = '{build_dir}/ccpp/physics/CCPP_CAPS.cmake'
+CAPS_SOURCEFILE = '{build_dir}/ccpp/physics/CCPP_CAPS.sh'
# Directory where to put all auto-generated physics caps
-CAPS_DIR = 'ccpp/physics/physics'
+CAPS_DIR = '{build_dir}/ccpp/physics/physics'
# Directory where the suite definition files are stored
SUITES_DIR = 'ccpp/suites'
@@ -297,7 +297,7 @@
'rrtmgp_sw_rte_run' : [
'components_of_surface_downward_shortwave_fluxes',
],
- },
+ },
'GFS_rrtmgp_sw_post' : {
'GFS_rrtmgp_sw_post_run' : [
'tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step',
@@ -325,4 +325,4 @@
HTML_VARTABLE_FILE = 'ccpp/physics/CCPP_VARIABLES_SCM.html'
# LaTeX document containing the provided vs requested CCPP variables
-LATEX_VARTABLE_FILE = 'ccpp/framework/doc/DevelopersGuide/CCPP_VARIABLES_SCM.tex'
\ No newline at end of file
+LATEX_VARTABLE_FILE = 'ccpp/framework/doc/DevelopersGuide/CCPP_VARIABLES_SCM.tex'
diff --git a/ccpp/framework b/ccpp/framework
index f1dc8d6f0..612dd1aa9 160000
--- a/ccpp/framework
+++ b/ccpp/framework
@@ -1 +1 @@
-Subproject commit f1dc8d6f038e590508c272070f673d1fd7ea566f
+Subproject commit 612dd1aa9ed6f8c08b4c280ba1c992dd5357fc59
diff --git a/ccpp/physics b/ccpp/physics
index b670bb2a0..8010a66d7 160000
--- a/ccpp/physics
+++ b/ccpp/physics
@@ -1 +1 @@
-Subproject commit b670bb2a0e8814e9a1df46b9a0a89945f627ccd0
+Subproject commit 8010a66d7f7724d4df896995dc26196e199c0c1e
diff --git a/ccpp/suites/suite_SCM_GSD_v1.xml b/ccpp/suites/suite_SCM_GSD_v1.xml
index 27a5b124d..663e1d64d 100644
--- a/ccpp/suites/suite_SCM_GSD_v1.xml
+++ b/ccpp/suites/suite_SCM_GSD_v1.xml
@@ -45,9 +45,6 @@
sfc_nst
sfc_nst_post
lsm_ruc
- lsm_ruc_sfc_sice_pre
- sfc_sice
- lsm_ruc_sfc_sice_post
GFS_surface_loop_control_part2
diff --git a/scm/src/CMakeLists.txt b/scm/src/CMakeLists.txt
index b8f694963..0d773754b 100644
--- a/scm/src/CMakeLists.txt
+++ b/scm/src/CMakeLists.txt
@@ -27,8 +27,10 @@ endif("${SUITES}" STREQUAL "")
string(REGEX REPLACE "(.+),$" "\\1" SUITES ${SUITES})
# Run CCPP prebuild.py
message (STATUS "Running ccpp_prebuild.py for CCPP")
+# Make the directories where the ccpp_prebuild.py script wants to write caps and make snippets
+file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ccpp/physics/physics)
execute_process(
- COMMAND ccpp/framework/scripts/ccpp_prebuild.py --config=ccpp/config/ccpp_prebuild_config.py --suites=${SUITES} --builddir=${CMAKE_CURRENT_BINARY_DIR}/..
+ COMMAND ccpp/framework/scripts/ccpp_prebuild.py --config=ccpp/config/ccpp_prebuild_config.py --suites=${SUITES} --builddir=${CMAKE_CURRENT_BINARY_DIR}
OUTPUT_FILE ${PROJECT_BINARY_DIR}/ccpp_prebuild.out
ERROR_FILE ${PROJECT_BINARY_DIR}/ccpp_prebuild.err
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../..
diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90
index cfe78c59c..c40301529 100644
--- a/scm/src/GFS_typedefs.F90
+++ b/scm/src/GFS_typedefs.F90
@@ -5,12 +5,14 @@ module GFS_typedefs
use machine, only: kind_phys
use module_radsw_parameters, only: topfsw_type, sfcfsw_type, profsw_type, cmpfsw_type, NBDSW
use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type, NBDLW
+ use ozne_def, only: levozp, oz_coeff
+ use h2o_def, only: levh2o, h2o_coeff
use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp
use mo_optical_props, only: ty_optical_props_1scl,ty_optical_props_2str
use mo_cloud_optics, only: ty_cloud_optics
use mo_gas_concentrations, only: ty_gas_concs
use mo_source_functions, only: ty_source_func_lw
-
+
implicit none
! To ensure that these values match what's in the physics,
@@ -30,11 +32,12 @@ module GFS_typedefs
! from aerclm_def
integer, parameter :: ntrcaerm = 15
- ! These will be set later in GFS_Control%initialize,
- ! since they depend on the runtime config (e.g. Model%ntoz, Model%h2o_phys, Model%aero_in)
- private :: levozp, oz_coeff, levh2o, h2o_coeff, ntrcaer
- integer :: levozp, oz_coeff, levh2o, h2o_coeff, ntrcaer
-
+ ! This will be set later in GFS_Control%initialize, since
+ ! it depends on the runtime config (Model%aero_in)
+ private :: ntrcaer
+ integer :: ntrcaer
+
+ ! If these are changed to >99, need to adjust formatting string in GFS_diagnostics.F90 (and names in diag_tables)
integer, parameter :: naux2dmax = 20 !< maximum number of auxiliary 2d arrays in output (for debugging)
integer, parameter :: naux3dmax = 20 !< maximum number of auxiliary 3d arrays in output (for debugging)
@@ -55,6 +58,7 @@ module GFS_typedefs
real(kind=kind_phys), parameter :: cn_100 = 100._kind_phys
real(kind=kind_phys), parameter :: cn_th = 1000._kind_phys
real(kind=kind_phys), parameter :: cn_hr = 3600._kind_phys
+
! optional extra top layer on top of low ceiling models
! this parameter was originally defined in the radiation driver
! (and is still for standard non-CCPP builds), but is required
@@ -229,7 +233,8 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: semisbase(:) => null() !< background surface emissivity
!--- In (radiation only)
- real (kind=kind_phys), pointer :: sncovr (:) => null() !< snow cover in fraction
+ real (kind=kind_phys), pointer :: sncovr (:) => null() !< snow cover in fraction over land
+ real (kind=kind_phys), pointer :: sncovr_ice (:) => null() !< snow cover in fraction over ice (RUC LSM only)
real (kind=kind_phys), pointer :: snoalb (:) => null() !< maximum snow albedo in fraction
real (kind=kind_phys), pointer :: alvsf (:) => null() !< mean vis albedo with strong cosz dependency
real (kind=kind_phys), pointer :: alnsf (:) => null() !< mean nir albedo with strong cosz dependency
@@ -256,7 +261,7 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: spec_lh_flux (:) => null() !< specified kinematic surface latent heat flux
!-- In/Out
- real (kind=kind_phys), pointer :: conv_act(:) => null() !< convective activity counter hli 09/2017
+ real (kind=kind_phys), pointer :: conv_act(:) => null() !< convective activity counter for Grell-Freitas
real (kind=kind_phys), pointer :: hice (:) => null() !< sea ice thickness
real (kind=kind_phys), pointer :: weasd (:) => null() !< water equiv of accumulated snow depth (kg/m**2)
!< over land and sea ice
@@ -336,20 +341,22 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: qrain (:) => null() !< nst_fld%qrain sensible heat flux due to rainfall (watts)
! Soil properties for RUC LSM (number of levels different from NOAH 4-layer model)
- real (kind=kind_phys), pointer :: wetness(:) => null() !< normalized soil wetness for lsm
- real (kind=kind_phys), pointer :: sh2o(:,:) => null() !< volume fraction of unfrozen soil moisture for lsm
- real (kind=kind_phys), pointer :: keepsmfr(:,:) => null() !< RUC LSM: frozen moisture in soil
- real (kind=kind_phys), pointer :: smois(:,:) => null() !< volumetric fraction of soil moisture for lsm
- real (kind=kind_phys), pointer :: tslb(:,:) => null() !< soil temperature for land surface model
- real (kind=kind_phys), pointer :: flag_frsoil(:,:) => null() !< RUC LSM: flag for frozen soil physics
+ real (kind=kind_phys), pointer :: wetness(:) => null() !< normalized soil wetness for lsm
+ real (kind=kind_phys), pointer :: sh2o(:,:) => null() !< volume fraction of unfrozen soil moisture for lsm
+ real (kind=kind_phys), pointer :: keepsmfr(:,:) => null() !< RUC LSM: frozen moisture in soil
+ real (kind=kind_phys), pointer :: smois(:,:) => null() !< volumetric fraction of soil moisture for lsm
+ real (kind=kind_phys), pointer :: tslb(:,:) => null() !< soil temperature for land surface model
+ real (kind=kind_phys), pointer :: flag_frsoil(:,:) => null() !< RUC LSM: flag for frozen soil physics
!
- real (kind=kind_phys), pointer :: clw_surf(:) => null() !< RUC LSM: moist cloud water mixing ratio at surface
- real (kind=kind_phys), pointer :: qwv_surf(:) => null() !< RUC LSM: water vapor mixing ratio at surface
- real (kind=kind_phys), pointer :: cndm_surf(:) => null() !< RUC LSM: surface condensation mass
- real (kind=kind_phys), pointer :: rhofr(:) => null() !< RUC LSM: density of frozen precipitation
- real (kind=kind_phys), pointer :: tsnow(:) => null() !< RUC LSM: snow temperature at the bottom of the first soil layer
- real (kind=kind_phys), pointer :: snowfallac(:) => null() !< ruc lsm diagnostics
- real (kind=kind_phys), pointer :: acsnow(:) => null() !< ruc lsm diagnostics
+ real (kind=kind_phys), pointer :: clw_surf_land(:) => null() !< RUC LSM: moist cloud water mixing ratio at surface over land
+ real (kind=kind_phys), pointer :: clw_surf_ice(:) => null() !< RUC LSM: moist cloud water mixing ratio at surface over ice
+ real (kind=kind_phys), pointer :: qwv_surf_land(:) => null() !< RUC LSM: water vapor mixing ratio at surface over land
+ real (kind=kind_phys), pointer :: qwv_surf_ice(:) => null() !< RUC LSM: water vapor mixing ratio at surface over ice
+ real (kind=kind_phys), pointer :: rhofr(:) => null() !< RUC LSM: density of frozen precipitation
+ real (kind=kind_phys), pointer :: tsnow_land(:) => null() !< RUC LSM: snow temperature at the bottom of the first snow layer over land
+ real (kind=kind_phys), pointer :: tsnow_ice(:) => null() !< RUC LSM: snow temperature at the bottom of the first snow layer over ice
+ real (kind=kind_phys), pointer :: snowfallac_land(:) => null() !< ruc lsm diagnostics over land
+ real (kind=kind_phys), pointer :: snowfallac_ice(:) => null() !< ruc lsm diagnostics over ice
! MYNN surface layer
real (kind=kind_phys), pointer :: ustm (:) => null() !u* including drag
@@ -361,7 +368,7 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: chs2(:) => null() !exch coeff for heat at 2m
real (kind=kind_phys), pointer :: cqs2(:) => null() !exch coeff for moisture at 2m
real (kind=kind_phys), pointer :: lh(:) => null() !latent heating at the surface
-
+
!---- precipitation amounts from previous time step for RUC LSM/NoahMP LSM
real (kind=kind_phys), pointer :: raincprv (:) => null() !< explicit rainfall from previous timestep
real (kind=kind_phys), pointer :: rainncprv (:) => null() !< convective_precipitation_amount from previous timestep
@@ -526,8 +533,8 @@ module GFS_typedefs
integer :: nlunit !< unit for namelist
character(len=64) :: fn_nml !< namelist filename for surface data cycling
character(len=256), pointer :: input_nml_file(:) !< character string containing full namelist
- !< for use with internal file reads
- integer :: input_nml_file_length
+ !< for use with internal file reads
+ integer :: input_nml_file_length !< length (number of lines) in namelist for internal reads
integer :: logunit
real(kind=kind_phys) :: fhzero !< hours between clearing of diagnostic buckets
logical :: ldiag3d !< flag for 3d diagnostic fields
@@ -553,11 +560,11 @@ module GFS_typedefs
integer :: nx !< number of points in the i-dir for this MPI-domain
integer :: ny !< number of points in the j-dir for this MPI-domain
integer :: levs !< number of vertical levels
- integer :: levsp1 !< number of vertical levels plus one
- integer :: levsm1 !< number of vertical levels minus one
!--- ak/bk for pressure level calculations
real(kind=kind_phys), pointer :: ak(:) !< from surface (k=1) to TOA (k=levs)
real(kind=kind_phys), pointer :: bk(:) !< from surface (k=1) to TOA (k=levs)
+ integer :: levsp1 !< number of vertical levels plus one
+ integer :: levsm1 !< number of vertical levels minus one
integer :: cnx !< number of points in the i-dir for this cubed-sphere face
integer :: cny !< number of points in the j-dir for this cubed-sphere face
integer :: lonr !< number of global points in x-dir (i) along the equator
@@ -636,16 +643,17 @@ module GFS_typedefs
!< =1 => sub-grid cloud with prescribed seeds
!< =2 => sub-grid cloud with randomly generated
!< seeds
- integer :: idcor !< Decorrelation length type for overlap assumption
- !< =0 => Use constant decorrelation length, decorr_con
- !< =1 => Use spatially varying decorrelation length (Hogan et al. 2010)
- !< =2 => Use spatially and temporally varyint decorrelation length (Oreopoulos et al. 2012)
+ integer :: idcor !< Decorrelation length type for overlap assumption
+ !< =0 => Use constant decorrelation length, decorr_con
+ !< =1 => Use spatially varying decorrelation length (Hogan et al. 2010)
+ !< =2 => Use spatially and temporally varyint decorrelation length (Oreopoulos et al. 2012)
real(kind_phys) :: dcorr_con !< Decorrelation length constant (km) (if idcor = 0)
logical :: crick_proof !< CRICK-Proof cloud water
logical :: ccnorm !< Cloud condensate normalized by cloud cover
logical :: norad_precip !< radiation precip flag for Ferrier/Moorthi
logical :: lwhtr !< flag to output lw heating rate (Radtend%lwhc)
logical :: swhtr !< flag to output sw heating rate (Radtend%swhc)
+
! RRTMGP
logical :: do_RRTMGP !< Use RRTMGP
character(len=128) :: active_gases !< Character list of active gases used in RRTMGP
@@ -659,17 +667,18 @@ module GFS_typedefs
character(len=128) :: sw_file_clouds !< RRTMGP file containing coefficients used to compute clouds optical properties
integer :: rrtmgp_nBandsSW !< Number of RRTMGP SW bands.
integer :: rrtmgp_nGptsSW !< Number of RRTMGP SW spectral points.
- logical :: doG_cldoptics !< Use legacy RRTMG cloud-optics?
- logical :: doGP_cldoptics_PADE !< Use RRTMGP cloud-optics: PADE approximation?
- logical :: doGP_cldoptics_LUT !< Use RRTMGP cloud-optics: LUTs?
+ logical :: doG_cldoptics !< Use legacy RRTMG cloud-optics?
+ logical :: doGP_cldoptics_PADE !< Use RRTMGP cloud-optics: PADE approximation?
+ logical :: doGP_cldoptics_LUT !< Use RRTMGP cloud-optics: LUTs?
integer :: rrtmgp_nrghice !< Number of ice-roughness categories
integer :: rrtmgp_nGauss_ang !< Number of angles used in Gaussian quadrature
logical :: do_GPsw_Glw !< If set to true use rrtmgp for SW calculation, rrtmg for LW.
character(len=128) :: active_gases_array(100) !< character array for each trace gas name
logical :: use_LW_jacobian !< If true, use Jacobian of LW to update radiation tendency.
logical :: doGP_lwscat !< If true, include scattering in longwave cloud-optics, only compatible w/ GP cloud-optics
+
!--- microphysical switch
- integer :: ncld !< choice of cloud scheme
+ integer :: ncld !< choice of cloud scheme
!--- new microphysical switch
integer :: imp_physics !< choice of microphysics scheme
integer :: imp_physics_gfdl = 11 !< choice of GFDL microphysics scheme
@@ -760,11 +769,13 @@ module GFS_typedefs
integer :: isot !< isot = 0 => Zobler soil type ( 9 category)
!< isot = 1 => STATSGO soil type (19 category, AKA 'STAS'(?))
!< isot = 2 => STAS-RUC soil type (19 category, NOAH WRFv4 only)
- integer :: kice=2 !< number of layers in sice
+ integer :: kice !< number of layers in sice
integer :: lsoil_lsm !< number of soil layers internal to land surface model
integer :: lsnow_lsm !< maximum number of snow layers internal to land surface model
integer :: lsnow_lsm_lbound!< lower bound for snow arrays, depending on lsnow_lsm
- real(kind=kind_phys), pointer :: zs(:) => null() !< depth of soil levels for land surface model
+ real(kind=kind_phys), pointer :: zs(:) => null() !< depth of soil levels for land surface model
+ real(kind=kind_phys), pointer :: pores(:) => null() !< max soil moisture for a given soil type for land surface model
+ real(kind=kind_phys), pointer :: resid(:) => null() !< min soil moisture for a given soil type for land surface model
logical :: rdlai !< read LAI from input file (for RUC LSM or NOAH LSM WRFv4)
logical :: ua_phys !< flag for using University of Arizona? extension to NOAH LSM WRFv4
logical :: usemonalb !< flag to read surface diffused shortwave albedo from input file for NOAH LSM WRFv4
@@ -776,8 +787,8 @@ module GFS_typedefs
integer :: iopt_thcnd !< option to treat thermal conductivity in Noah LSM (new in 3.8)
!< = 1, original (default)
!< = 2, McCumber and Pielke for silt loam and sandy loam
- ! -- the Noah MP options
+ ! -- the Noah MP options
integer :: iopt_dveg ! 1-> off table lai 2-> on 3-> off;4->off;5 -> on
integer :: iopt_crs !canopy stomatal resistance (1-> ball-berry; 2->jarvis)
integer :: iopt_btr !soil moisture factor for stomatal resistance (1-> noah; 2-> clm; 3-> ssib)
@@ -798,7 +809,7 @@ module GFS_typedefs
logical :: pert_cd !< flag for perturbing the surface drag coefficient for momentum in surface layer scheme (1 = True)
integer :: ntsflg !< flag for updating skin temperature in the GFDL surface layer scheme
real(kind=kind_phys) :: sfenth !< enthalpy flux factor 0 zot via charnock ..>0 zot enhanced>15m/s
-
+
!--- flake model parameters
integer :: lkm !< flag for flake model
@@ -851,8 +862,9 @@ module GFS_typedefs
logical :: dspheat !< flag for tke dissipative heating
logical :: hurr_pbl !< flag for hurricane-specific options in PBL scheme
logical :: lheatstrg !< flag for canopy heat storage parameterization
- logical :: cnvcld
+ logical :: cnvcld
logical :: random_clds !< flag controls whether clouds are random
+
logical :: shal_cnv !< flag for calling shallow convection
logical :: do_deep !< whether to do deep convection
integer :: imfshalcnv !< flag for mass-flux shallow convection scheme
@@ -885,6 +897,7 @@ module GFS_typedefs
!< 1: updated version of satmedmf (as of May 2019)
integer :: isatmedmf_vdif = 0 !< flag for initial version of satmedmf (Nov. 2018)
integer :: isatmedmf_vdifq = 1 !< flag for updated version of satmedmf (as of May 2019)
+
integer :: nmtvr !< number of topographic variables such as variance etc
!< used in the GWD parameterization - 10 more added if
!< GSL orographic drag scheme is used
@@ -909,6 +922,7 @@ module GFS_typedefs
integer :: seed0 !< random seed for radiation
real(kind=kind_phys) :: rbcr !< Critical Richardson Number in the PBL scheme
+
!--- MYNN parameters/switches
logical :: do_mynnedmf
logical :: do_mynnsfclay
@@ -1041,6 +1055,8 @@ module GFS_typedefs
integer :: skeb_npass
integer :: lndp_type
integer :: n_var_lndp
+ logical :: lndp_each_step ! flag to indicate that land perturbations are applied at every time step,
+ ! otherwise they are applied only after gcycle is run
character(len=3) :: lndp_var_list(6) ! dimension here must match n_var_max_lndp in stochy_nml_def
real(kind=kind_phys) :: lndp_prt_list(6) ! dimension here must match n_var_max_lndp in stochy_nml_def
! also previous code had dimension 5 for each pert, to allow
@@ -1102,9 +1118,10 @@ module GFS_typedefs
integer :: nqvdelt !< the index of specific humidity at the previous timestep for Z-C MP in phy_f3d
integer :: nps2delt !< the index of surface air pressure 2 timesteps back for Z-C MP in phy_f2d
integer :: npsdelt !< the index of surface air pressure at the previous timestep for Z-C MP in phy_f2d
+ integer :: ncnvwind !< the index of surface wind enhancement due to convection for MYNN SFC and RAS CNV in phy f2d
!--- debug flag
- logical :: debug
+ logical :: debug
logical :: pre_rad !< flag for testing purpose
!--- variables modified at each time step
@@ -1228,9 +1245,10 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: ccn_nm (:,:) => null() !< CCN number concentration
real (kind=kind_phys), pointer :: aer_nm (:,:,:) => null() !< GOCART aerosol climo
- !--- active when ((.not. newsas .or. cal_pre) .and. random_clds)
integer, pointer :: imap (:) => null() !< map of local index ix to global index i for this block
integer, pointer :: jmap (:) => null() !< map of local index ix to global index j for this block
+
+ !--- active when ((.not. newsas .or. cal_pre) .and. random_clds)
real (kind=kind_phys), pointer :: rann (:,:) => null() !< random number array (0-1)
!--- In/Out
@@ -1338,7 +1356,7 @@ module GFS_typedefs
!--- Out (radiation only)
real (kind=kind_phys), pointer :: htrsw (:,:) => null() !< swh total sky sw heating rate in k/sec
real (kind=kind_phys), pointer :: htrlw (:,:) => null() !< hlw total sky lw heating rate in k/sec
- real (kind=kind_phys), pointer :: sfalb (:) => null() !< mean surface diffused sw albedo
+ real (kind=kind_phys), pointer :: sfalb (:) => null() !< mean surface diffused sw albedo
real (kind=kind_phys), pointer :: coszen(:) => null() !< mean cos of zenith angle over rad call period
real (kind=kind_phys), pointer :: tsflw (:) => null() !< surface air temp during lw calculation in k
@@ -1425,7 +1443,7 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: totsnwb(:) => null() !< accumulated snow precipitation in bucket (kg/m2)
real (kind=kind_phys), pointer :: totgrpb(:) => null() !< accumulated graupel precipitation in bucket (kg/m2)
- !--- MYNN variables
+ !--- MYNN variables
real (kind=kind_phys), pointer :: edmf_a (:,:) => null() !
real (kind=kind_phys), pointer :: edmf_w (:,:) => null() !
real (kind=kind_phys), pointer :: edmf_qt (:,:) => null() !
@@ -1523,8 +1541,8 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: det_mf (:,:) => null() !< instantaneous convective detrainment mass flux
real (kind=kind_phys), pointer :: cldcov (:,:) => null() !< instantaneous 3D cloud fraction
!--- F-A MP scheme
- real (kind=kind_phys), pointer :: TRAIN (:,:) => null() !< accumulated stratiform T tendency (K s-1)
- real (kind=kind_phys), pointer :: cldfra (:,:) => null() !< instantaneous 3D cloud fraction
+ real (kind=kind_phys), pointer :: train (:,:) => null() !< accumulated stratiform T tendency (K s-1)
+ real (kind=kind_phys), pointer :: cldfra (:,:) => null() !< instantaneous 3D cloud fraction
!--- MP quantities for 3D diagnositics
real (kind=kind_phys), pointer :: refl_10cm(:,:) => null() !< instantaneous refl_10cm
@@ -1572,15 +1590,15 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: gwp_scheat(:,:) => null() ! instant shal-conv heat tendency
real (kind=kind_phys), pointer :: gwp_dcheat(:,:) => null() ! instant deep-conv heat tendency
- real (kind=kind_phys), pointer :: gwp_precip(:) => null() ! total precip rates
- integer , pointer :: gwp_klevs(:,:)=> null() ! instant levels for GW-launches
- real (kind=kind_phys), pointer :: gwp_fgf(:) => null() ! fgf triggers
- real (kind=kind_phys), pointer :: gwp_okw(:) => null() ! okw triggers
-
- real (kind=kind_phys), pointer :: gwp_ax(:,:) => null() ! instant total UGWP tend m/s/s EW
- real (kind=kind_phys), pointer :: gwp_ay(:,:) => null() ! instant total UGWP tend m/s/s NS
- real (kind=kind_phys), pointer :: gwp_dtdt(:,:) => null() ! instant total heat tend K/s
- real (kind=kind_phys), pointer :: gwp_kdis(:,:) => null() ! instant total eddy mixing m2/s
+ real (kind=kind_phys), pointer :: gwp_precip(:) => null() ! total precip rates
+ integer , pointer :: gwp_klevs(:,:) => null() ! instant levels for GW-launches
+ real (kind=kind_phys), pointer :: gwp_fgf(:) => null() ! fgf triggers
+ real (kind=kind_phys), pointer :: gwp_okw(:) => null() ! okw triggers
+
+ real (kind=kind_phys), pointer :: gwp_ax(:,:) => null() ! instant total UGWP tend m/s/s EW
+ real (kind=kind_phys), pointer :: gwp_ay(:,:) => null() ! instant total UGWP tend m/s/s NS
+ real (kind=kind_phys), pointer :: gwp_dtdt(:,:) => null() ! instant total heat tend K/s
+ real (kind=kind_phys), pointer :: gwp_kdis(:,:) => null() ! instant total eddy mixing m2/s
real (kind=kind_phys), pointer :: gwp_axc(:,:) => null() ! instant con-UGWP tend m/s/s EW
real (kind=kind_phys), pointer :: gwp_ayc(:,:) => null() ! instant con-UGWP tend m/s/s NS
real (kind=kind_phys), pointer :: gwp_axo(:,:) => null() ! instant oro-UGWP tend m/s/s EW
@@ -1588,18 +1606,18 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: gwp_axf(:,:) => null() ! instant jet-UGWP tend m/s/s EW
real (kind=kind_phys), pointer :: gwp_ayf(:,:) => null() ! instant jet-UGWP tend m/s/s NS
- real (kind=kind_phys), pointer :: uav_ugwp(:,:) => null() ! aver wind UAV from physics
- real (kind=kind_phys), pointer :: tav_ugwp(:,:) => null() ! aver temp UAV from physics
- real (kind=kind_phys), pointer :: du3dt_dyn(:,:) => null() ! U Tend-dynamics "In"-"PhysOut"
+ real (kind=kind_phys), pointer :: uav_ugwp(:,:) => null() ! aver wind UAV from physics
+ real (kind=kind_phys), pointer :: tav_ugwp(:,:) => null() ! aver temp UAV from physics
+ real (kind=kind_phys), pointer :: du3dt_dyn(:,:) => null() ! U Tend-dynamics "In"-"PhysOut"
!--- COODRE ORO diagnostics
- real (kind=kind_phys), pointer :: zmtb(:) => null() !
- real (kind=kind_phys), pointer :: zogw(:) => null() !
- real (kind=kind_phys), pointer :: zlwb(:) => null() !!
- real (kind=kind_phys), pointer :: tau_ogw(:) => null() !!
- real (kind=kind_phys), pointer :: tau_ngw(:) => null() !!
- real (kind=kind_phys), pointer :: tau_mtb(:) => null() !
- real (kind=kind_phys), pointer :: tau_tofd(:) => null() !
+ real (kind=kind_phys), pointer :: zmtb(:) => null() !
+ real (kind=kind_phys), pointer :: zogw(:) => null() !
+ real (kind=kind_phys), pointer :: zlwb(:) => null() !
+ real (kind=kind_phys), pointer :: tau_ogw(:) => null() !
+ real (kind=kind_phys), pointer :: tau_ngw(:) => null() !
+ real (kind=kind_phys), pointer :: tau_mtb(:) => null() !
+ real (kind=kind_phys), pointer :: tau_tofd(:) => null() !
!---vay-2018 UGWP-diagnostics
!--- Output diagnostics for coupled chemistry
@@ -1768,8 +1786,7 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: graupelmp(:) => null() !<
real (kind=kind_phys), pointer :: gwdcu(:,:) => null() !<
real (kind=kind_phys), pointer :: gwdcv(:,:) => null() !<
- integer :: h2o_coeff !<
- real (kind=kind_phys), pointer :: h2o_pres(:) => null() !<
+
real (kind=kind_phys), pointer :: hefac(:) => null() !<
real (kind=kind_phys), pointer :: hffac(:) => null() !<
real (kind=kind_phys), pointer :: hflxq(:) => null() !<
@@ -1803,8 +1820,6 @@ module GFS_typedefs
integer, pointer :: ktop(:) => null() !<
integer :: latidxprnt !<
integer :: levi !<
- integer :: levh2o !<
- integer :: levozp !<
integer :: lmk !<
integer :: lmp !<
integer, pointer :: mbota(:,:) => null() !<
@@ -1837,9 +1852,7 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: oc(:) => null() !<
real (kind=kind_phys), pointer :: olyr(:,:) => null() !<
logical , pointer :: otspt(:,:) => null() !<
- integer :: oz_coeff !<
integer :: oz_coeffp5 !<
- real (kind=kind_phys), pointer :: oz_pres(:) => null() !<
logical :: phys_hydrostatic !<
real (kind=kind_phys), pointer :: plvl(:,:) => null() !<
real (kind=kind_phys), pointer :: plyr(:,:) => null() !<
@@ -2288,6 +2301,9 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
allocate (Sfcprop%hice (IM))
allocate (Sfcprop%weasd (IM))
allocate (Sfcprop%sncovr (IM))
+ if (Model%lsm == Model%lsm_ruc) then
+ allocate (Sfcprop%sncovr_ice (IM))
+ end if
allocate (Sfcprop%canopy (IM))
allocate (Sfcprop%ffmm (IM))
allocate (Sfcprop%ffhh (IM))
@@ -2301,6 +2317,9 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
Sfcprop%hice = clear_val
Sfcprop%weasd = clear_val
Sfcprop%sncovr = clear_val
+ if (Model%lsm == Model%lsm_ruc) then
+ Sfcprop%sncovr_ice = clear_val
+ end if
Sfcprop%canopy = clear_val
Sfcprop%ffmm = clear_val
Sfcprop%ffhh = clear_val
@@ -2316,9 +2335,9 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
allocate (Sfcprop%th2m(IM))
allocate (Sfcprop%q2m (IM))
- Sfcprop%t2m = clear_val
+ Sfcprop%t2m = clear_val
Sfcprop%th2m = clear_val
- Sfcprop%q2m = clear_val
+ Sfcprop%q2m = clear_val
if (Model%nstf_name(1) > 0) then
allocate (Sfcprop%tref (IM))
@@ -2478,33 +2497,37 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
if (Model%lsm == Model%lsm_ruc) then
! For land surface models with different numbers of levels than the four NOAH levels
- allocate (Sfcprop%wetness (IM))
- allocate (Sfcprop%sh2o (IM,Model%lsoil_lsm))
- allocate (Sfcprop%keepsmfr (IM,Model%lsoil_lsm))
- allocate (Sfcprop%smois (IM,Model%lsoil_lsm))
- allocate (Sfcprop%tslb (IM,Model%lsoil_lsm))
- allocate (Sfcprop%flag_frsoil (IM,Model%lsoil_lsm))
- allocate (Sfcprop%clw_surf (IM))
- allocate (Sfcprop%qwv_surf (IM))
- allocate (Sfcprop%cndm_surf (IM))
- allocate (Sfcprop%rhofr (IM))
- allocate (Sfcprop%tsnow (IM))
- allocate (Sfcprop%snowfallac (IM))
- allocate (Sfcprop%acsnow (IM))
+ allocate (Sfcprop%wetness (IM))
+ allocate (Sfcprop%sh2o (IM,Model%lsoil_lsm))
+ allocate (Sfcprop%keepsmfr (IM,Model%lsoil_lsm))
+ allocate (Sfcprop%smois (IM,Model%lsoil_lsm))
+ allocate (Sfcprop%tslb (IM,Model%lsoil_lsm))
+ allocate (Sfcprop%flag_frsoil (IM,Model%lsoil_lsm))
+ allocate (Sfcprop%clw_surf_land (IM))
+ allocate (Sfcprop%clw_surf_ice (IM))
+ allocate (Sfcprop%qwv_surf_land (IM))
+ allocate (Sfcprop%qwv_surf_ice (IM))
+ allocate (Sfcprop%rhofr (IM))
+ allocate (Sfcprop%tsnow_land (IM))
+ allocate (Sfcprop%tsnow_ice (IM))
+ allocate (Sfcprop%snowfallac_land (IM))
+ allocate (Sfcprop%snowfallac_ice (IM))
!
- Sfcprop%wetness = clear_val
- Sfcprop%sh2o = clear_val
- Sfcprop%keepsmfr = clear_val
- Sfcprop%smois = clear_val
- Sfcprop%tslb = clear_val
- Sfcprop%clw_surf = clear_val
- Sfcprop%qwv_surf = clear_val
- Sfcprop%cndm_surf = clear_val
- Sfcprop%flag_frsoil = clear_val
- Sfcprop%rhofr = clear_val
- Sfcprop%tsnow = clear_val
- Sfcprop%snowfallac = clear_val
- Sfcprop%acsnow = clear_val
+ Sfcprop%wetness = clear_val
+ Sfcprop%sh2o = clear_val
+ Sfcprop%keepsmfr = clear_val
+ Sfcprop%smois = clear_val
+ Sfcprop%tslb = clear_val
+ Sfcprop%clw_surf_land = clear_val
+ Sfcprop%clw_surf_ice = clear_val
+ Sfcprop%qwv_surf_land = clear_val
+ Sfcprop%qwv_surf_ice = clear_val
+ Sfcprop%flag_frsoil = clear_val
+ Sfcprop%rhofr = clear_val
+ Sfcprop%tsnow_land = clear_val
+ Sfcprop%tsnow_ice = clear_val
+ Sfcprop%snowfallac_land = clear_val
+ Sfcprop%snowfallac_ice = clear_val
!
if (Model%rdlai) then
allocate (Sfcprop%xlaixy (IM))
@@ -2809,16 +2832,15 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
cnx, cny, gnx, gny, dt_dycore, &
dt_phys, iau_offset, idat, jdat, &
tracer_names, &
- input_nml_file, tile_num, blksz &
- ,ak, bk, restart, hydrostatic, &
- communicator, ntasks, nthreads &
- )
+ input_nml_file, tile_num, blksz, &
+ ak, bk, restart, hydrostatic, &
+ communicator, ntasks, nthreads)
!--- modules
use physcons, only: con_rerth, con_pi, con_p0, rhowater
use mersenne_twister, only: random_setseed, random_number
use parse_tracers, only: get_tracer_index
-
+!
implicit none
!--- interface variables
@@ -2947,15 +2969,14 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
character(len=128) :: sw_file_clouds = '' !< RRTMGP file containing coefficients used to compute clouds optical properties
integer :: rrtmgp_nBandsSW = 14 !< Number of RRTMGP SW bands.
integer :: rrtmgp_nGptsSW = 224 !< Number of RRTMGP SW spectral points.
- logical :: doG_cldoptics = .false. !< Use legacy RRTMG cloud-optics?
+ logical :: doG_cldoptics = .false. !< Use legacy RRTMG cloud-optics?
logical :: doGP_cldoptics_PADE = .false. !< Use RRTMGP cloud-optics: PADE approximation?
- logical :: doGP_cldoptics_LUT = .false. !< Use RRTMGP cloud-optics: LUTs?
+ logical :: doGP_cldoptics_LUT = .false. !< Use RRTMGP cloud-optics: LUTs?
integer :: rrtmgp_nrghice = 0 !< Number of ice-roughness categories
integer :: rrtmgp_nGauss_ang = 1 !< Number of angles used in Gaussian quadrature
logical :: do_GPsw_Glw = .false.
- logical :: use_LW_jacobian = .false. !< Use Jacobian of LW to update LW radiation tendencies.
+ logical :: use_LW_jacobian = .false. !< Use Jacobian of LW to update LW radiation tendencies.
logical :: doGP_lwscat = .false. !< If true, include scattering in longwave cloud-optics, only compatible w/ GP cloud-optics
-
!--- Z-C microphysical parameters
integer :: ncld = 1 !< choice of cloud scheme
integer :: imp_physics = 99 !< choice of cloud scheme
@@ -3028,6 +3049,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
integer :: iopt_thcnd = 1 !< option to treat thermal conductivity in Noah LSM (new in 3.8)
!< = 1, original (default)
!< = 2, McCumber and Pielke for silt loam and sandy loam
+ integer :: kice = 2 !< number of layers in ice; default is 2 (GFS sice)
integer :: ivegsrc = 2 !< ivegsrc = 0 => USGS,
!< ivegsrc = 1 => IGBP (20 category)
!< ivegsrc = 2 => UMD (13 category)
@@ -3133,6 +3155,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!< 0: initial version of satmedmf (Nov. 2018)
!< 1: updated version of satmedmf (as of May 2019)
logical :: do_deep = .true. !< whether to do deep convection
+
logical :: hwrf_samfdeep = .false. !< flag for HWRF SAMF deepcnv scheme
logical :: hwrf_samfshal = .false. !< flag for HWRF SAMF shalcnv scheme
logical :: do_mynnedmf = .false. !< flag for MYNN-EDMF
@@ -3302,8 +3325,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
logical :: do_shum = .false.
logical :: do_skeb = .false.
integer :: skeb_npass = 11
- integer :: lndp_type = 0
- integer :: n_var_lndp = 0
+ integer :: lndp_type = 0
+ integer :: n_var_lndp = 0
+ logical :: lndp_each_step = .false.
!--- aerosol scavenging factors
character(len=20) :: fscav_aero(20) = 'default'
@@ -3345,7 +3369,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!--- max hourly
avg_max_length, &
!--- land/surface model control
- lsm, lsoil, lsoil_lsm, lsnow_lsm, rdlai, &
+ lsm, lsoil, lsoil_lsm, lsnow_lsm, kice, rdlai, &
nmtvr, ivegsrc, use_ufo, iopt_thcnd, ua_phys, usemonalb, &
aoasis, fasdas, &
! Noah MP options
@@ -3375,7 +3399,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
do_deep, jcap, &
cs_parm, flgmin, cgwf, ccwf, cdmbgwd, sup, ctei_rm, crtrh, &
dlqf, rbcr, shoc_parm, psauras, prauras, wminras, &
- do_sppt, do_shum, do_skeb, lndp_type, n_var_lndp, &
+ do_sppt, do_shum, do_skeb, &
+ lndp_type, n_var_lndp, lndp_each_step, &
!--- Rayleigh friction
prslrd0, ral_ts, ldiag_ugwp, do_ugwp, do_tofd, &
! --- Ferrier-Aligo
@@ -3629,12 +3654,14 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
if (Model%me == Model%master .and. nhfrad>0) &
write(*,'(a,i0)') 'Number of high-frequency radiation calls for coldstart run: ', nhfrad
endif
+
if (levr < 0) then
Model%levr = levs
else
Model%levr = levr
endif
Model%levrp1 = Model%levr + 1
+
Model%nfxr = nfxr
Model%iccn = iccn
! further down: set Model%iccn to .false.
@@ -3669,7 +3696,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%ccnorm = ccnorm
Model%lwhtr = lwhtr
Model%swhtr = swhtr
- ! RRTMGP
+
+ ! RRTMGP
Model%do_RRTMGP = do_RRTMGP
Model%rrtmgp_nrghice = rrtmgp_nrghice
Model%rrtmgp_nGauss_ang = rrtmgp_nGauss_ang
@@ -3762,9 +3790,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!--- F-A MP parameters
Model%rhgrd = rhgrd
Model%spec_adv = spec_adv
- Model%icloud = icloud
+ Model%icloud = icloud
-!--- gfdl MP parameters
+!--- GFDL MP parameters
Model%lgfdlmprad = lgfdlmprad
!--- Thompson,GFDL MP parameter
Model%lrefres = lrefres
@@ -3772,6 +3800,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!--- land/surface model parameters
Model%lsm = lsm
Model%lsoil = lsoil
+
! Consistency check for HWRF Noah LSM
if (Model%lsm == Model%lsm_noah_wrfv4 .and. Model%nscyc>0) then
write(0,*) 'Logic error: NOAH WRFv4 LSM cannot be used with surface data cycling at this point (fhcyc>0)'
@@ -3794,6 +3823,14 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
allocate (Model%zs(Model%lsoil_lsm))
Model%zs = clear_val
end if
+ ! Set number of ice model layers
+ Model%kice = kice
+
+ ! Allocate variable for min/max soil moisture for a given soil type
+ allocate (Model%pores(30))
+ allocate (Model%resid(30))
+ Model%pores = clear_val
+ Model%resid = clear_val
!
if (lsnow_lsm /= 3) then
write(0,*) 'Logic error: NoahMP expects the maximum number of snow layers to be exactly 3 (see sfc_noahmp_drv.f)'
@@ -3875,6 +3912,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%oz_phys = oz_phys
Model%oz_phys_2015 = oz_phys_2015
Model%h2o_phys = h2o_phys
+
! To ensure that these values match what's in the physics,
! array sizes are compared during model init in GFS_phys_time_vary_init()
!
@@ -3886,6 +3924,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
levh2o = 1
h2o_coeff = 1
end if
+
Model%pdfcld = pdfcld
Model%shcnvcw = shcnvcw
Model%redrag = redrag
@@ -3919,8 +3958,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%wminras = wminras
Model%rbcr = rbcr
Model%do_gwd = maxval(Model%cdmbgwd) > 0.0
-
Model%do_cnvgwd = Model%cnvgwd .and. maxval(Model%cdmbgwd(3:4)) == 0.0
+
Model%do_mynnedmf = do_mynnedmf
Model%do_mynnsfclay = do_mynnsfclay
Model%bl_mynn_cloudpdf = bl_mynn_cloudpdf
@@ -4018,6 +4057,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%do_skeb = do_skeb
Model%lndp_type = lndp_type
Model%n_var_lndp = n_var_lndp
+ Model%lndp_each_step = lndp_each_step
!--- cellular automata options
Model%nca = nca
@@ -4051,11 +4091,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%iau_drymassfixer = iau_drymassfixer
if(Model%me==0) print *,' model init,iaufhrs=',Model%iaufhrs
- !--- debug flag
+!--- debug flag
Model%debug = debug
Model%pre_rad = pre_rad
- !--- tracer handling
+!--- tracer handling
Model%ntrac = size(tracer_names)
Model%ntracp1 = Model%ntrac + 1
allocate (Model%tracer_names(Model%ntrac))
@@ -4156,7 +4196,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
stop
else
levozp = 1
- oz_coeff = 0
+ oz_coeff = 1
end if
end if
@@ -4199,7 +4239,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!--- BEGIN CODE FROM GFS_PHYSICS_INITIALIZE
!--- define physcons module variables
- tem = con_rerth*con_rerth*(con_pi+con_pi)*con_pi
+ tem = con_rerth*con_rerth*(con_pi+con_pi)*con_pi
Model%dxmax = log(tem/(max_lon*max_lat))
Model%dxmin = log(tem/(min_lon*min_lat))
Model%dxinv = 1.0d0 / (Model%dxmax-Model%dxmin)
@@ -4226,6 +4266,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!--- BEGIN CODE FROM COMPNS_PHYSICS
!--- shoc scheme
if (do_shoc) then
+ if (Model%imp_physics == Model%imp_physics_thompson) then
+ print *,'SHOC is not currently compatible with Thompson MP -- shutting down'
+ stop
+ endif
Model%nshoc_3d = 3
Model%nshoc_2d = 0
Model%shal_cnv = .false.
@@ -4339,6 +4383,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
write(0,*) "Logic error: if NTDK deep convection is used, must also use NTDK shallow convection (and vice versa)"
stop
end if
+
if (.not. Model%cscnv) then
if (Model%ras) then
print *,' RAS Convection scheme used with ccwf=',Model%ccwf
@@ -4596,6 +4641,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
if(Model%do_shoc .or. Model%pdfcld .or. Model%do_mynnedmf) Model%cnvcld = .false.
if(Model%cnvcld) Model%ncnvcld3d = 1
+!--- get cnvwind index in phy_f2d; last entry in phy_f2d array
+ Model%ncnvwind = Model%num_p2d
+
!--- get cnvw and cnvc indices in phy_f3d
Model%ncnvw = -999
Model%ncnvc = -999
@@ -4859,6 +4907,9 @@ subroutine control_print(Model)
print *, ' usemonalb : ', Model%usemonalb
print *, ' aoasis : ', Model%aoasis
print *, ' fasdas : ', Model%fasdas
+ print *, ' kice : ', Model%kice
+ print *, ' shape(pores) : ', shape(Model%pores)
+ print *, ' shape(resid) : ', shape(Model%resid)
print *, ' ivegsrc : ', Model%ivegsrc
print *, ' isot : ', Model%isot
@@ -4910,6 +4961,8 @@ subroutine control_print(Model)
print *, ' shocaftcnv : ', Model%shocaftcnv
print *, ' shoc_cld : ', Model%shoc_cld
print *, ' uni_cld : ', Model%uni_cld
+ print *, ' oz_phys : ', Model%oz_phys
+ print *, ' oz_phys_2015 : ', Model%oz_phys_2015
print *, ' h2o_phys : ', Model%h2o_phys
print *, ' pdfcld : ', Model%pdfcld
print *, ' shcnvcw : ', Model%shcnvcw
@@ -5012,7 +5065,8 @@ subroutine control_print(Model)
print *, ' do_shum : ', Model%do_shum
print *, ' do_skeb : ', Model%do_skeb
print *, ' lndp_type : ', Model%lndp_type
- print *, ' n_var_lndp : ', Model%n_var_lndp
+ print *, ' n_var_lndp : ', Model%n_var_lndp
+ print *, ' lndp_each_step : ', Model%lndp_each_step
print *, ' '
print *, 'cellular automata'
print *, ' nca : ', Model%nca
@@ -5308,16 +5362,16 @@ subroutine tbd_create (Tbd, IM, Model)
if (Model%do_myjsfc.or.Model%do_myjpbl) then
!print*,"Allocating all MYJ surface variables:"
allocate (Tbd%phy_myj_qsfc (IM))
- allocate (Tbd%phy_myj_thz0 (IM))
- allocate (Tbd%phy_myj_qz0 (IM))
- allocate (Tbd%phy_myj_uz0 (IM))
- allocate (Tbd%phy_myj_vz0 (IM))
- allocate (Tbd%phy_myj_akhs (IM))
- allocate (Tbd%phy_myj_akms (IM))
- allocate (Tbd%phy_myj_chkqlm (IM))
- allocate (Tbd%phy_myj_elflx (IM))
- allocate (Tbd%phy_myj_a1u (IM))
- allocate (Tbd%phy_myj_a1t (IM))
+ allocate (Tbd%phy_myj_thz0 (IM))
+ allocate (Tbd%phy_myj_qz0 (IM))
+ allocate (Tbd%phy_myj_uz0 (IM))
+ allocate (Tbd%phy_myj_vz0 (IM))
+ allocate (Tbd%phy_myj_akhs (IM))
+ allocate (Tbd%phy_myj_akms (IM))
+ allocate (Tbd%phy_myj_chkqlm (IM))
+ allocate (Tbd%phy_myj_elflx (IM))
+ allocate (Tbd%phy_myj_a1u (IM))
+ allocate (Tbd%phy_myj_a1t (IM))
allocate (Tbd%phy_myj_a1q (IM))
!print*,"Allocating all MYJ schemes variables:"
Tbd%phy_myj_qsfc = clear_val
@@ -5522,7 +5576,7 @@ subroutine diag_create (Diag, IM, Model)
! F-A MP scheme
if (Model%imp_physics == Model%imp_physics_fer_hires) then
- allocate (Diag%TRAIN (IM,Model%levs))
+ allocate (Diag%train (IM,Model%levs))
end if
allocate (Diag%cldfra (IM,Model%levs))
@@ -5530,8 +5584,8 @@ subroutine diag_create (Diag, IM, Model)
allocate (Diag%ca_deep (IM))
allocate (Diag%ca_turb (IM))
allocate (Diag%ca_shal (IM))
- allocate (Diag%ca_rad (IM))
- allocate (Diag%ca_micro (IM))
+ allocate (Diag%ca_rad (IM))
+ allocate (Diag%ca_micro (IM))
!--- 3D diagnostics
if (Model%ldiag3d) then
@@ -5836,17 +5890,17 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center)
Diag%zmtnblck = zero
if (Model%imp_physics == Model%imp_physics_fer_hires) then
- Diag%TRAIN = zero
+ Diag%train = zero
end if
Diag%cldfra = zero
-
+
Diag%totprcpb = zero
Diag%cnvprcpb = zero
Diag%toticeb = zero
Diag%totsnwb = zero
Diag%totgrpb = zero
-!
-!--- MYNN variables:
+
+ !--- MYNN variables:
if (Model%do_mynnedmf) then
if (Model%bl_mynn_output .ne. 0) then
Diag%edmf_a = clear_val
@@ -5866,7 +5920,7 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center)
Diag%exch_h = clear_val
Diag%exch_m = clear_val
endif
-!
+
if (Model%do_ca) then
Diag%ca1 = zero
Diag%ca2 = zero
@@ -6017,6 +6071,7 @@ subroutine diag_chem_init(Diag, IM, Model)
! -- get number of tracers with enabled diagnostics
n = count(Model%ntdiag)
Diag%ntchmdiag = n
+
! -- initialize sedimentation
allocate (Diag%sedim(IM,n))
Diag%sedim = zero
@@ -6205,7 +6260,6 @@ subroutine interstitial_create (Interstitial, IM, Model)
allocate (Interstitial%gflx_ocean (IM))
allocate (Interstitial%gwdcu (IM,Model%levs))
allocate (Interstitial%gwdcv (IM,Model%levs))
- allocate (Interstitial%h2o_pres (levh2o))
allocate (Interstitial%hefac (IM))
allocate (Interstitial%hffac (IM))
allocate (Interstitial%hflxq (IM))
@@ -6234,7 +6288,6 @@ subroutine interstitial_create (Interstitial, IM, Model)
allocate (Interstitial%oa4 (IM,4))
allocate (Interstitial%oc (IM))
allocate (Interstitial%olyr (IM,Model%levr+LTP))
- allocate (Interstitial%oz_pres (levozp))
allocate (Interstitial%plvl (IM,Model%levr+1+LTP))
allocate (Interstitial%plyr (IM,Model%levr+LTP))
allocate (Interstitial%prnum (IM,Model%levs))
@@ -6480,23 +6533,18 @@ subroutine interstitial_create (Interstitial, IM, Model)
Interstitial%ipr = min(IM,10)
Interstitial%latidxprnt = 1
Interstitial%levi = Model%levs+1
- Interstitial%levh2o = levh2o
- Interstitial%levozp = levozp
Interstitial%lmk = Model%levr+LTP
Interstitial%lmp = Model%levr+1+LTP
- Interstitial%h2o_coeff = h2o_coeff
Interstitial%nbdlw = NBDLW
Interstitial%nbdsw = NBDSW
Interstitial%nf_aelw = NF_AELW
Interstitial%nf_aesw = NF_AESW
Interstitial%nspc1 = NSPC1
- Interstitial%oz_coeff = oz_coeff
- Interstitial%oz_coeffp5 = oz_coeff+5
- ! h2o_pres and oz_pres do not change during the run, but
- ! need to be set later in GFS_phys_time_vary_init (after
- ! h2o_pres/oz_pres are read in read_h2odata/read_o3data)
- Interstitial%h2o_pres = clear_val
- Interstitial%oz_pres = clear_val
+ if (Model%oz_phys .or. Model%oz_phys_2015) then
+ Interstitial%oz_coeffp5 = oz_coeff+5
+ else
+ Interstitial%oz_coeffp5 = 5
+ endif
!
Interstitial%skip_macro = .false.
! The value phys_hydrostatic from dynamics does not match the
@@ -7130,14 +7178,10 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno)
! Print static variables
write (0,'(a,3i6)') 'Interstitial_print for mpirank, omprank, blkno: ', mpirank, omprank, blkno
write (0,*) 'Interstitial_print: values that do not change'
- write (0,*) 'Interstitial%h2o_coeff = ', Interstitial%h2o_coeff
- write (0,*) 'sum(Interstitial%h2o_pres) = ', sum(Interstitial%h2o_pres)
write (0,*) 'Interstitial%ipr = ', Interstitial%ipr
write (0,*) 'Interstitial%itc = ', Interstitial%itc
write (0,*) 'Interstitial%latidxprnt = ', Interstitial%latidxprnt
write (0,*) 'Interstitial%levi = ', Interstitial%levi
- write (0,*) 'Interstitial%levh2o = ', Interstitial%levh2o
- write (0,*) 'Interstitial%levozp = ', Interstitial%levozp
write (0,*) 'Interstitial%lmk = ', Interstitial%lmk
write (0,*) 'Interstitial%lmp = ', Interstitial%lmp
write (0,*) 'Interstitial%nbdlw = ', Interstitial%nbdlw
@@ -7149,8 +7193,6 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno)
write (0,*) 'Interstitial%nspc1 = ', Interstitial%nspc1
write (0,*) 'Interstitial%ntiwx = ', Interstitial%ntiwx
write (0,*) 'Interstitial%nvdiff = ', Interstitial%nvdiff
- write (0,*) 'Interstitial%oz_coeff = ', Interstitial%oz_coeff
- write (0,*) 'sum(Interstitial%oz_pres) = ', sum(Interstitial%oz_pres)
write (0,*) 'Interstitial%phys_hydrostatic = ', Interstitial%phys_hydrostatic
write (0,*) 'Interstitial%skip_macro = ', Interstitial%skip_macro
write (0,*) 'Interstitial%trans_aero = ', Interstitial%trans_aero
diff --git a/scm/src/GFS_typedefs.meta b/scm/src/GFS_typedefs.meta
index f8bd89cd5..197f164cc 100644
--- a/scm/src/GFS_typedefs.meta
+++ b/scm/src/GFS_typedefs.meta
@@ -20,6 +20,13 @@
dimensions = (horizontal_loop_extent,vertical_dimension_plus_one)
type = real
kind = kind_phys
+[prsi(:,1)]
+ standard_name = air_pressure_at_lowest_model_interface
+ long_name = air pressure at lowest model interface
+ units = Pa
+ dimensions = (horizontal_loop_extent)
+ type = real
+ kind = kind_phys
[prsik]
standard_name = dimensionless_exner_function_at_model_interfaces
long_name = dimensionless Exner function at model layer interfaces
@@ -607,6 +614,14 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
+[sncovr_ice]
+ standard_name = surface_snow_area_fraction_over_ice
+ long_name = surface snow area fraction over ice
+ units = frac
+ dimensions = (horizontal_loop_extent)
+ type = real
+ kind = kind_phys
+ active = (flag_for_land_surface_scheme == flag_for_ruc_land_surface_scheme)
[snoalb]
standard_name = upper_bound_on_max_albedo_over_deep_snow
long_name = maximum snow albedo
@@ -1281,27 +1296,35 @@
dimensions = (horizontal_loop_extent,soil_vertical_dimension_for_land_surface_model)
type = real
kind = kind_phys
- active = (flag_for_land_surface_scheme == flag_for_ruc_land_surface_scheme)
-[clw_surf]
- standard_name = cloud_condensed_water_mixing_ratio_at_surface
- long_name = moist cloud water mixing ratio at surface
+ active = (flag_for_land_surface_scheme == flag_for_ruc_land_surface_scheme)
+[clw_surf_land]
+ standard_name = cloud_condensed_water_mixing_ratio_at_surface_over_land
+ long_name = moist cloud water mixing ratio at surface over land
units = kg kg-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
- active = (flag_for_land_surface_scheme == flag_for_ruc_land_surface_scheme)
-[qwv_surf]
- standard_name = water_vapor_mixing_ratio_at_surface
- long_name = water vapor mixing ratio at surface
+ active = (flag_for_land_surface_scheme == flag_for_ruc_land_surface_scheme)
+[clw_surf_ice]
+ standard_name = cloud_condensed_water_mixing_ratio_at_surface_over_ice
+ long_name = moist cloud water mixing ratio at surface over ice
units = kg kg-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (flag_for_land_surface_scheme == flag_for_ruc_land_surface_scheme)
-[cndm_surf]
- standard_name = surface_condensation_mass
- long_name = surface condensation mass
- units = kg m-2
+[qwv_surf_land]
+ standard_name = water_vapor_mixing_ratio_at_surface_over_land
+ long_name = water vapor mixing ratio at surface over land
+ units = kg kg-1
+ dimensions = (horizontal_loop_extent)
+ type = real
+ kind = kind_phys
+ active = (flag_for_land_surface_scheme == flag_for_ruc_land_surface_scheme)
+[qwv_surf_ice]
+ standard_name = water_vapor_mixing_ratio_at_surface_over_ice
+ long_name = water vapor mixing ratio at surface over ice
+ units = kg kg-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
@@ -1322,25 +1345,33 @@
type = real
kind = kind_phys
active = (flag_for_land_surface_scheme == flag_for_ruc_land_surface_scheme)
-[tsnow]
- standard_name = snow_temperature_bottom_first_layer
- long_name = snow temperature at the bottom of the first snow layer
+[tsnow_land]
+ standard_name = snow_temperature_bottom_first_layer_over_land
+ long_name = snow temperature at the bottom of the first snow layer over land
+ units = K
+ dimensions = (horizontal_loop_extent)
+ type = real
+ kind = kind_phys
+ active = (flag_for_land_surface_scheme == flag_for_ruc_land_surface_scheme)
+[tsnow_ice]
+ standard_name = snow_temperature_bottom_first_layer_over_ice
+ long_name = snow temperature at the bottom of the first snow layer over ice
units = K
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (flag_for_land_surface_scheme == flag_for_ruc_land_surface_scheme)
-[snowfallac]
- standard_name = total_accumulated_snowfall
+[snowfallac_land]
+ standard_name = total_accumulated_snowfall_over_land
long_name = run-total snow accumulation on the ground
units = kg m-2
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
- active = (flag_for_land_surface_scheme == flag_for_ruc_land_surface_scheme)
-[acsnow]
- standard_name = accumulated_water_equivalent_of_frozen_precip
- long_name = snow water equivalent of run-total frozen precip
+ active = (flag_for_land_surface_scheme == flag_for_ruc_land_surface_scheme)
+[snowfallac_ice]
+ standard_name = total_accumulated_snowfall_over_ice
+ long_name = run-total snow accumulation on the ice
units = kg m-2
dimensions = (horizontal_loop_extent)
type = real
@@ -3289,6 +3320,20 @@
type = real
kind = kind_phys
active = (flag_for_land_surface_scheme == flag_for_ruc_land_surface_scheme)
+[pores]
+ standard_name = maximum_soil_moisture_content_for_land_surface_model
+ long_name = maximum soil moisture for a given soil type for land surface model
+ units = m
+ dimensions = (30)
+ type = real
+ kind = kind_phys
+[resid]
+ standard_name = minimum_soil_moisture_content_for_land_surface_model
+ long_name = minimum soil moisture for a given soil type for land surface model
+ units = m
+ dimensions = (30)
+ type = real
+ kind = kind_phys
[rdlai]
standard_name = flag_for_reading_leaf_area_index_from_input
long_name = flag for reading leaf area index from initial conditions
@@ -3441,6 +3486,12 @@
units = index
dimensions = ()
type = integer
+[use_ufo]
+ standard_name = flag_for_gcycle_surface_option
+ long_name = flag for gcycle surface option
+ units = flag
+ dimensions = ()
+ type = logical
[lcurr_sf]
standard_name = flag_for_ocean_currents_in_surface_layer_scheme
long_name = flag for taking ocean currents into account in surface layer scheme
@@ -3961,6 +4012,12 @@
dimensions = ()
type = real
kind = kind_phys
+[nst_anl]
+ standard_name = flag_for_nsstm_analysis_in_gcycle
+ long_name = flag for NSSTM analysis in gcycle/sfcsub
+ units = flag
+ dimensions = ()
+ type = logical
[nstf_name(1)]
standard_name = flag_for_nsstm_run
long_name = NSSTM flag: off/uncoupled/coupled=0/1/2
@@ -4486,6 +4543,12 @@
units =
dimensions = ()
type = integer
+[ncnvwind]
+ standard_name = index_for_surface_wind_enhancement_due_to_convection
+ long_name = the index of surface wind enhancement due to convection in phy f2d
+ units =
+ dimensions = ()
+ type = integer
[debug]
standard_name = flag_debug
long_name = control flag for debug
@@ -4981,12 +5044,14 @@
units = index
dimensions = (horizontal_loop_extent)
type = integer
+ active = (index_for_ozone>0)
[jindx2_o3]
standard_name = upper_ozone_interpolation_index
long_name = interpolation high index for ozone
units = index
dimensions = (horizontal_loop_extent)
type = integer
+ active = (index_for_ozone>0)
[ddy_o3]
standard_name = ozone_interpolation_weight
long_name = interpolation high index for ozone
@@ -4994,18 +5059,21 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
+ active = (index_for_ozone>0)
[jindx1_h]
standard_name = lower_water_vapor_interpolation_index
long_name = interpolation low index for stratospheric water vapor
units = index
dimensions = (horizontal_loop_extent)
type = integer
+ active = (flag_for_stratospheric_water_vapor_physics)
[jindx2_h]
standard_name = upper_water_vapor_interpolation_index
long_name = interpolation high index for stratospheric water vapor
units = index
dimensions = (horizontal_loop_extent)
type = integer
+ active = (flag_for_stratospheric_water_vapor_physics)
[ddy_h]
standard_name = water_vapor_interpolation_weight
long_name = interpolation high index for stratospheric water vapor
@@ -5013,18 +5081,21 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
+ active = (flag_for_stratospheric_water_vapor_physics)
[jindx1_aer]
standard_name = lower_aerosol_y_interpolation_index
long_name = interpolation low index for prescribed aerosols in the y direction
units = index
dimensions = (horizontal_loop_extent)
type = integer
+ active = (flag_for_aerosol_input_MG_radiation)
[jindx2_aer]
standard_name = upper_aerosol_y_interpolation_index
long_name = interpolation high index for prescribed aerosols in the y direction
units = index
dimensions = (horizontal_loop_extent)
type = integer
+ active = (flag_for_aerosol_input_MG_radiation)
[ddy_aer]
standard_name = aerosol_y_interpolation_weight
long_name = interpolation high index for prescribed aerosols in the y direction
@@ -5032,18 +5103,21 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
+ active = (flag_for_aerosol_input_MG_radiation)
[iindx1_aer]
standard_name = lower_aerosol_x_interpolation_index
long_name = interpolation low index for prescribed aerosols in the x direction
units = index
dimensions = (horizontal_loop_extent)
type = integer
+ active = (flag_for_aerosol_input_MG_radiation)
[iindx2_aer]
standard_name = upper_aerosol_x_interpolation_index
long_name = interpolation high index for prescribed aerosols in the x direction
units = index
dimensions = (horizontal_loop_extent)
type = integer
+ active = (flag_for_aerosol_input_MG_radiation)
[ddx_aer]
standard_name = aerosol_x_interpolation_weight
long_name = interpolation high index for prescribed aerosols in the x direction
@@ -5051,18 +5125,21 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
+ active = (flag_for_aerosol_input_MG_radiation)
[jindx1_ci]
standard_name = lower_cloud_nuclei_y_interpolation_index
long_name = interpolation low index for ice and cloud condensation nuclei in the y direction
units = index
dimensions = (horizontal_loop_extent)
type = integer
+ active = (flag_for_in_ccn_forcing_for_morrison_gettelman_microphysics==1)
[jindx2_ci]
standard_name = upper_cloud_nuclei_y_interpolation_index
long_name = interpolation high index for ice and cloud condensation nuclei in the y direction
units = index
dimensions = (horizontal_loop_extent)
type = integer
+ active = (flag_for_in_ccn_forcing_for_morrison_gettelman_microphysics==1)
[ddy_ci]
standard_name = cloud_nuclei_y_interpolation_weight
long_name = interpolation high index for ice and cloud condensation nuclei in the y direction
@@ -5070,18 +5147,21 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
+ active = (flag_for_in_ccn_forcing_for_morrison_gettelman_microphysics==1)
[iindx1_ci]
standard_name = lower_cloud_nuclei_x_interpolation_index
long_name = interpolation low index for ice and cloud condensation nuclei in the x direction
units = index
dimensions = (horizontal_loop_extent)
type = integer
+ active = (flag_for_in_ccn_forcing_for_morrison_gettelman_microphysics==1)
[iindx2_ci]
standard_name = upper_cloud_nuclei_x_interpolation_index
long_name = interpolation high index for ice and cloud condensation nuclei in the x direction
units = index
dimensions = (horizontal_loop_extent)
type = integer
+ active = (flag_for_in_ccn_forcing_for_morrison_gettelman_microphysics==1)
[ddx_ci]
standard_name = cloud_nuclei_x_interpolation_weight
long_name = interpolation high index for ice and cloud condensation nuclei in the x direction
@@ -5089,6 +5169,7 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
+ active = (flag_for_in_ccn_forcing_for_morrison_gettelman_microphysics==1)
########################################################################
[ccpp-table-properties]
@@ -5234,6 +5315,7 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
+ active = (index_for_surface_air_pressure_two_timesteps_back > 0)
[phy_f2d(:,index_for_surface_air_pressure_at_previous_timestep)]
standard_name = surface_air_pressure_at_previous_timestep
long_name = surface air pressure at previous timestep
@@ -5241,13 +5323,15 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
-[phy_f2d(:,array_dimension_of_2d_arrays_for_microphysics)]
+ active = (index_for_surface_air_pressure_at_previous_timestep > 0)
+[phy_f2d(:,index_for_surface_wind_enhancement_due_to_convection)]
standard_name = surface_wind_enhancement_due_to_convection
long_name = surface wind enhancement due to convection
units = m s-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
+ active = (index_for_surface_wind_enhancement_due_to_convection > 0)
[phy_f3d(:,:,index_for_air_temperature_two_timesteps_back)]
standard_name = air_temperature_two_timesteps_back
long_name = air temperature two timesteps back
@@ -5255,6 +5339,7 @@
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
+ active = (index_for_air_temperature_two_timesteps_back > 0)
[phy_f3d(:,:,index_for_specific_humidity_two_timesteps_back)]
standard_name = water_vapor_specific_humidity_two_timesteps_back
long_name = water vapor specific humidity two timesteps back
@@ -5262,6 +5347,7 @@
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
+ active = (index_for_specific_humidity_two_timesteps_back > 0)
[phy_f3d(:,:,index_for_air_temperature_at_previous_timestep)]
standard_name = air_temperature_at_previous_timestep
long_name = air temperature at previous timestep
@@ -5269,6 +5355,7 @@
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
+ active = (index_for_air_temperature_at_previous_timestep > 0)
[phy_f3d(:,:,index_for_specific_humidity_at_previous_timestep)]
standard_name = water_vapor_specific_humidity_at_previous_timestep
long_name = water vapor specific humidity at previous timestep
@@ -5276,6 +5363,7 @@
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
+ active = (index_for_specific_humidity_at_previous_timestep > 0)
[phy_f3d(:,:,index_for_convective_cloud_water_mixing_ratio_in_phy_f3d)]
standard_name = convective_cloud_water_mixing_ratio_in_phy_f3d
long_name = convective cloud water mixing ratio in the phy_f3d array
@@ -5283,6 +5371,7 @@
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
+ active = (index_for_convective_cloud_water_mixing_ratio_in_phy_f3d > 0)
[phy_f3d(:,:,index_for_convective_cloud_cover_in_phy_f3d)]
standard_name = convective_cloud_cover_in_phy_f3d
long_name = convective cloud cover in the phy_f3d array
@@ -5290,6 +5379,7 @@
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
+ active = (index_for_convective_cloud_cover_in_phy_f3d > 0)
[phy_f3d(:,:,index_of_kinematic_buoyancy_flux_from_shoc_in_phy_f3d)]
standard_name = kinematic_buoyancy_flux_from_shoc
long_name = upward kinematic buoyancy flux from the SHOC scheme
@@ -5297,6 +5387,7 @@
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
+ active = (index_of_kinematic_buoyancy_flux_from_shoc_in_phy_f3d > 0)
[phy_f3d(:,:,index_of_atmosphere_heat_diffusivity_from_shoc_in_phy_f3d)]
standard_name = atmosphere_heat_diffusivity_from_shoc
long_name = diffusivity for heat from the SHOC scheme
@@ -5304,6 +5395,7 @@
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
+ active = (index_of_atmosphere_heat_diffusivity_from_shoc_in_phy_f3d > 0)
[phy_f3d(:,:,index_of_subgrid_scale_cloud_fraction_from_shoc_in_phy_f3d)]
standard_name = subgrid_scale_cloud_fraction_from_shoc
long_name = subgrid-scale cloud fraction from the SHOC scheme
@@ -5311,6 +5403,7 @@
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
+ active = (index_of_subgrid_scale_cloud_fraction_from_shoc_in_phy_f3d > 0)
[phy_f3d(:,:,index_for_cloud_fraction_in_3d_arrays_for_microphysics)]
standard_name = cloud_fraction_for_MG
long_name = cloud fraction used by Morrison-Gettelman MP
@@ -5318,6 +5411,7 @@
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
+ active = (index_for_cloud_fraction_in_3d_arrays_for_microphysics > 0)
[phy_f3d(:,:,index_for_cloud_liquid_water_effective_radius)]
standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um
long_name = eff. radius of cloud liquid water particle in micrometer
@@ -5325,6 +5419,7 @@
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
+ active = (index_for_cloud_liquid_water_effective_radius > 0)
[phy_f3d(:,:,index_for_ice_effective_radius)]
standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um
long_name = eff. radius of cloud ice water particle in micrometer
@@ -5332,6 +5427,7 @@
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
+ active = (index_for_ice_effective_radius > 0)
[phy_f3d(:,:,index_for_rain_effective_radius)]
standard_name = effective_radius_of_stratiform_cloud_rain_particle_in_um
long_name = effective radius of cloud rain particle in micrometers
@@ -5339,6 +5435,7 @@
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
+ active = (index_for_rain_effective_radius > 0)
[phy_f3d(:,:,index_for_snow_effective_radius)]
standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um
long_name = effective radius of cloud snow particle in micrometers
@@ -5346,6 +5443,7 @@
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
+ active = (index_for_snow_effective_radius > 0)
[phy_f3d(:,:,index_for_graupel_effective_radius)]
standard_name = effective_radius_of_stratiform_cloud_graupel_particle_in_um
long_name = eff. radius of cloud graupel particle in micrometer
@@ -5353,6 +5451,7 @@
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
+ active = (index_for_graupel_effective_radius > 0)
[forcet]
standard_name = temperature_tendency_due_to_dynamics
long_name = temperature tendency due to dynamics only
@@ -8431,19 +8530,6 @@
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
-[h2o_coeff]
- standard_name = number_of_coefficients_in_h2o_forcing_data
- long_name = number of coefficients in h2o forcing data
- units = index
- dimensions = ()
- type = integer
-[h2o_pres]
- standard_name = natural_log_of_h2o_forcing_data_pressure_levels
- long_name = natural log of h2o forcing data pressure levels
- units = log(Pa)
- dimensions = (vertical_dimension_of_h2o_forcing_data)
- type = real
- kind = kind_phys
[hefac]
standard_name = surface_upward_latent_heat_flux_reduction_factor
long_name = surface upward latent heat flux reduction factor from canopy heat storage
@@ -8642,18 +8728,6 @@
units = count
dimensions = ()
type = integer
-[levh2o]
- standard_name = vertical_dimension_of_h2o_forcing_data
- long_name = number of vertical layers in h2o forcing data
- units = count
- dimensions = ()
- type = integer
-[levozp]
- standard_name = vertical_dimension_of_ozone_forcing_data
- long_name = number of vertical layers in ozone forcing data
- units = count
- dimensions = ()
- type = integer
[lmk]
standard_name = adjusted_vertical_layer_dimension_for_radiation
long_name = adjusted number of vertical layers for radiation
@@ -8883,25 +8957,12 @@
units = flag
dimensions = (number_of_tracers_plus_one,2)
type = logical
-[oz_coeff]
- standard_name = number_of_coefficients_in_ozone_forcing_data
- long_name = number of coefficients in ozone forcing data
- units = index
- dimensions = ()
- type = integer
[oz_coeffp5]
standard_name = number_of_coefficients_in_ozone_forcing_data_plus_five
long_name = number of coefficients in ozone forcing data plus five
units = index
dimensions = ()
type = integer
-[oz_pres]
- standard_name = natural_log_of_ozone_forcing_data_pressure_levels
- long_name = natural log of ozone forcing data pressure levels
- units = log(Pa)
- dimensions = (vertical_dimension_of_ozone_forcing_data)
- type = real
- kind = kind_phys
[phys_hydrostatic]
standard_name = flag_for_hydrostatic_heating_from_physics
long_name = flag for use of hydrostatic heating in physics
@@ -9923,7 +9984,7 @@
standard_name = saturation_vapor_pressure
long_name = saturation vapor pressure
units = Pa
- dimensions = (horizontal_dimension,vertical_dimension)
+ dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
optional = F
@@ -9932,7 +9993,7 @@
standard_name = water_vapor_mixing_ratio
long_name = water vaport mixing ratio
units = kg/kg
- dimensions = (horizontal_dimension,vertical_dimension)
+ dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
optional = F
diff --git a/scm/src/gmtb_scm.F90 b/scm/src/gmtb_scm.F90
index 4dcb4a703..38549d146 100644
--- a/scm/src/gmtb_scm.F90
+++ b/scm/src/gmtb_scm.F90
@@ -16,9 +16,11 @@ subroutine gmtb_scm_main_sub()
use gmtb_scm_output
use gmtb_scm_type_defs
- use :: ccpp_static_api, &
- only: ccpp_physics_init, &
- ccpp_physics_run, &
+ use :: ccpp_static_api, &
+ only: ccpp_physics_init, &
+ ccpp_physics_timestep_init, &
+ ccpp_physics_run, &
+ ccpp_physics_timestep_finalize, &
ccpp_physics_finalize
@@ -28,7 +30,7 @@ subroutine gmtb_scm_main_sub()
type(scm_input_type), target :: scm_input
type(scm_reference_type), target :: scm_reference
- integer :: i, j, grid_error
+ integer :: i, j, grid_error, kdt_rad
real(kind=8) :: rinc(5) !(DAYS, HOURS, MINUTES, SECONDS, MILLISECONDS)
integer :: jdat(1:8)
@@ -272,11 +274,40 @@ subroutine gmtb_scm_main_sub()
endif
end do
- call ccpp_physics_run(cdata, suite_name=trim(trim(adjustl(scm_state%physics_suite_name))), ierr=ierr)
+ call ccpp_physics_timestep_init(cdata, suite_name=trim(adjustl(scm_state%physics_suite_name)), ierr=ierr)
+ if (ierr/=0) then
+ write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_timestep_init: ' // trim(cdata%errmsg) // '. Exiting...'
+ stop
+ end if
+
+ !--- determine if radiation diagnostics buckets need to be cleared
+ if (nint(physics%Model%fhzero*3600) >= nint(max(physics%Model%fhswr,physics%Model%fhlwr))) then
+ if (mod(physics%Model%kdt,physics%Model%nszero) == 1 .or. physics%Model%nszero == 1) then
+ call physics%Diag%rad_zero (physics%Model)
+ endif
+ else
+ kdt_rad = nint(min(physics%Model%fhswr,physics%Model%fhlwr)/physics%Model%dtp)
+ if (mod(physics%Model%kdt,kdt_rad) == 1) then
+ call physics%Diag%rad_zero (physics%Model)
+ endif
+ endif
+
+ !--- determine if physics diagnostics buckets need to be cleared
+ if (mod(physics%Model%kdt,physics%Model%nszero) == 1 .or. physics%Model%nszero == 1) then
+ call physics%Diag%phys_zero (physics%Model)
+ endif
+
+ call ccpp_physics_run(cdata, suite_name=trim(adjustl(scm_state%physics_suite_name)), ierr=ierr)
if (ierr/=0) then
write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_run: ' // trim(cdata%errmsg) // '. Exiting...'
stop
end if
+
+ call ccpp_physics_timestep_finalize(cdata, suite_name=trim(adjustl(scm_state%physics_suite_name)), ierr=ierr)
+ if (ierr/=0) then
+ write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_timestep_finalize: ' // trim(cdata%errmsg) // '. Exiting...'
+ stop
+ end if
!the filter routine (called after the following leapfrog time step) expects time level 2 in temp_tracer to be the updated, unfiltered state after the previous time step
scm_state%temp_tracer(:,:,:,2) = scm_state%state_tracer(:,:,:,2)
diff --git a/scm/src/gmtb_scm_time_integration.F90 b/scm/src/gmtb_scm_time_integration.F90
index f5012047b..e1e21ad8c 100644
--- a/scm/src/gmtb_scm_time_integration.F90
+++ b/scm/src/gmtb_scm_time_integration.F90
@@ -7,7 +7,11 @@ module gmtb_scm_time_integration
use gmtb_scm_forcing
use ccpp_api, only: ccpp_t
-use ccpp_static_api, only: ccpp_physics_run
+use :: ccpp_static_api, &
+ only: ccpp_physics_timestep_init, &
+ ccpp_physics_run, &
+ ccpp_physics_timestep_finalize
+
implicit none
@@ -57,7 +61,7 @@ subroutine do_time_step(scm_state, physics, cdata, in_spinup)
type(ccpp_t), intent(inout) :: cdata
logical, intent(in) :: in_spinup
- integer :: i, ierr
+ integer :: i, ierr, kdt_rad
!> \section do_time_step_alg Algorithm
!! @{
@@ -113,13 +117,42 @@ subroutine do_time_step(scm_state, physics, cdata, in_spinup)
endif
endif
end do
-
+
+ call ccpp_physics_timestep_init(cdata, suite_name=trim(adjustl(scm_state%physics_suite_name)), ierr=ierr)
+ if (ierr/=0) then
+ write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_timestep_init: ' // trim(cdata%errmsg) // '. Exiting...'
+ stop
+ end if
+
+ !--- determine if radiation diagnostics buckets need to be cleared
+ if (nint(physics%Model%fhzero*3600) >= nint(max(physics%Model%fhswr,physics%Model%fhlwr))) then
+ if (mod(physics%Model%kdt,physics%Model%nszero) == 1 .or. physics%Model%nszero == 1) then
+ call physics%Diag%rad_zero (physics%Model)
+ endif
+ else
+ kdt_rad = nint(min(physics%Model%fhswr,physics%Model%fhlwr)/physics%Model%dtp)
+ if (mod(physics%Model%kdt,kdt_rad) == 1) then
+ call physics%Diag%rad_zero (physics%Model)
+ endif
+ endif
+
+ !--- determine if physics diagnostics buckets need to be cleared
+ if (mod(physics%Model%kdt,physics%Model%nszero) == 1 .or. physics%Model%nszero == 1) then
+ call physics%Diag%phys_zero (physics%Model)
+ endif
+
call ccpp_physics_run(cdata, suite_name=trim(adjustl(scm_state%physics_suite_name)), ierr=ierr)
if (ierr/=0) then
write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_run: ' // trim(cdata%errmsg) // '. Exiting...'
stop
end if
+ call ccpp_physics_timestep_finalize(cdata, suite_name=trim(adjustl(scm_state%physics_suite_name)), ierr=ierr)
+ if (ierr/=0) then
+ write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_timestep_finalize: ' // trim(cdata%errmsg) // '. Exiting...'
+ stop
+ end if
+
!if no physics call, need to transfer state_variables(:,:,1) to state_variables (:,:,2)
! scm_state%state_T(:,:,2) = scm_state%state_T(:,:,1)
! scm_state%state_tracer(:,:,:,2) = scm_state%state_tracer(:,:,:,1)
diff --git a/scm/src/gmtb_scm_type_defs.F90 b/scm/src/gmtb_scm_type_defs.F90
index 010968f0c..0c6570512 100644
--- a/scm/src/gmtb_scm_type_defs.F90
+++ b/scm/src/gmtb_scm_type_defs.F90
@@ -1205,28 +1205,28 @@ subroutine physics_set(physics, scm_input, scm_state)
if ((scm_state%model_ics .or. scm_state%lsm_ics) .and. physics%Model%lsm == physics%Model%lsm_ruc) then !.and. warm_start (not implemented here -- assuming that RUC LSM has warm start data from file)
!--- Extra RUC LSM variables
- write(0,'(a)') "Setting internal physics variables from the RUC LSM section of the case input file (scalars)..."
- call conditionally_set_var(scm_input%input_wetness, physics%Sfcprop%wetness(i), "wetness", .false., missing_var(1))
- call conditionally_set_var(scm_input%input_clw_surf, physics%Sfcprop%clw_surf(i), "clw_surf", .false., missing_var(2))
- call conditionally_set_var(scm_input%input_qwv_surf, physics%Sfcprop%qwv_surf(i), "qwv_surf", .false., missing_var(3))
- call conditionally_set_var(scm_input%input_tsnow, physics%Sfcprop%tsnow(i), "tsnow", .false., missing_var(4))
- call conditionally_set_var(scm_input%input_snowfallac, physics%Sfcprop%snowfallac(i), "snowfallac", .false., missing_var(5))
- call conditionally_set_var(scm_input%input_acsnow, physics%Sfcprop%acsnow(i), "acsnow", .false., missing_var(6))
- if (physics%Model%lsm == physics%Model%lsm_ruc .and. physics%Model%rdlai) then
- !when rdlai = T, RUC LSM expects the LAI to be read in, hence the required variable attribute below
- call conditionally_set_var(scm_input%input_lai, physics%Sfcprop%xlaixy(i), "lai", .true., missing_var(7))
- end if
-
- !write out warning if missing data for non-required variables
- n = 7
- if ( i==1 .and. ANY( missing_var(1:n) ) ) then
- write(0,'(a)') "INPUT CHECK: Some missing input data was found related to (potentially non-required) surface variables for RUC LSM. This may lead to crashes or other strange behavior."
- write(0,'(a)') "Check gmtb_scm_type_defs.F90/physics_set to see the names of variables that are missing, corresponding to the following indices:"
- do j=1, n
- if (missing_var(j)) write(0,'(a,i0)') "variable index ",j
- end do
- end if
- missing_var = .false.
+ ! write(0,'(a)') "Setting internal physics variables from the RUC LSM section of the case input file (scalars)..."
+ ! call conditionally_set_var(scm_input%input_wetness, physics%Sfcprop%wetness(i), "wetness", .false., missing_var(1))
+ ! call conditionally_set_var(scm_input%input_clw_surf, physics%Sfcprop%clw_surf(i), "clw_surf", .false., missing_var(2))
+ ! call conditionally_set_var(scm_input%input_qwv_surf, physics%Sfcprop%qwv_surf(i), "qwv_surf", .false., missing_var(3))
+ ! call conditionally_set_var(scm_input%input_tsnow, physics%Sfcprop%tsnow(i), "tsnow", .false., missing_var(4))
+ ! call conditionally_set_var(scm_input%input_snowfallac, physics%Sfcprop%snowfallac(i), "snowfallac", .false., missing_var(5))
+ ! call conditionally_set_var(scm_input%input_acsnow, physics%Sfcprop%acsnow(i), "acsnow", .false., missing_var(6))
+ ! if (physics%Model%lsm == physics%Model%lsm_ruc .and. physics%Model%rdlai) then
+ ! !when rdlai = T, RUC LSM expects the LAI to be read in, hence the required variable attribute below
+ ! call conditionally_set_var(scm_input%input_lai, physics%Sfcprop%xlaixy(i), "lai", .true., missing_var(7))
+ ! end if
+ !
+ ! !write out warning if missing data for non-required variables
+ ! n = 7
+ ! if ( i==1 .and. ANY( missing_var(1:n) ) ) then
+ ! write(0,'(a)') "INPUT CHECK: Some missing input data was found related to (potentially non-required) surface variables for RUC LSM. This may lead to crashes or other strange behavior."
+ ! write(0,'(a)') "Check gmtb_scm_type_defs.F90/physics_set to see the names of variables that are missing, corresponding to the following indices:"
+ ! do j=1, n
+ ! if (missing_var(j)) write(0,'(a,i0)') "variable index ",j
+ ! end do
+ ! end if
+ ! missing_var = .false.
elseif ((scm_state%model_ics .or. scm_state%lsm_ics) .and. physics%Model%lsm == physics%Model%lsm_noahmp) then
write(0,'(a)') "Setting internal physics variables from the NoahMP section of the case input file (scalars)..."
!all of these can be missing, since a method exists to "cold start" these variables