diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index daabe2df6..6c0800373 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -111,6 +111,8 @@ 'FV3/ccpp/physics/physics/GFS_time_vary_pre.fv3.F90', 'FV3/ccpp/physics/physics/cires_ugwp.F90', 'FV3/ccpp/physics/physics/cires_ugwp_post.F90', + 'FV3/ccpp/physics/physics/unified_ugwp.F90', + 'FV3/ccpp/physics/physics/unified_ugwp_post.F90', 'FV3/ccpp/physics/physics/cnvc90.f', 'FV3/ccpp/physics/physics/cs_conv.F90', 'FV3/ccpp/physics/physics/cs_conv_aw_adj.F90', diff --git a/ccpp/physics b/ccpp/physics index 2caf57905..c3bb4d0d1 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 2caf57905c7405eea65281be55103901ef6eb5a4 +Subproject commit c3bb4d0d1cc5e65d6888ccbba622420bc30a2c6e 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 ce8eaef7a..ba751c816 100644 --- a/gfsphysics/GFS_layer/GFS_typedefs.F90 +++ b/gfsphysics/GFS_layer/GFS_typedefs.F90 @@ -9,7 +9,7 @@ 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_csol, con_epsqs, 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 @@ -817,9 +817,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 @@ -893,7 +901,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 @@ -2064,7 +2072,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: qs_r(:,:) => null() !< real (kind=kind_phys), pointer :: qg_r(:,:) => null() !< - !-- GSD drag suite + !-- GSL drag suite real (kind=kind_phys), pointer :: varss(:) => null() !< real (kind=kind_phys), pointer :: ocss(:) => null() !< real (kind=kind_phys), pointer :: oa4ss(:,:) => null() !< @@ -3089,8 +3097,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 : GSLdrag suite + !< gwd_opt = 33: GSLdrag 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 @@ -3383,7 +3400,9 @@ 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, & + 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, & ! *DH do_myjsfc, do_myjpbl, & hwrf_samfdeep, hwrf_samfshal, & @@ -3942,10 +3961,18 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%icloud_bl = icloud_bl ! *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_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 @@ -5012,7 +5039,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 #endif print *, ' ' print *, 'Rayleigh friction' @@ -5755,7 +5790,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)) @@ -6490,8 +6525,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)) @@ -7071,8 +7107,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 @@ -7430,8 +7467,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 b895e779c..3a0f22973 100644 --- a/gfsphysics/GFS_layer/GFS_typedefs.meta +++ b/gfsphysics/GFS_layer/GFS_typedefs.meta @@ -2142,6 +2142,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 @@ -4496,6 +4503,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 ######################################################################## [ccpp-table-properties] @@ -9803,6 +9866,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 458605c96..8cbcb8e93 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) + end if 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