From 817fe36b95968a0143d69e86fd0fb7862c7d257e Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 10 Apr 2020 09:29:47 -0600 Subject: [PATCH 1/2] Merge climbfuji:man_hafs_sas_for_develop into NCAR:dtc/hwrf-physics --- .gitmodules | 6 +- ccpp/physics | 2 +- .../suite_FV3_GFS_2017_satmedmf_coupled.xml | 87 +++++++++++++++++ ccpp/suites/suite_FV3_GFS_v15p2_coupled.xml | 92 ++++++++++++++++++ gfsphysics/GFS_layer/GFS_physics_driver.F90 | 93 +++++++++---------- gfsphysics/GFS_layer/GFS_typedefs.F90 | 64 ++++++------- gfsphysics/GFS_layer/GFS_typedefs.meta | 47 +++------- gfsphysics/physics/GFS_debug.F90 | 50 +++++++++- gfsphysics/physics/gcycle.F90 | 12 +-- 9 files changed, 325 insertions(+), 128 deletions(-) create mode 100644 ccpp/suites/suite_FV3_GFS_2017_satmedmf_coupled.xml create mode 100644 ccpp/suites/suite_FV3_GFS_v15p2_coupled.xml diff --git a/.gitmodules b/.gitmodules index 2fd86e7d8..70d5f2178 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,5 +8,7 @@ branch = master [submodule "ccpp/physics"] path = ccpp/physics - url = https://github.com/NCAR/ccpp-physics - branch = dtc/hwrf-physics + #url = https://github.com/NCAR/ccpp-physics + #branch = dtc/hwrf-physics + url = https://github.com/climbfuji/ccpp-physics + branch = merge_hwrf-sasas_into_dtc_hwrf-physics diff --git a/ccpp/physics b/ccpp/physics index 6c27ff2e4..02bede048 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 6c27ff2e43010dba325b498a83b10813e55b059a +Subproject commit 02bede0485c6a1c95763e1dbac9359a25074186b diff --git a/ccpp/suites/suite_FV3_GFS_2017_satmedmf_coupled.xml b/ccpp/suites/suite_FV3_GFS_2017_satmedmf_coupled.xml new file mode 100644 index 000000000..42928357d --- /dev/null +++ b/ccpp/suites/suite_FV3_GFS_2017_satmedmf_coupled.xml @@ -0,0 +1,87 @@ + + + + + + + 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 + satmedmfvdif + GFS_PBL_generic_post + GFS_GWD_generic_pre + cires_ugwp + cires_ugwp_post + GFS_GWD_generic_post + rayleigh_damp + GFS_suite_stateout_update + ozphys + GFS_DCNV_generic_pre + get_phi_fv3 + GFS_suite_interstitial_3 + samfdeepcnv + GFS_DCNV_generic_post + GFS_SCNV_generic_pre + samfshalcnv + GFS_SCNV_generic_post + GFS_suite_interstitial_4 + cnvc90 + GFS_MP_generic_pre + zhaocarr_gscond + zhaocarr_precpd + GFS_MP_generic_post + maximum_hourly_diagnostics + + + + + GFS_stochastics + + + + diff --git a/ccpp/suites/suite_FV3_GFS_v15p2_coupled.xml b/ccpp/suites/suite_FV3_GFS_v15p2_coupled.xml new file mode 100644 index 000000000..71f3665f9 --- /dev/null +++ b/ccpp/suites/suite_FV3_GFS_v15p2_coupled.xml @@ -0,0 +1,92 @@ + + + + + + + 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 + hedmf + 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 + GFS_DCNV_generic_pre + get_phi_fv3 + GFS_suite_interstitial_3 + 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 + + + + diff --git a/gfsphysics/GFS_layer/GFS_physics_driver.F90 b/gfsphysics/GFS_layer/GFS_physics_driver.F90 index 55321d341..526cc6ab9 100644 --- a/gfsphysics/GFS_layer/GFS_physics_driver.F90 +++ b/gfsphysics/GFS_layer/GFS_physics_driver.F90 @@ -544,9 +544,6 @@ subroutine GFS_physics_driver & doms, psautco_l, prautco_l, ocalnirbm_cpl, ocalnirdf_cpl, & ocalvisbm_cpl, ocalvisdf_cpl, dtzm, temrain1, t2mmp, q2mp, & psaur_l, praur_l, & -!--- coupling inputs for physics - dtsfc_cice, dqsfc_cice, dusfc_cice, dvsfc_cice, & -! dtsfc_cice, dqsfc_cice, dusfc_cice, dvsfc_cice, ulwsfc_cice, & !--- for CS-convection wcbmax @@ -678,16 +675,15 @@ subroutine GFS_physics_driver & real :: pshltr,QCQ,rh02 real(kind=kind_phys), allocatable, dimension(:,:) :: den - !! Initialize local variables (mainly for debugging purposes, because the - !! corresponding variables Interstitial(nt)%... are reset to zero every time); - !! these variables are only modified over parts of the entire domain (related - !! to land surface mask etc.) + !! Initialize local variables (for debugging purposes only, + !! because the corresponding variables Interstitial(nt)%... + !! are reset to zero every time). !snowmt = 0. !gamq = 0. !gamt = 0. !gflx = 0. !hflx = 0. - ! + !! Strictly speaking, this is not required. But when !! hunting for bit-for-bit differences, doing the same as !! in GFS_suite_stateout_reset makes life a lot easier. @@ -911,10 +907,6 @@ subroutine GFS_physics_driver & ! --- set initial quantities for stochastic physics deltas if (Model%do_sppt) then Tbd%dtdtr = zero - do i=1,im - Tbd%drain_cpl(i) = Coupling%rain_cpl (i) - Tbd%dsnow_cpl(i) = Coupling%snow_cpl (i) - enddo endif ! mg, sfc-perts @@ -1113,14 +1105,6 @@ subroutine GFS_physics_driver & do i=1,im islmsk_cice(i) = nint(Coupling%slimskin_cpl(i)) flag_cice(i) = (islmsk_cice(i) == 4) - - if (flag_cice(i)) then -! ulwsfc_cice(i) = Coupling%ulwsfcin_cpl(i) - dusfc_cice(i) = Coupling%dusfcin_cpl(i) - dvsfc_cice(i) = Coupling%dvsfcin_cpl(i) - dtsfc_cice(i) = Coupling%dtsfcin_cpl(i) - dqsfc_cice(i) = Coupling%dqsfcin_cpl(i) - endif enddo endif !*## CCPP ## @@ -1145,9 +1129,8 @@ subroutine GFS_physics_driver & endif endif if (fice(i) < one) then - wet(i)=.true. !some open ocean/lake water exists + wet(i)=.true. ! some open ocean/lake water exists if (.not. Model%cplflx) Sfcprop%tsfco(i) = max(Sfcprop%tsfco(i), Sfcprop%tisfc(i), tgice) - end if else fice(i) = zero @@ -1659,13 +1642,14 @@ subroutine GFS_physics_driver & sbsno(i) = zero snowc(i) = zero snohf(i) = zero + !## CCPP ##* GFS_surface_generic.F90/GFS_surface_generic_pre_run Diag%zlvl(i) = Statein%phil(i,1) * onebg Diag%smcwlt2(i) = zero Diag%smcref2(i) = zero - wind(i) = max(sqrt(Statein%ugrs(i,1)*Statein%ugrs(i,1) + & Statein%vgrs(i,1)*Statein%vgrs(i,1)) & + max(zero, min(Tbd%phy_f2d(i,Model%num_p2d), 30.0)), one) + !*## CCPP ## enddo !*## CCPP ## @@ -1909,6 +1893,30 @@ subroutine GFS_physics_driver & endif !lsm + !! Strictly speaking, this is not required. But when + !! hunting for bit-for-bit differences, updating the + !! subsurface variables in the Sfcprop DDT makes + !! life a lot easier + !if (Model%frac_grid) then + ! do k=1,lsoil + ! do i=1,im + ! if (dry(i)) then + ! Sfcprop%smc(i,k) = smsoil(i,k) + ! Sfcprop%stc(i,k) = stsoil(i,k) + ! Sfcprop%slc(i,k) = slsoil(i,k) + ! endif + ! enddo + ! enddo + !else + ! do k=1,lsoil + ! do i=1,im + ! Sfcprop%smc(i,k) = smsoil(i,k) + ! Sfcprop%stc(i,k) = stsoil(i,k) + ! Sfcprop%slc(i,k) = slsoil(i,k) + ! enddo + ! enddo + !endif + ! if (lprnt) write(0,*)' tseabeficemodel =',Sfcprop%tsfc(ipr),' me=',me & ! &, ' kdt=',kdt,' tsfc32=',tsfc3(ipr,2),' fice=',fice(ipr) & ! &,' stsoil=',stsoil(ipr,:) @@ -1931,8 +1939,9 @@ subroutine GFS_physics_driver & (im, Statein%tgrs(:,1), & Statein%qgrs(:,1,1), cd3(:,2), cdq3(:,2), & Statein%prsl(:,1), wind, & - flag_cice, flag_iter, dqsfc_cice, dtsfc_cice, & - dusfc_cice, dvsfc_cice, & + flag_cice, flag_iter, & + Coupling%dqsfcin_cpl, Coupling%dtsfcin_cpl, & + Coupling%dusfcin_cpl, Coupling%dvsfcin_cpl, & ! --- outputs: qss3(:,2), cmm3(:,2), chh3(:,2), evap3(:,2), hflx3(:,2), & stress3(:,2)) @@ -2103,15 +2112,11 @@ subroutine GFS_physics_driver & ep1d(i) = ep1d3(i,k) Sfcprop%weasd(i) = weasd3(i,k) Sfcprop%snowd(i) = snowd3(i,k) - evap(i) = evap3(i,k) hflx(i) = hflx3(i,k) qss(i) = qss3(i,k) Sfcprop%tsfc(i) = tsfc3(i,k) - Diag%cmm(i) = cmm3(i,k) - Diag%chh(i) = chh3(i,k) - Sfcprop%zorll(i) = zorl3(i,1) Sfcprop%zorlo(i) = zorl3(i,3) @@ -2120,7 +2125,6 @@ subroutine GFS_physics_driver & txo = one - txi evap(i) = txi * evap3(i,2) + txo * evap3(i,3) hflx(i) = txi * hflx3(i,2) + txo * hflx3(i,3) -! Sfcprop%tsfc(i) = txi * tice(i) + txo * tsfc3(i,3) Sfcprop%tsfc(i) = txi * tsfc3(i,2) + txo * tsfc3(i,3) else ! return updated lake ice thickness & concentration to global array if (islmsk(i) == 2) then @@ -2839,10 +2843,10 @@ subroutine GFS_physics_driver & do i=1,im if (Sfcprop%oceanfrac(i) > zero) then ! Ocean only, NO LAKES if (Sfcprop%fice(i) > one - epsln) then ! no open water, thus use results from CICE - Coupling%dusfci_cpl(i) = dusfc_cice(i) - Coupling%dvsfci_cpl(i) = dvsfc_cice(i) - Coupling%dtsfci_cpl(i) = dtsfc_cice(i) - Coupling%dqsfci_cpl(i) = dqsfc_cice(i) + Coupling%dusfci_cpl(i) = Coupling%dusfcin_cpl(i) + Coupling%dvsfci_cpl(i) = Coupling%dvsfcin_cpl(i) + Coupling%dtsfci_cpl(i) = Coupling%dtsfcin_cpl(i) + Coupling%dqsfci_cpl(i) = Coupling%dqsfcin_cpl(i) elseif (icy(i) .or. dry(i)) then ! use stress_ocean from sfc_diff for opw component at mixed point tem1 = max(Diag%q1(i), 1.e-8) rho = Statein%prsl(i,1) / (con_rd*Diag%t1(i)*(one+con_fvirt*tem1)) @@ -2856,8 +2860,6 @@ subroutine GFS_physics_driver & endif Coupling%dtsfci_cpl(i) = con_cp * rho * hflx3(i,3) ! sensible heat flux over open ocean Coupling%dqsfci_cpl(i) = con_hvap * rho * evap3(i,3) ! latent heat flux over open ocean -! if (lprnt .and. i == ipr) write(0,*)' hflx33=',hflx3(i,3),' evap33=',evap3(i,3), & -! ' con_cp=',con_cp,' rho=',rho,' con_hvap=',con_hvap else ! use results from PBL scheme for 100% open ocean Coupling%dusfci_cpl(i) = dusfc1(i) Coupling%dvsfci_cpl(i) = dvsfc1(i) @@ -5283,7 +5285,7 @@ subroutine GFS_physics_driver & !*## CCPP ## !## CCPP ##* GFS_MP_generic.F90/GFS_MP_generic_post_run Diag%rain(:) = Diag%rainc(:) + frain * rain1(:) ! total rain per timestep - + ! --- get the amount of different precip type for Noah MP ! --- convert from m/dtp to mm/s if (Model%lsm==Model%lsm_noahmp) then @@ -5463,10 +5465,10 @@ subroutine GFS_physics_driver & if (Model%cplflx .or. Model%cplchm) then do i = 1, im - Coupling%rain_cpl(i) = Coupling%rain_cpl(i) & - + Diag%rain(i) * (one-Sfcprop%srflag(i)) - Coupling%snow_cpl(i) = Coupling%snow_cpl(i) & - + Diag%rain(i) * Sfcprop%srflag(i) + Tbd%drain_cpl(i)= Diag%rain(i) * (one-Sfcprop%srflag(i)) + Tbd%dsnow_cpl(i)= Diag%rain(i) * Sfcprop%srflag(i) + Coupling%rain_cpl(i) = Coupling%rain_cpl(i) + Tbd%drain_cpl(i) + Coupling%snow_cpl(i) = Coupling%snow_cpl(i) + Tbd%dsnow_cpl(i) enddo endif @@ -5557,15 +5559,6 @@ subroutine GFS_physics_driver & if (Model%do_sppt) then !--- radiation heating rate Tbd%dtdtr(1:im,:) = Tbd%dtdtr(1:im,:) + dtdtc(1:im,:)*dtf - do i = 1, im - if (t850(i) > 273.16) then -!--- change in change in rain precip - Tbd%drain_cpl(i) = Diag%rain(i) - Tbd%drain_cpl(i) - else -!--- change in change in snow precip - Tbd%dsnow_cpl(i) = Diag%rain(i) - Tbd%dsnow_cpl(i) - endif - enddo endif !*## CCPP ## !## CCPP ##* This block is not in the CCPP since it is not needed in the CCPP. diff --git a/gfsphysics/GFS_layer/GFS_typedefs.F90 b/gfsphysics/GFS_layer/GFS_typedefs.F90 index bc21d3490..dc77aa92b 100644 --- a/gfsphysics/GFS_layer/GFS_typedefs.F90 +++ b/gfsphysics/GFS_layer/GFS_typedefs.F90 @@ -284,8 +284,8 @@ module GFS_typedefs #endif real (kind=kind_phys), pointer :: q2m (:) => null() !< 2 meter humidity -! -- In/Out for Noah MP - real (kind=kind_phys), pointer :: snowxy (:) => null() ! +! -- In/Out for Noah MP + real (kind=kind_phys), pointer :: snowxy (:) => null() !< real (kind=kind_phys), pointer :: tvxy (:) => null() !< veg temp real (kind=kind_phys), pointer :: tgxy (:) => null() !< ground temp real (kind=kind_phys), pointer :: canicexy(:) => null() !< @@ -312,7 +312,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: xlaixy (:) => null() !< real (kind=kind_phys), pointer :: taussxy (:) => null() !< real (kind=kind_phys), pointer :: smcwtdxy(:) => null() !< - real (kind=kind_phys), pointer :: deeprechxy(:) => null() !< + real (kind=kind_phys), pointer :: deeprechxy(:)=> null() !< real (kind=kind_phys), pointer :: rechxy (:) => null() !< real (kind=kind_phys), pointer :: snicexy (:,:) => null() !< @@ -818,6 +818,7 @@ module GFS_typedefs integer :: imfshalcnv_samf = 2 !< flag for SAMF scale- & aerosol-aware mass-flux shallow convection scheme integer :: imfshalcnv_gf = 3 !< flag for scale- & aerosol-aware Grell-Freitas scheme (GSD) integer :: imfshalcnv_ntiedtke = 4 !< flag for new Tiedtke scheme (CAPS) + logical :: hwrf_samfdeep !< flag for HWRF SAMF deepcnv scheme (HWRF) #endif integer :: imfdeepcnv !< flag for mass-flux deep convection scheme !< 1: July 2010 version of SAS conv scheme @@ -831,6 +832,7 @@ module GFS_typedefs integer :: imfdeepcnv_samf = 2 !< flag for SAMF scale- & aerosol-aware mass-flux deep convection scheme integer :: imfdeepcnv_gf = 3 !< flag for scale- & aerosol-aware Grell-Freitas scheme (GSD) integer :: imfdeepcnv_ntiedtke = 4 !< flag for new Tiedtke scheme (CAPS) + logical :: hwrf_samfshal !< flag for HWRF SAMF shalcnv scheme (HWRF) #endif integer :: isatmedmf !< flag for scale-aware TKE-based moist edmf scheme !< 0: initial version of satmedmf (Nov. 2018) @@ -1865,11 +1867,6 @@ module GFS_typedefs real (kind=kind_phys), pointer :: tsurf_land(:) => null() !< real (kind=kind_phys), pointer :: tsurf_ocean(:) => null() !< real (kind=kind_phys), pointer :: ud_mf(:,:) => null() !< - real (kind=kind_phys), pointer :: ulwsfc_cice(:) => null() !< - real (kind=kind_phys), pointer :: dusfc_cice(:) => null() !< - real (kind=kind_phys), pointer :: dvsfc_cice(:) => null() !< - real (kind=kind_phys), pointer :: dqsfc_cice(:) => null() !< - real (kind=kind_phys), pointer :: dtsfc_cice(:) => null() !< real (kind=kind_phys), pointer :: uustar_ice(:) => null() !< real (kind=kind_phys), pointer :: uustar_land(:) => null() !< real (kind=kind_phys), pointer :: uustar_ocean(:) => null() !< @@ -2594,7 +2591,7 @@ subroutine coupling_create (Coupling, IM, Model) Coupling%ca_turb = clear_val Coupling%ca_shal = clear_val Coupling%ca_rad = clear_val - Coupling%ca_micro = clear_val + Coupling%ca_micro = clear_val Coupling%cape = clear_val Coupling%tconvtend = clear_val Coupling%qconvtend = clear_val @@ -2948,6 +2945,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !< 1: updated version of satmedmf (as of May 2019) logical :: do_deep = .true. !< whether to do deep convection #ifdef CCPP + 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 logical :: do_mynnsfclay = .false. !< flag for MYNN Surface Layer Scheme ! DH* TODO - move to MYNN namelist section @@ -3169,6 +3168,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & var_ric, coef_ric_l, coef_ric_s, hurr_pbl, & ! *DH do_myjsfc, do_myjpbl, & + hwrf_samfdeep, hwrf_samfshal, & #endif h2o_phys, pdfcld, shcnvcw, redrag, hybedmf, satmedmf, & shinhong, do_ysu, dspheat, lheatstrg, cnvcld, & @@ -3518,6 +3518,19 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%shoc_parm = shoc_parm Model%shocaftcnv = shocaftcnv Model%shoc_cld = shoc_cld +#ifdef CCPP +!HWRF physics suite + if (hwrf_samfdeep .and. imfdeepcnv .ne. 2) then + write(*,*) 'Logic error: hwrf_samfdeep has to be used along with imfdeepcnv=2' + stop + end if + if (hwrf_samfshal .and. imfshalcnv .ne. 2) then + write(*,*) 'Logic error: hwrf_samfshal has to be used along with imfshalcnv=2' + stop + end if + Model%hwrf_samfdeep = hwrf_samfdeep + Model%hwrf_samfshal = hwrf_samfshal +#endif #ifdef CCPP if (oz_phys .and. oz_phys_2015) then write(*,*) 'Logic error: can only use one ozone physics option (oz_phys or oz_phys_2015), not both. Exiting.' @@ -4870,6 +4883,8 @@ subroutine tbd_create (Tbd, IM, Model) if ( Model%isubc_lw == 2 .or. Model%isubc_sw == 2 ) then allocate (Tbd%icsdsw (IM)) allocate (Tbd%icsdlw (IM)) + Tbd%icsdsw = zero + Tbd%icsdlw = zero endif !--- ozone and stratosphere h2o needs @@ -4914,18 +4929,20 @@ subroutine tbd_create (Tbd, IM, Model) Tbd%acvb = clear_val Tbd%acvt = clear_val + if (Model%cplflx .or. Model%cplchm) then + allocate (Tbd%drain_cpl (IM)) + allocate (Tbd%dsnow_cpl (IM)) + Tbd%drain_cpl = clear_val + Tbd%dsnow_cpl = clear_val + endif + if (Model%do_sppt) then allocate (Tbd%dtdtr (IM,Model%levs)) allocate (Tbd%dtotprcp (IM)) allocate (Tbd%dcnvprcp (IM)) - allocate (Tbd%drain_cpl (IM)) - allocate (Tbd%dsnow_cpl (IM)) - Tbd%dtdtr = clear_val Tbd%dtotprcp = clear_val Tbd%dcnvprcp = clear_val - Tbd%drain_cpl = clear_val - Tbd%dsnow_cpl = clear_val endif allocate (Tbd%phy_f2d (IM,Model%ntot2d)) @@ -5467,8 +5484,8 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center) Diag%u10max = zero Diag%v10max = zero Diag%spd10max = zero -! Diag%rain = zero -! Diag%rainc = zero + Diag%rain = zero + Diag%rainc = zero Diag%ice = zero Diag%snow = zero Diag%graupel = zero @@ -5954,11 +5971,6 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%tsurf_land (IM)) allocate (Interstitial%tsurf_ocean (IM)) allocate (Interstitial%ud_mf (IM,Model%levs)) - allocate (Interstitial%ulwsfc_cice (IM)) - allocate (Interstitial%dusfc_cice (IM)) - allocate (Interstitial%dvsfc_cice (IM)) - allocate (Interstitial%dtsfc_cice (IM)) - allocate (Interstitial%dqsfc_cice (IM)) allocate (Interstitial%uustar_ice (IM)) allocate (Interstitial%uustar_land (IM)) allocate (Interstitial%uustar_ocean (IM)) @@ -6481,11 +6493,6 @@ subroutine interstitial_phys_reset (Interstitial, Model) Interstitial%tsurf_land = huge Interstitial%tsurf_ocean = huge Interstitial%ud_mf = clear_val - Interstitial%ulwsfc_cice = clear_val - Interstitial%dusfc_cice = clear_val - Interstitial%dvsfc_cice = clear_val - Interstitial%dtsfc_cice = clear_val - Interstitial%dqsfc_cice = clear_val Interstitial%uustar_ice = huge Interstitial%uustar_land = huge Interstitial%uustar_ocean = huge @@ -6826,11 +6833,6 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%tsurf_land ) = ', sum(Interstitial%tsurf_land ) write (0,*) 'sum(Interstitial%tsurf_ocean ) = ', sum(Interstitial%tsurf_ocean ) write (0,*) 'sum(Interstitial%ud_mf ) = ', sum(Interstitial%ud_mf ) - write (0,*) 'sum(Interstitial%ulwsfc_cice ) = ', sum(Interstitial%ulwsfc_cice ) - write (0,*) 'sum(Interstitial%dusfc_cice ) = ', sum(Interstitial%dusfc_cice ) - write (0,*) 'sum(Interstitial%dvsfc_cice ) = ', sum(Interstitial%dvsfc_cice ) - write (0,*) 'sum(Interstitial%dtsfc_cice ) = ', sum(Interstitial%dtsfc_cice ) - write (0,*) 'sum(Interstitial%dqsfc_cice ) = ', sum(Interstitial%dqsfc_cice ) write (0,*) 'sum(Interstitial%uustar_ice ) = ', sum(Interstitial%uustar_ice ) write (0,*) 'sum(Interstitial%uustar_land ) = ', sum(Interstitial%uustar_land ) write (0,*) 'sum(Interstitial%uustar_ocean ) = ', sum(Interstitial%uustar_ocean ) diff --git a/gfsphysics/GFS_layer/GFS_typedefs.meta b/gfsphysics/GFS_layer/GFS_typedefs.meta index 92f99e155..a9308fffe 100644 --- a/gfsphysics/GFS_layer/GFS_typedefs.meta +++ b/gfsphysics/GFS_layer/GFS_typedefs.meta @@ -2974,6 +2974,18 @@ units = flag dimensions = () type = integer +[hwrf_samfdeep] + standard_name = flag_for_hwrf_samfdeepcnv_scheme + long_name = flag for hwrf samfdeepcnv scheme + units = flag + dimensions = () + type = logical +[hwrf_samfshal] + standard_name = flag_for_hwrf_samfshalcnv_scheme + long_name = flag for hwrf samfshalcnv scheme + units = flag + dimensions = () + type = logical [isatmedmf] standard_name = choice_of_scale_aware_TKE_moist_EDMF_PBL long_name = choice of scale-aware TKE moist EDMF PBL scheme @@ -6621,34 +6633,6 @@ dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys -[dusfc_cice] - standard_name = surface_x_momentum_flux_for_coupling_interstitial - long_name = sfc x momentum flux for coupling interstitial - units = Pa - dimensions = (horizontal_dimension) - type = real - kind = kind_phys -[dvsfc_cice] - standard_name = surface_y_momentum_flux_for_coupling_interstitial - long_name = sfc y momentum flux for coupling interstitial - units = Pa - dimensions = (horizontal_dimension) - type = real - kind = kind_phys -[dtsfc_cice] - standard_name = surface_upward_sensible_heat_flux_for_coupling_interstitial - long_name = sfc sensible heat flux for coupling interstitial - units = W m-2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys -[dqsfc_cice] - standard_name = surface_upward_latent_heat_flux_for_coupling_interstitial - long_name= surface latent heat flux for coupling interstitial - units = W m-2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [elvmax] standard_name = maximum_subgrid_orography long_name = maximum of subgrid orography @@ -8080,13 +8064,6 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys -[ulwsfc_cice] - standard_name = surface_upwelling_longwave_flux_for_coupling_interstitial - long_name = surface upwelling longwave flux for coupling_interstitial - units = W m-2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [uustar_ocean] standard_name = surface_friction_velocity_over_ocean long_name = surface friction velocity over ocean diff --git a/gfsphysics/physics/GFS_debug.F90 b/gfsphysics/physics/GFS_debug.F90 index 75fa97603..bb50e321c 100644 --- a/gfsphysics/physics/GFS_debug.F90 +++ b/gfsphysics/physics/GFS_debug.F90 @@ -20,6 +20,7 @@ module GFS_diagtoscreen interface print_var module procedure print_logic_0d + module procedure print_logic_1d module procedure print_int_0d module procedure print_int_1d module procedure print_real_0d @@ -106,6 +107,7 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, do impi=0,mpisize-1 do iomp=0,ompsize-1 if (mpirank==impi .and. omprank==iomp) then + call print_var(mpirank,omprank, blkno, 'Model%kdt' , Model%kdt) ! Sfcprop call print_var(mpirank,omprank, blkno, 'Sfcprop%slmsk' , Sfcprop%slmsk) call print_var(mpirank,omprank, blkno, 'Sfcprop%oceanfrac', Sfcprop%oceanfrac) @@ -394,7 +396,12 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, call print_var(mpirank,omprank, blkno, 'Coupling%rain_cpl', Coupling%rain_cpl) call print_var(mpirank,omprank, blkno, 'Coupling%snow_cpl', Coupling%snow_cpl) end if + if (Model%cplwav2atm) then + call print_var(mpirank,omprank, blkno, 'Coupling%zorlwav_cpl' , Coupling%zorlwav_cpl ) + end if if (Model%cplflx) then + call print_var(mpirank,omprank, blkno, 'Coupling%oro_cpl' , Coupling%oro_cpl ) + call print_var(mpirank,omprank, blkno, 'Coupling%slmsk_cpl' , Coupling%slmsk_cpl ) call print_var(mpirank,omprank, blkno, 'Coupling%slimskin_cpl', Coupling%slimskin_cpl ) call print_var(mpirank,omprank, blkno, 'Coupling%dusfcin_cpl ', Coupling%dusfcin_cpl ) call print_var(mpirank,omprank, blkno, 'Coupling%dvsfcin_cpl ', Coupling%dvsfcin_cpl ) @@ -458,11 +465,24 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, call print_var(mpirank,omprank, blkno, 'Coupling%shum_wts', Coupling%shum_wts) end if if (Model%do_skeb) then - call print_var(mpirank,omprank, blkno, 'Coupling%skebu_wts', Coupling%skebu_wts) - call print_var(mpirank,omprank, blkno, 'Coupling%skebv_wts', Coupling%skebv_wts) + call print_var(mpirank,omprank, blkno, 'Coupling%skebu_wts', Coupling%skebu_wts ) + call print_var(mpirank,omprank, blkno, 'Coupling%skebv_wts', Coupling%skebv_wts ) end if if (Model%do_sfcperts) then - call print_var(mpirank,omprank, blkno, 'Coupling%sfc_wts', Coupling%sfc_wts) + call print_var(mpirank,omprank, blkno, 'Coupling%sfc_wts' , Coupling%sfc_wts ) + end if + if (Model%do_ca) then + call print_var(mpirank,omprank, blkno, 'Coupling%tconvtend', Coupling%tconvtend ) + call print_var(mpirank,omprank, blkno, 'Coupling%qconvtend', Coupling%qconvtend ) + call print_var(mpirank,omprank, blkno, 'Coupling%uconvtend', Coupling%uconvtend ) + call print_var(mpirank,omprank, blkno, 'Coupling%vconvtend', Coupling%vconvtend ) + call print_var(mpirank,omprank, blkno, 'Coupling%ca_out ', Coupling%ca_out ) + call print_var(mpirank,omprank, blkno, 'Coupling%ca_deep ', Coupling%ca_deep ) + call print_var(mpirank,omprank, blkno, 'Coupling%ca_turb ', Coupling%ca_turb ) + call print_var(mpirank,omprank, blkno, 'Coupling%ca_shal ', Coupling%ca_shal ) + call print_var(mpirank,omprank, blkno, 'Coupling%ca_rad ', Coupling%ca_rad ) + call print_var(mpirank,omprank, blkno, 'Coupling%ca_micro ', Coupling%ca_micro ) + call print_var(mpirank,omprank, blkno, 'Coupling%cape ', Coupling%cape ) end if if(Model%imp_physics == Model%imp_physics_thompson .and. Model%ltaerosol) then call print_var(mpirank,omprank, blkno, 'Coupling%nwfa2d', Coupling%nwfa2d) @@ -531,6 +551,30 @@ subroutine print_int_0d(mpirank,omprank,blkno,name,var) end subroutine print_int_0d + subroutine print_logic_1d(mpirank,omprank,blkno,name,var) + + use machine, only: kind_phys + + implicit none + + integer, intent(in) :: mpirank, omprank, blkno + character(len=*), intent(in) :: name + logical, intent(in) :: var(:) + + integer :: i + +#ifdef PRINT_SUM + write(0,'(2a,3i6,2i8)') 'XXX: ', trim(name), mpirank, omprank, blkno, size(var), count(var) +#elif defined(PRINT_CHKSUM) + write(0,'(2a,3i6,2i8)') 'XXX: ', trim(name), mpirank, omprank, blkno, size(var), count(var) +#else + do i=ISTART,min(IEND,size(var(:))) + write(0,'(2a,3i6,i6,1x,l)') 'XXX: ', trim(name), mpirank, omprank, blkno, i, var(i) + end do +#endif + + end subroutine print_logic_1d + subroutine print_int_1d(mpirank,omprank,blkno,name,var) use machine, only: kind_phys diff --git a/gfsphysics/physics/gcycle.F90 b/gfsphysics/physics/gcycle.F90 index e3666c26a..b410aaa9f 100644 --- a/gfsphysics/physics/gcycle.F90 +++ b/gfsphysics/physics/gcycle.F90 @@ -8,7 +8,7 @@ SUBROUTINE GCYCLE (nblks, Model, Grid, Sfcprop, Cldprop) GFS_sfcprop_type, GFS_cldprop_type implicit none - integer :: nblks + integer, intent(in) :: nblks type(GFS_control_type), intent(in) :: Model type(GFS_grid_type), intent(in) :: Grid(nblks) type(GFS_sfcprop_type), intent(inout) :: Sfcprop(nblks) @@ -34,7 +34,7 @@ SUBROUTINE GCYCLE (nblks, Model, Grid, Sfcprop, Cldprop) TG3FCS (Model%nx*Model%ny), & CNPFCS (Model%nx*Model%ny), & AISFCS (Model%nx*Model%ny), & - F10MFCS(Model%nx*Model%ny), & +! F10MFCS(Model%nx*Model%ny), & VEGFCS (Model%nx*Model%ny), & VETFCS (Model%nx*Model%ny), & SOTFCS (Model%nx*Model%ny), & @@ -103,7 +103,7 @@ SUBROUTINE GCYCLE (nblks, Model, Grid, Sfcprop, Cldprop) ZORFCS (len) = Sfcprop(nb)%zorl (ix) TG3FCS (len) = Sfcprop(nb)%tg3 (ix) CNPFCS (len) = Sfcprop(nb)%canopy (ix) - F10MFCS (len) = Sfcprop(nb)%f10m (ix) +! F10MFCS (len) = Sfcprop(nb)%f10m (ix) VEGFCS (len) = Sfcprop(nb)%vfrac (ix) VETFCS (len) = Sfcprop(nb)%vtype (ix) SOTFCS (len) = Sfcprop(nb)%stype (ix) @@ -190,8 +190,8 @@ SUBROUTINE GCYCLE (nblks, Model, Grid, Sfcprop, Cldprop) len = len + 1 Sfcprop(nb)%slmsk (ix) = SLIFCS (len) if ( Model%nstf_name(1) > 0 ) then - Sfcprop(nb)%tref(ix) = TSFFCS (len) -! if (Model%nstf_name(2) == 0) then + Sfcprop(nb)%tref(ix) = TSFFCS (len) +! if ( Model%nstf_name(2) == 0 ) then ! dt_warm = (Sfcprop(nb)%xt(ix) + Sfcprop(nb)%xt(ix) ) & ! / Sfcprop(nb)%xz(ix) ! Sfcprop(nb)%tsfco(ix) = Sfcprop(nb)%tref(ix) & @@ -205,7 +205,7 @@ SUBROUTINE GCYCLE (nblks, Model, Grid, Sfcprop, Cldprop) Sfcprop(nb)%zorl (ix) = ZORFCS (len) Sfcprop(nb)%tg3 (ix) = TG3FCS (len) Sfcprop(nb)%canopy (ix) = CNPFCS (len) - Sfcprop(nb)%f10m (ix) = F10MFCS (len) +! Sfcprop(nb)%f10m (ix) = F10MFCS (len) Sfcprop(nb)%vfrac (ix) = VEGFCS (len) Sfcprop(nb)%vtype (ix) = VETFCS (len) Sfcprop(nb)%stype (ix) = SOTFCS (len) From d8b3118be1f0dbbca1222c634f6052bea2068918 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 13 Apr 2020 16:09:55 -0600 Subject: [PATCH 2/2] Revert change to .gitmodules and update submodule pointer for ccpp-physics --- .gitmodules | 6 ++---- ccpp/physics | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.gitmodules b/.gitmodules index 70d5f2178..2fd86e7d8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,7 +8,5 @@ branch = master [submodule "ccpp/physics"] path = ccpp/physics - #url = https://github.com/NCAR/ccpp-physics - #branch = dtc/hwrf-physics - url = https://github.com/climbfuji/ccpp-physics - branch = merge_hwrf-sasas_into_dtc_hwrf-physics + url = https://github.com/NCAR/ccpp-physics + branch = dtc/hwrf-physics diff --git a/ccpp/physics b/ccpp/physics index 02bede048..dd891d84b 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 02bede0485c6a1c95763e1dbac9359a25074186b +Subproject commit dd891d84bf8ae19eeea1201f7291d883aa9b46f5