diff --git a/CMakeLists.txt b/CMakeLists.txt
index 37285a443..d5013e53e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,13 +1,18 @@
if(CCPP)
+ if(DEBUG)
+ set(_ccpp_debug_arg "--debug")
+ endif()
if(DEFINED CCPP_SUITES)
set(_ccpp_suites_arg "--suites=${CCPP_SUITES}")
+ message("Calling CCPP code generator (ccpp_prebuild.py) for suites ${_ccpp_suites_arg} ...")
+ else()
+ message("Calling CCPP code generator (ccpp_prebuild.py) for all available suites ...")
endif()
- message("Calling CCPP code generator (ccpp_prebuild.py) ... ${_ccpp_suites_arg}")
execute_process(COMMAND ${Python_EXECUTABLE}
"ccpp/framework/scripts/ccpp_prebuild.py"
"--config=ccpp/config/ccpp_prebuild_config.py"
- "--builddir=${CMAKE_CURRENT_BINARY_DIR}" ${_ccpp_suites_arg}
+ "--builddir=${CMAKE_CURRENT_BINARY_DIR}" ${_ccpp_suites_arg} ${_ccpp_debug_arg}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/ccpp_prebuild.out
ERROR_FILE ${CMAKE_CURRENT_BINARY_DIR}/ccpp_prebuild.err
diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py
index 6d8693e62..f954a07f5 100755
--- a/ccpp/config/ccpp_prebuild_config.py
+++ b/ccpp/config/ccpp_prebuild_config.py
@@ -111,6 +111,8 @@
'ccpp/physics/physics/GFS_time_vary_pre.fv3.F90',
'ccpp/physics/physics/cires_ugwp.F90',
'ccpp/physics/physics/cires_ugwp_post.F90',
+ 'ccpp/physics/physics/unified_ugwp.F90',
+ 'ccpp/physics/physics/unified_ugwp_post.F90',
'ccpp/physics/physics/cnvc90.f',
'ccpp/physics/physics/cs_conv.F90',
'ccpp/physics/physics/cs_conv_aw_adj.F90',
@@ -157,6 +159,7 @@
'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',
diff --git a/ccpp/framework b/ccpp/framework
index dca1240e6..f1dc8d6f0 160000
--- a/ccpp/framework
+++ b/ccpp/framework
@@ -1 +1 @@
-Subproject commit dca1240e6f19a5bbcfa0b14aa8526f36e99ed135
+Subproject commit f1dc8d6f038e590508c272070f673d1fd7ea566f
diff --git a/ccpp/physics b/ccpp/physics
index 8ef88ca46..4e39b50a2 160000
--- a/ccpp/physics
+++ b/ccpp/physics
@@ -1 +1 @@
-Subproject commit 8ef88ca46c11535fc7984d39ec38d1582f9db5ff
+Subproject commit 4e39b50a248fc093c055fc6a8ae245065da7c730
diff --git a/ccpp/suites/suite_FV3_GFS_v16beta_coupled.xml b/ccpp/suites/suite_FV3_GFS_v16beta_coupled.xml
new file mode 100644
index 000000000..a131fb380
--- /dev/null
+++ b/ccpp/suites/suite_FV3_GFS_v16beta_coupled.xml
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+ fv_sat_adj
+
+
+
+
+ GFS_time_vary_pre
+ GFS_rrtmg_setup
+ GFS_rad_time_vary
+ GFS_phys_time_vary
+
+
+
+
+ GFS_suite_interstitial_rad_reset
+ GFS_rrtmg_pre
+ rrtmg_sw_pre
+ rrtmg_sw
+ rrtmg_sw_post
+ rrtmg_lw_pre
+ rrtmg_lw
+ rrtmg_lw_post
+ GFS_rrtmg_post
+
+
+
+
+ GFS_suite_interstitial_phys_reset
+ GFS_suite_stateout_reset
+ get_prs_fv3
+ GFS_suite_interstitial_1
+ GFS_surface_generic_pre
+ GFS_surface_composites_pre
+ dcyc2t3
+ GFS_surface_composites_inter
+ GFS_suite_interstitial_2
+
+
+
+ sfc_diff
+ GFS_surface_loop_control_part1
+ sfc_ocean
+ lsm_noah
+ sfc_cice
+ sfc_sice
+ GFS_surface_loop_control_part2
+
+
+
+ GFS_surface_composites_post
+ sfc_diag
+ sfc_diag_post
+ GFS_surface_generic_post
+ GFS_PBL_generic_pre
+ satmedmfvdifq
+ GFS_PBL_generic_post
+ GFS_GWD_generic_pre
+ cires_ugwp
+ cires_ugwp_post
+ GFS_GWD_generic_post
+ rayleigh_damp
+ GFS_suite_stateout_update
+ ozphys_2015
+ h2ophys
+ get_phi_fv3
+ GFS_suite_interstitial_3
+ GFS_DCNV_generic_pre
+ samfdeepcnv
+ GFS_DCNV_generic_post
+ GFS_SCNV_generic_pre
+ samfshalcnv
+ GFS_SCNV_generic_post
+ GFS_suite_interstitial_4
+ cnvc90
+ GFS_MP_generic_pre
+ gfdl_cloud_microphys
+ GFS_MP_generic_post
+ maximum_hourly_diagnostics
+
+
+
+
+ GFS_stochastics
+ phys_tend
+
+
+
+
diff --git a/ccpp/suites/suite_FV3_GSD_noah.xml b/ccpp/suites/suite_FV3_GSD_noah.xml
index 42d55a5e4..4d7d4e00f 100644
--- a/ccpp/suites/suite_FV3_GSD_noah.xml
+++ b/ccpp/suites/suite_FV3_GSD_noah.xml
@@ -79,6 +79,7 @@
mp_thompson_post
GFS_MP_generic_post
cu_gf_driver_post
+
maximum_hourly_diagnostics
diff --git a/ccpp/suites/suite_FV3_GSD_v0.xml b/ccpp/suites/suite_FV3_GSD_v0.xml
index 9ea5981bf..06c4d7dcd 100644
--- a/ccpp/suites/suite_FV3_GSD_v0.xml
+++ b/ccpp/suites/suite_FV3_GSD_v0.xml
@@ -81,6 +81,7 @@
mp_thompson_post
GFS_MP_generic_post
cu_gf_driver_post
+
maximum_hourly_diagnostics
diff --git a/ccpp/suites/suite_FV3_GSD_v0_unified_ugwp_suite.xml b/ccpp/suites/suite_FV3_GSD_v0_unified_ugwp_suite.xml
new file mode 100644
index 000000000..8a717abc3
--- /dev/null
+++ b/ccpp/suites/suite_FV3_GSD_v0_unified_ugwp_suite.xml
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+ GFS_time_vary_pre
+ GFS_rrtmg_setup
+ GFS_rad_time_vary
+ GFS_phys_time_vary
+
+
+
+
+ GFS_suite_interstitial_rad_reset
+ sgscloud_radpre
+ GFS_rrtmg_pre
+ rrtmg_sw_pre
+ rrtmg_sw
+ rrtmg_sw_post
+ rrtmg_lw_pre
+ rrtmg_lw
+ sgscloud_radpost
+ rrtmg_lw_post
+ GFS_rrtmg_post
+
+
+
+
+ GFS_suite_interstitial_phys_reset
+ GFS_suite_stateout_reset
+ get_prs_fv3
+ GFS_suite_interstitial_1
+ GFS_surface_generic_pre
+ GFS_surface_composites_pre
+ dcyc2t3
+ GFS_surface_composites_inter
+ GFS_suite_interstitial_2
+
+
+
+ sfc_diff
+ GFS_surface_loop_control_part1
+ sfc_nst_pre
+ sfc_nst
+ sfc_nst_post
+ lsm_ruc
+ lsm_ruc_sfc_sice_pre
+ sfc_sice
+ lsm_ruc_sfc_sice_post
+ GFS_surface_loop_control_part2
+
+
+
+ GFS_surface_composites_post
+ sfc_diag
+ sfc_diag_post
+ GFS_surface_generic_post
+ mynnedmf_wrapper
+ GFS_GWD_generic_pre
+ unified_ugwp
+ unified_ugwp_post
+ GFS_GWD_generic_post
+ rayleigh_damp
+ GFS_suite_stateout_update
+ ozphys_2015
+ h2ophys
+ get_phi_fv3
+ GFS_suite_interstitial_3
+ GFS_DCNV_generic_pre
+ cu_gf_driver_pre
+ cu_gf_driver
+ GFS_DCNV_generic_post
+ GFS_SCNV_generic_pre
+ GFS_SCNV_generic_post
+ GFS_suite_interstitial_4
+ cnvc90
+ GFS_MP_generic_pre
+ mp_thompson_pre
+ mp_thompson
+ mp_thompson_post
+ GFS_MP_generic_post
+ cu_gf_driver_post
+ maximum_hourly_diagnostics
+
+
+
+
+ GFS_stochastics
+
+
+
+
diff --git a/ccpp/suites/suite_FV3_GSD_v0_unified_ugwp_suite_noah.xml b/ccpp/suites/suite_FV3_GSD_v0_unified_ugwp_suite_noah.xml
new file mode 100644
index 000000000..a97b03ec7
--- /dev/null
+++ b/ccpp/suites/suite_FV3_GSD_v0_unified_ugwp_suite_noah.xml
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+ GFS_time_vary_pre
+ GFS_rrtmg_setup
+ GFS_rad_time_vary
+ GFS_phys_time_vary
+
+
+
+
+ GFS_suite_interstitial_rad_reset
+ sgscloud_radpre
+ GFS_rrtmg_pre
+ rrtmg_sw_pre
+ rrtmg_sw
+ rrtmg_sw_post
+ rrtmg_lw_pre
+ rrtmg_lw
+ sgscloud_radpost
+ rrtmg_lw_post
+ GFS_rrtmg_post
+
+
+
+
+ GFS_suite_interstitial_phys_reset
+ GFS_suite_stateout_reset
+ get_prs_fv3
+ GFS_suite_interstitial_1
+ GFS_surface_generic_pre
+ GFS_surface_composites_pre
+ dcyc2t3
+ GFS_surface_composites_inter
+ GFS_suite_interstitial_2
+
+
+
+ sfc_diff
+ GFS_surface_loop_control_part1
+ sfc_nst_pre
+ sfc_nst
+ sfc_nst_post
+ lsm_noah
+ sfc_sice
+ GFS_surface_loop_control_part2
+
+
+
+ GFS_surface_composites_post
+ sfc_diag
+ sfc_diag_post
+ GFS_surface_generic_post
+ mynnedmf_wrapper
+ GFS_GWD_generic_pre
+ unified_ugwp
+ unified_ugwp_post
+ GFS_GWD_generic_post
+ rayleigh_damp
+ GFS_suite_stateout_update
+ ozphys_2015
+ h2ophys
+ get_phi_fv3
+ GFS_suite_interstitial_3
+ GFS_DCNV_generic_pre
+ cu_gf_driver_pre
+ cu_gf_driver
+ GFS_DCNV_generic_post
+ GFS_SCNV_generic_pre
+ GFS_SCNV_generic_post
+ GFS_suite_interstitial_4
+ cnvc90
+ GFS_MP_generic_pre
+ mp_thompson_pre
+ mp_thompson
+ mp_thompson_post
+ GFS_MP_generic_post
+ cu_gf_driver_post
+ maximum_hourly_diagnostics
+
+
+
+
+ GFS_stochastics
+
+
+
+
diff --git a/gfsphysics/GFS_layer/GFS_typedefs.F90 b/gfsphysics/GFS_layer/GFS_typedefs.F90
index 5e5fa3fb2..b5b50b6af 100644
--- a/gfsphysics/GFS_layer/GFS_typedefs.F90
+++ b/gfsphysics/GFS_layer/GFS_typedefs.F90
@@ -9,7 +9,8 @@ module GFS_typedefs
con_t0c, con_cvap, con_cliq, con_eps, con_epsq, &
con_epsm1, con_ttp, rlapse, con_jcal, con_rhw0, &
con_sbc, con_tice, cimin, con_p0, rhowater, &
- con_csol, con_epsqs, con_rocp, con_rog
+ con_csol, con_epsqs, con_rocp, con_rog, &
+ con_omega, con_rerth
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
@@ -371,7 +372,6 @@ module GFS_typedefs
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 :: zs(:) => null() !< depth of soil levels for land surface model
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
@@ -809,6 +809,7 @@ module GFS_typedefs
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
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
@@ -858,9 +859,17 @@ module GFS_typedefs
logical :: cnvgwd !< flag for conv gravity wave drag
#ifdef CCPP
integer :: gwd_opt !< gwd_opt = 1 => original GFS gwd (gwdps.f)
- !< gwd_opt = 2 => unified GWD (placeholder)
- !< gwd_opt = 3 => GSD drag suite
- !< gwd_opt = 33 => GSD drag suite with extra output
+ !< gwd_opt = 2 => unified ugwp GWD
+ !< gwd_opt = 22 => unified ugwp GWD with extra output
+ !< gwd_opt = 3 => GSL drag suite
+ !< gwd_opt = 33 => GSL drag suite with extra output
+ logical :: do_ugwp_v0 !< flag for version 0 ugwp GWD
+ logical :: do_ugwp_v0_orog_only !< flag for version 0 ugwp GWD (orographic drag only)
+ logical :: do_gsl_drag_ls_bl !< flag for GSL drag (large-scale GWD and blocking only)
+ logical :: do_gsl_drag_ss !< flag for GSL drag (small-scale GWD only)
+ logical :: do_gsl_drag_tofd !< flag for GSL drag (turbulent orog form drag only)
+ logical :: do_ugwp_v1 !< flag for version 1 ugwp GWD
+ logical :: do_ugwp_v1_orog_only !< flag for version 1 ugwp GWD (orographic drag only)
#endif
logical :: mstrat !< flag for moorthi approach for stratus
logical :: moist_adj !< flag for moist convective adjustment
@@ -939,7 +948,7 @@ module GFS_typedefs
#endif
integer :: nmtvr !< number of topographic variables such as variance etc
!< used in the GWD parameterization - 10 more added if
- !< GSD orographic drag scheme is used
+ !< GSL orographic drag scheme is used
integer :: jcap !< number of spectral wave trancation used only by sascnv shalcnv
real(kind=kind_phys) :: cs_parm(10) !< tunable parameters for Chikira-Sugiyama convection
real(kind=kind_phys) :: flgmin(2) !< [in] ice fraction bounds
@@ -2136,18 +2145,18 @@ module GFS_typedefs
#endif
!-- HWRF physics: dry mixing ratios
- real (kind=kind_phys), pointer :: qv_r(:,:) => null() !<
- real (kind=kind_phys), pointer :: qc_r(:,:) => null() !<
- real (kind=kind_phys), pointer :: qi_r(:,:) => null() !<
- real (kind=kind_phys), pointer :: qr_r(:,:) => null() !<
- real (kind=kind_phys), pointer :: qs_r(:,:) => null() !<
- real (kind=kind_phys), pointer :: qg_r(:,:) => null() !<
-
- !-- GSD drag suite
- real (kind=kind_phys), pointer :: varss(:) => null() !<
- real (kind=kind_phys), pointer :: ocss(:) => null() !<
- real (kind=kind_phys), pointer :: oa4ss(:,:) => null() !<
- real (kind=kind_phys), pointer :: clxss(:,:) => null() !<
+ real (kind=kind_phys), pointer :: qv_r(:,:) => null() !<
+ real (kind=kind_phys), pointer :: qc_r(:,:) => null() !<
+ real (kind=kind_phys), pointer :: qi_r(:,:) => null() !<
+ real (kind=kind_phys), pointer :: qr_r(:,:) => null() !<
+ real (kind=kind_phys), pointer :: qs_r(:,:) => null() !<
+ real (kind=kind_phys), pointer :: qg_r(:,:) => null() !<
+
+ !-- GSL drag suite
+ real (kind=kind_phys), pointer :: varss(:) => null() !<
+ real (kind=kind_phys), pointer :: ocss(:) => null() !<
+ real (kind=kind_phys), pointer :: oa4ss(:,:) => null() !<
+ real (kind=kind_phys), pointer :: clxss(:,:) => null() !<
!-- Ferrier-Aligo MP scheme
real (kind=kind_phys), pointer :: f_rain (:,:) => null() !<
@@ -2603,7 +2612,6 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
allocate (Sfcprop%smois (IM,Model%lsoil_lsm))
allocate (Sfcprop%tslb (IM,Model%lsoil_lsm))
allocate (Sfcprop%flag_frsoil (IM,Model%lsoil_lsm))
- allocate (Sfcprop%zs (Model%lsoil_lsm))
allocate (Sfcprop%clw_surf (IM))
allocate (Sfcprop%qwv_surf (IM))
allocate (Sfcprop%cndm_surf (IM))
@@ -2617,7 +2625,6 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
Sfcprop%keepsmfr = clear_val
Sfcprop%smois = clear_val
Sfcprop%tslb = clear_val
- Sfcprop%zs = clear_val
Sfcprop%clw_surf = clear_val
Sfcprop%qwv_surf = clear_val
Sfcprop%cndm_surf = clear_val
@@ -3209,8 +3216,17 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
logical :: old_monin = .false. !< flag for diff monin schemes
logical :: cnvgwd = .false. !< flag for conv gravity wave drag
integer :: gwd_opt = 1 !< flag for configuring gwd scheme
- !< gwd_opt = 3 : GSDdrag suite
- !< gwd_opt = 33: GSDdrag suite with extra output
+ !< gwd_opt = 2 => unified ugwp GWD
+ !< gwd_opt = 22 => unified ugwp GWD with extra output
+ !< gwd_opt = 3 : GSL drag suite
+ !< gwd_opt = 33: GSL drag suite with extra output
+ logical :: do_ugwp_v0 = .true. !< flag for version 0 ugwp GWD
+ logical :: do_ugwp_v0_orog_only = .false. !< flag for version 0 ugwp GWD (orographic drag only)
+ logical :: do_gsl_drag_ls_bl = .false. !< flag for GSL drag (large-scale GWD and blocking only)
+ logical :: do_gsl_drag_ss = .false. !< flag for GSL drag (small-scale GWD only)
+ logical :: do_gsl_drag_tofd = .false. !< flag for GSL drag (turbulent orog form drag only)
+ logical :: do_ugwp_v1 = .false. !< flag for version 1 ugwp GWD
+ logical :: do_ugwp_v1_orog_only = .false. !< flag for version 1 ugwp GWD (orographic drag only)
!--- vay-2018
logical :: ldiag_ugwp = .false. !< flag for UGWP diag fields
logical :: do_ugwp = .false. !< flag do UGWP+RF
@@ -3514,8 +3530,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
bl_mynn_cloudpdf, bl_mynn_edmf, bl_mynn_edmf_mom, &
bl_mynn_edmf_tke, bl_mynn_edmf_part, bl_mynn_cloudmix, &
bl_mynn_mixqt, bl_mynn_output, icloud_bl, bl_mynn_tkeadvect, &
- gwd_opt, var_ric, coef_ric_l, coef_ric_s, hurr_pbl, &
! *DH
+ gwd_opt, do_ugwp_v0, do_ugwp_v0_orog_only, &
+ do_gsl_drag_ls_bl, do_gsl_drag_ss, do_gsl_drag_tofd, &
+ do_ugwp_v1, do_ugwp_v1_orog_only, &
+ var_ric, coef_ric_l, coef_ric_s, hurr_pbl, &
do_myjsfc, do_myjpbl, &
hwrf_samfdeep, hwrf_samfshal, &
#endif
@@ -3927,9 +3946,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%lsm = lsm
Model%lsoil = lsoil
#ifdef CCPP
- ! Consistency check for RUC LSM
- if ((Model%lsm == Model%lsm_ruc .or. Model%lsm == Model%lsm_noah_wrfv4) .and. Model%nscyc>0) then
- write(0,*) 'Logic error: RUC LSM and NOAH WRFv4 LSM cannot be used with surface data cycling at this point (fhcyc>0)'
+ ! 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)'
stop
end if
! Flag to read leaf area index from input files (initial conditions)
@@ -3944,6 +3963,12 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
else
Model%lsoil_lsm = lsoil_lsm
end if
+ ! Allocate variable to store depth of soil layers
+ if (Model%lsm==Model%lsm_ruc) then
+ allocate (Model%zs(Model%lsoil_lsm))
+ Model%zs = clear_val
+ end if
+ !
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)'
stop
@@ -4099,12 +4124,20 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%coef_ric_s = coef_ric_s
! *DH
Model%gwd_opt = gwd_opt
- if (Model%gwd_opt==3 .or. Model%gwd_opt==33) then
- ! Add 10 more orographic static fields for GSD drag scheme
+ if (Model%gwd_opt==3 .or. Model%gwd_opt==33 .or. &
+ Model%gwd_opt==2 .or. Model%gwd_opt==22) then
+ ! Add 10 more orographic static fields for GSL drag scheme
Model%nmtvr = 24
end if
- Model%do_myjsfc = do_myjsfc
- Model%do_myjpbl = do_myjpbl
+ Model%do_ugwp_v0 = do_ugwp_v0
+ Model%do_ugwp_v0_orog_only = do_ugwp_v0_orog_only
+ Model%do_gsl_drag_ls_bl = do_gsl_drag_ls_bl
+ Model%do_gsl_drag_ss = do_gsl_drag_ss
+ Model%do_gsl_drag_tofd = do_gsl_drag_tofd
+ Model%do_ugwp_v1 = do_ugwp_v1
+ Model%do_ugwp_v1_orog_only = do_ugwp_v1_orog_only
+ Model%do_myjsfc = do_myjsfc
+ Model%do_myjpbl = do_myjpbl
#endif
!--- Rayleigh friction
@@ -4746,8 +4779,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%nieffr = 2
Model%nseffr = 3
if (.not. Model%effr_in) then
- print *,' Thompson MP requires effr_in to be set to .true. - job aborted'
- stop
+ print *,' Thompson MP requires effr_in to be set to .true. - job aborted'
+ stop
end if
if (Model%me == Model%master) print *,' Using Thompson double moment microphysics', &
' ltaerosol = ',Model%ltaerosol, &
@@ -5201,7 +5234,15 @@ subroutine control_print(Model)
print *, ' do_mynnsfclay : ', Model%do_mynnsfclay
print *, ' do_myjsfc : ', Model%do_myjsfc
print *, ' do_myjpbl : ', Model%do_myjpbl
+ print *, ' do_ugwp : ', Model%do_ugwp
print *, ' gwd_opt : ', Model%gwd_opt
+ print *, ' do_ugwp_v0 : ', Model%do_ugwp_v0
+ print *, ' do_ugwp_v0_orog_only : ', Model%do_ugwp_v0_orog_only
+ print *, ' do_gsl_drag_ls_bl : ', Model%do_gsl_drag_ls_bl
+ print *, ' do_gsl_drag_ss : ', Model%do_gsl_drag_ss
+ print *, ' do_gsl_drag_tofd : ', Model%do_gsl_drag_tofd
+ print *, ' do_ugwp_v1 : ', Model%do_ugwp_v1
+ print *, ' do_ugwp_v1_orog_only : ', Model%do_ugwp_v1_orog_only
print *, ' hurr_pbl : ', Model%hurr_pbl
print *, ' var_ric : ', Model%var_ric
print *, ' coef_ric_l : ', Model%coef_ric_l
@@ -5946,7 +5987,7 @@ subroutine diag_create (Diag, IM, Model)
endif
!--- Drag Suite variables:
- if (Model%gwd_opt == 33) then
+ if (Model%gwd_opt == 33 .or. Model%gwd_opt == 22) then
!print*,"Allocating all Drag Suite variables:"
allocate (Diag%dtaux2d_ls (IM,Model%levs))
allocate (Diag%dtauy2d_ls (IM,Model%levs))
@@ -6129,6 +6170,29 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center)
Diag%toticeb = zero
Diag%totsnwb = zero
Diag%totgrpb = zero
+!
+#ifdef CCPP
+ !--- MYNN variables:
+ if (Model%do_mynnedmf) then
+ if (Model%bl_mynn_output .ne. 0) then
+ Diag%edmf_a = clear_val
+ Diag%edmf_w = clear_val
+ Diag%edmf_qt = clear_val
+ Diag%edmf_thl = clear_val
+ Diag%edmf_ent = clear_val
+ Diag%edmf_qc = clear_val
+ Diag%sub_thl = clear_val
+ Diag%sub_sqv = clear_val
+ Diag%det_thl = clear_val
+ Diag%det_sqv = clear_val
+ endif
+ Diag%nupdraft = 0
+ Diag%maxmf = clear_val
+ Diag%ktop_plume = 0
+ Diag%exch_h = clear_val
+ Diag%exch_m = clear_val
+ endif
+#endif
!
if (Model%do_ca) then
Diag%ca1 = zero
@@ -6658,8 +6722,9 @@ subroutine interstitial_create (Interstitial, IM, Model)
allocate (Interstitial%dudt_mtb (IM,Model%levs))
allocate (Interstitial%dudt_ogw (IM,Model%levs))
allocate (Interstitial%dudt_tms (IM,Model%levs))
-!-- GSD drag suite
- if (Model%gwd_opt==3 .or. Model%gwd_opt==33) then
+!-- GSL drag suite
+ if (Model%gwd_opt==3 .or. Model%gwd_opt==33 .or. &
+ Model%gwd_opt==2 .or. Model%gwd_opt==22 ) then
allocate (Interstitial%varss (IM))
allocate (Interstitial%ocss (IM))
allocate (Interstitial%oa4ss (IM,4))
@@ -6941,7 +7006,7 @@ subroutine interstitial_rad_reset (Interstitial, Model)
!
class(GFS_interstitial_type) :: Interstitial
type(GFS_control_type), intent(in) :: Model
-
+ !
Interstitial%aerodp = clear_val
Interstitial%alb1d = clear_val
if (.not. Model%do_RRTMGP) then
@@ -7267,8 +7332,9 @@ subroutine interstitial_phys_reset (Interstitial, Model)
Interstitial%dudt_mtb = clear_val
Interstitial%dudt_ogw = clear_val
Interstitial%dudt_tms = clear_val
-!-- GSD drag suite
- if (Model%gwd_opt==3 .or. Model%gwd_opt==33) then
+!-- GSL drag suite
+ if (Model%gwd_opt==3 .or. Model%gwd_opt==33 .or. &
+ Model%gwd_opt==2 .or. Model%gwd_opt==22) then
Interstitial%varss = clear_val
Interstitial%ocss = clear_val
Interstitial%oa4ss = clear_val
@@ -7654,8 +7720,9 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno)
write (0,*) 'sum(Interstitial%dudt_mtb ) = ', sum(Interstitial%dudt_mtb )
write (0,*) 'sum(Interstitial%dudt_ogw ) = ', sum(Interstitial%dudt_ogw )
write (0,*) 'sum(Interstitial%dudt_tms ) = ', sum(Interstitial%dudt_tms )
-!-- GSD drag suite
- if (Model%gwd_opt==3 .or. Model%gwd_opt==33) then
+!-- GSL drag suite
+ if (Model%gwd_opt==3 .or. Model%gwd_opt==33 .or. &
+ Model%gwd_opt==2 .or. Model%gwd_opt==22) then
write (0,*) 'sum(Interstitial%varss ) = ', sum(Interstitial%varss)
write (0,*) 'sum(Interstitial%ocss ) = ', sum(Interstitial%ocss)
write (0,*) 'sum(Interstitial%oa4ss ) = ', sum(Interstitial%oa4ss)
diff --git a/gfsphysics/GFS_layer/GFS_typedefs.meta b/gfsphysics/GFS_layer/GFS_typedefs.meta
index ed0f84b69..84e447237 100644
--- a/gfsphysics/GFS_layer/GFS_typedefs.meta
+++ b/gfsphysics/GFS_layer/GFS_typedefs.meta
@@ -1267,14 +1267,6 @@
type = real
kind = kind_phys
active = (flag_for_land_surface_scheme == flag_for_ruc_land_surface_scheme)
-[zs]
- standard_name = depth_of_soil_levels_for_land_surface_model
- long_name = depth of soil levels for land surface model
- units = m
- dimensions = (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
@@ -2172,6 +2164,13 @@
units = none
dimensions = ()
type = integer
+[fhzero]
+ standard_name = hours_between_clearing_of_diagnostic_buckets
+ long_name = hours between clearing of diagnostic buckets
+ units = h
+ dimensions = ()
+ type = real
+ kind = kind_phys
[fn_nml]
standard_name = namelist_filename
long_name = namelist filename
@@ -3254,6 +3253,14 @@
units = count
dimensions = ()
type = integer
+[zs]
+ standard_name = depth_of_soil_levels_for_land_surface_model
+ long_name = depth of soil levels for land surface model
+ units = m
+ dimensions = (soil_vertical_dimension_for_land_surface_model)
+ type = real
+ kind = kind_phys
+ active = (flag_for_land_surface_scheme == flag_for_ruc_land_surface_scheme)
[rdlai]
standard_name = flag_for_reading_leaf_area_index_from_input
long_name = flag for reading leaf area index from initial conditions
@@ -4818,6 +4825,62 @@
units = flag
dimensions = ()
type = logical
+[do_ugwp_v0]
+ standard_name = do_ugwp_v0
+ long_name = flag to activate ver 0 CIRES UGWP
+ units = flag
+ dimensions = ()
+ type = logical
+ intent = in
+ optional = F
+[do_ugwp_v0_orog_only]
+ standard_name = do_ugwp_v0_orog_only
+ long_name = flag to activate ver 0 CIRES UGWP - orographic GWD only
+ units = flag
+ dimensions = ()
+ type = logical
+ intent = in
+ optional = F
+[do_gsl_drag_ls_bl]
+ standard_name = do_gsl_drag_ls_bl
+ long_name = flag to activate GSL drag suite - large-scale GWD and blocking
+ units = flag
+ dimensions = ()
+ type = logical
+ intent = in
+ optional = F
+[do_gsl_drag_ss]
+ standard_name = do_gsl_drag_ss
+ long_name = flag to activate GSL drag suite - small-scale GWD
+ units = flag
+ dimensions = ()
+ type = logical
+ intent = in
+ optional = F
+[do_gsl_drag_tofd]
+ standard_name = do_gsl_drag_tofd
+ long_name = flag to activate GSL drag suite - turb orog form drag
+ units = flag
+ dimensions = ()
+ type = logical
+ intent = in
+ optional = F
+[do_ugwp_v1]
+ standard_name = do_ugwp_v1
+ long_name = flag to activate ver 1 CIRES UGWP
+ units = flag
+ dimensions = ()
+ type = logical
+ intent = in
+ optional = F
+[do_ugwp_v1_orog_only]
+ standard_name = do_ugwp_v1_orog_only
+ long_name = flag to activate ver 1 CIRES UGWP - orographic GWD only
+ units = flag
+ dimensions = ()
+ type = logical
+ intent = in
+ optional = F
[lmfdeep2]
standard_name = flag_for_scale_aware_mass_flux_convection
long_name = flag for some scale-aware mass-flux convection scheme active
@@ -10484,6 +10547,20 @@
dimensions = ()
type = real
kind = kind_phys
+[con_omega]
+ standard_name = angular_velocity_of_earth
+ long_name = angular velocity of earth
+ units = s-1
+ dimensions = ()
+ type = real
+ kind = kind_phys
+[con_rerth]
+ standard_name = radius_of_earth
+ long_name = radius of earth
+ units = m
+ dimensions = ()
+ type = real
+ kind = kind_phys
[con_epsm1]
standard_name = ratio_of_dry_air_to_water_vapor_gas_constants_minus_one
long_name = (rd/rv) - 1
diff --git a/io/FV3GFS_io.F90 b/io/FV3GFS_io.F90
index 07018ba05..08f792b05 100644
--- a/io/FV3GFS_io.F90
+++ b/io/FV3GFS_io.F90
@@ -658,7 +658,8 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain)
#ifdef CCPP
!--- Modify/read-in additional orographic static fields for GSL drag suite
- if (Model%gwd_opt==3 .or. Model%gwd_opt==33) then
+ if (Model%gwd_opt==3 .or. Model%gwd_opt==33 .or. &
+ Model%gwd_opt==2 .or. Model%gwd_opt==22 ) then
if (.not. allocated(oro_ls_ss_name)) then
!--- allocate the various containers needed for orography data
allocate(oro_ls_ss_name(nvar_oro_ls_ss))
@@ -703,17 +704,24 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain)
do ix = 1, Atm_block%blksz(nb)
i = Atm_block%index(nb)%ii(ix) - isc + 1
j = Atm_block%index(nb)%jj(ix) - jsc + 1
- !--- assign hprime(1:10) and hprime(15:24) with new oro stat data
- Sfcprop(nb)%hprime(ix,1) = oro_ls_var(i,j,1)
- Sfcprop(nb)%hprime(ix,2) = oro_ls_var(i,j,2)
- Sfcprop(nb)%hprime(ix,3) = oro_ls_var(i,j,3)
- Sfcprop(nb)%hprime(ix,4) = oro_ls_var(i,j,4)
- Sfcprop(nb)%hprime(ix,5) = oro_ls_var(i,j,5)
- Sfcprop(nb)%hprime(ix,6) = oro_ls_var(i,j,6)
- Sfcprop(nb)%hprime(ix,7) = oro_ls_var(i,j,7)
- Sfcprop(nb)%hprime(ix,8) = oro_ls_var(i,j,8)
- Sfcprop(nb)%hprime(ix,9) = oro_ls_var(i,j,9)
- Sfcprop(nb)%hprime(ix,10) = oro_ls_var(i,j,10)
+ ! Replace hprime(1:10) with GSL oro stat data only when using GSL
+ ! drag suite with large scale GWD and blocking as part of unified drag
+ ! suite. Otherwise, original oro stat data is used.
+ if ( (Model%gwd_opt==3 .or. Model%gwd_opt==33) .or. &
+ ( (Model%gwd_opt==2 .or. Model%gwd_opt==22) .and. &
+ Model%do_gsl_drag_ls_bl ) ) then
+ !--- assign hprime(1:10) and hprime(15:24) with new oro stat data
+ Sfcprop(nb)%hprime(ix,1) = oro_ls_var(i,j,1)
+ Sfcprop(nb)%hprime(ix,2) = oro_ls_var(i,j,2)
+ Sfcprop(nb)%hprime(ix,3) = oro_ls_var(i,j,3)
+ Sfcprop(nb)%hprime(ix,4) = oro_ls_var(i,j,4)
+ Sfcprop(nb)%hprime(ix,5) = oro_ls_var(i,j,5)
+ Sfcprop(nb)%hprime(ix,6) = oro_ls_var(i,j,6)
+ Sfcprop(nb)%hprime(ix,7) = oro_ls_var(i,j,7)
+ Sfcprop(nb)%hprime(ix,8) = oro_ls_var(i,j,8)
+ Sfcprop(nb)%hprime(ix,9) = oro_ls_var(i,j,9)
+ Sfcprop(nb)%hprime(ix,10) = oro_ls_var(i,j,10)
+ endif
Sfcprop(nb)%hprime(ix,15) = oro_ss_var(i,j,1)
Sfcprop(nb)%hprime(ix,16) = oro_ss_var(i,j,2)
Sfcprop(nb)%hprime(ix,17) = oro_ss_var(i,j,3)
@@ -724,7 +732,6 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain)
Sfcprop(nb)%hprime(ix,22) = oro_ss_var(i,j,8)
Sfcprop(nb)%hprime(ix,23) = oro_ss_var(i,j,9)
Sfcprop(nb)%hprime(ix,24) = oro_ss_var(i,j,10)
-
enddo
enddo