diff --git a/physics/GWD/ugwpv1_gsldrag.F90 b/physics/GWD/ugwpv1_gsldrag.F90 index b9c56d6bf..863f72b9c 100644 --- a/physics/GWD/ugwpv1_gsldrag.F90 +++ b/physics/GWD/ugwpv1_gsldrag.F90 @@ -304,7 +304,7 @@ end subroutine ugwpv1_gsldrag_finalize !! \htmlinclude ugwpv1_gsldrag_run.html !! subroutine ugwpv1_gsldrag_run(me, master, im, levs, ak, bk, ntrac, lonr, dtp, & - fhzero, kdt, ldiag3d, lssav, flag_for_gwd_generic_tend, do_gsl_drag_ls_bl, & + kdt, ldiag3d, lssav, flag_for_gwd_generic_tend, do_gsl_drag_ls_bl, & do_gsl_drag_ss, do_gsl_drag_tofd, & do_gwd_opt_psl, psl_gwd_dx_factor, & do_ngw_ec, do_ugwp_v1, do_ugwp_v1_orog_only, & @@ -366,7 +366,7 @@ subroutine ugwpv1_gsldrag_run(me, master, im, levs, ak, bk, ntrac, lonr, dtp, logical, intent (in) :: do_ugwp_v1_w_gsldrag ! combination of ORO and NGW schemes integer, intent(in) :: me, master, im, levs, ntrac,lonr - real(kind=kind_phys), intent(in) :: dtp, fhzero + real(kind=kind_phys), intent(in) :: dtp real(kind=kind_phys), intent(in) :: ak(:), bk(:) integer, intent(in) :: kdt, jdat(:) ! option for psl gwd diff --git a/physics/GWD/ugwpv1_gsldrag.meta b/physics/GWD/ugwpv1_gsldrag.meta index 24d8b0688..934d5b138 100644 --- a/physics/GWD/ugwpv1_gsldrag.meta +++ b/physics/GWD/ugwpv1_gsldrag.meta @@ -352,14 +352,6 @@ type = real kind = kind_phys intent = in -[fhzero] - standard_name = period_of_diagnostics_reset - long_name = hours between clearing of diagnostic buckets - units = h - dimensions = () - type = real - kind = kind_phys - intent = in [kdt] standard_name = index_of_timestep long_name = current forecast iteration diff --git a/physics/GWD/unified_ugwp.F90 b/physics/GWD/unified_ugwp.F90 index 05f9030a8..aeaa54471 100644 --- a/physics/GWD/unified_ugwp.F90 +++ b/physics/GWD/unified_ugwp.F90 @@ -244,7 +244,7 @@ end subroutine unified_ugwp_finalize !! \htmlinclude unified_ugwp_run.html !! ! \section det_unified_ugwp GFS Unified GWP Scheme Detailed Algorithm - subroutine unified_ugwp_run(me, master, im, levs, ak,bk, ntrac, dtp, fhzero, kdt, & + subroutine unified_ugwp_run(me, master, im, levs, ak,bk, ntrac, dtp, kdt, & lonr, oro, oro_uf, hprime, nmtvr, oc, theta, sigma, gamma, elvmax, clx, oa4, & varss,oc1ss,oa4ss,ol4ss,dx,dusfc_ms,dvsfc_ms,dusfc_bl,dvsfc_bl,dusfc_ss, & dvsfc_ss,dusfc_fd,dvsfc_fd,dtaux2d_ms,dtauy2d_ms,dtaux2d_bl,dtauy2d_bl, & @@ -290,7 +290,7 @@ subroutine unified_ugwp_run(me, master, im, levs, ak,bk, ntrac, dtp, fhzero, kdt real(kind=kind_phys), intent(in), dimension(:,:) :: del, ugrs, vgrs, tgrs, prsl, prslk, phil real(kind=kind_phys), intent(in), dimension(:,:) :: prsi, phii real(kind=kind_phys), intent(in), dimension(:,:) :: q1 - real(kind=kind_phys), intent(in) :: dtp, fhzero, cdmbgwd(:), alpha_fd + real(kind=kind_phys), intent(in) :: dtp, cdmbgwd(:), alpha_fd integer, intent(in) :: jdat(:) logical, intent(in) :: do_tofd, ldiag_ugwp, ugwp_seq_update diff --git a/physics/GWD/unified_ugwp.meta b/physics/GWD/unified_ugwp.meta index fe66b4b4b..62db52127 100644 --- a/physics/GWD/unified_ugwp.meta +++ b/physics/GWD/unified_ugwp.meta @@ -331,14 +331,6 @@ type = real kind = kind_phys intent = in -[fhzero] - standard_name = period_of_diagnostics_reset - long_name = hours between clearing of diagnostic buckets - units = h - dimensions = () - type = real - kind = kind_phys - intent = in [kdt] standard_name = index_of_timestep long_name = current forecast iteration diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_post.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_post.F90 index 97d9b138d..ce2a2a9e2 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_post.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_post.F90 @@ -24,7 +24,7 @@ subroutine GFS_MP_generic_post_run( cnvprcp, totprcp, totice, totsnw, totgrp, cnvprcpb, totprcpb, toticeb, totsnwb, totgrpb, rain_cpl, rainc_cpl, & snow_cpl, pwat, frzr, frzrb, frozr, frozrb, tsnowp, tsnowpb, rhonewsn1, exticeden, & drain_cpl, dsnow_cpl, lsm, lsm_ruc, lsm_noahmp, raincprv, rainncprv, iceprv, snowprv, & - graupelprv, draincprv, drainncprv, diceprv, dsnowprv, dgraupelprv, dtp, & + graupelprv, draincprv, drainncprv, diceprv, dsnowprv, dgraupelprv, dtp, num_diag_buckets, & dtend, dtidx, index_of_temperature, index_of_process_mp,ldiag3d, qdiag3d,dqdt_qmicro, lssav, num_dfi_radar, & fh_dfi_radar,index_of_process_dfi_radar, ix_dfi_radar, dfi_radar_tten, radar_tten_limits, fhour, prevsq, & iopt_lake, iopt_lake_clm, lkm, use_lake_model, errmsg, errflg) @@ -39,6 +39,7 @@ subroutine GFS_MP_generic_post_run( logical, intent(in) :: cal_pre, lssav, ldiag3d, qdiag3d, cplflx, cplchm, cpllnd, progsigma, exticeden integer, intent(in) :: index_of_temperature,index_of_process_mp,use_lake_model(:) integer, intent(in) :: imfshalcnv,imfshalcnv_gf,imfdeepcnv,imfdeepcnv_gf,imfdeepcnv_samf + integer, intent(in) :: num_diag_buckets integer, dimension (:), intent(in) :: htop real(kind=kind_phys), intent(in) :: fh_dfi_radar(:), fhour, con_t0c real(kind=kind_phys), intent(in) :: radar_tten_limits(:) @@ -58,8 +59,9 @@ subroutine GFS_MP_generic_post_run( real(kind=kind_phys), dimension(:), intent(in ) :: sr real(kind=kind_phys), dimension(:), intent(inout) :: rain, domr_diag, domzr_diag, domip_diag, doms_diag, tprcp, & - srflag, cnvprcp, totprcp, totice, totsnw, totgrp, cnvprcpb, & - totprcpb, toticeb, totsnwb, totgrpb, pwat + srflag, cnvprcp, totprcp, totice, totsnw, totgrp, & + toticeb, totsnwb, totgrpb, pwat + real(kind=kind_phys), dimension(:,:), intent(inout) :: cnvprcpb, totprcpb real(kind=kind_phys), dimension(:), intent(inout), optional :: rain_cpl, rainc_cpl, snow_cpl real(kind=kind_phys), dimension(:,:,:), intent(inout), optional :: dtend @@ -101,7 +103,7 @@ subroutine GFS_MP_generic_post_run( real(kind=kind_phys), parameter :: p850 = 85000.0_kind_phys ! *DH - integer :: i, k, ic, itrac, idtend, itime, idtend_radar, idtend_mp + integer :: i, k, ic, itrac, idtend, itime, idtend_radar, idtend_mp, ib real(kind=kind_phys), parameter :: zero = 0.0_kind_phys, one = 1.0_kind_phys real(kind=kind_phys) :: crain, csnow, onebg, tem, total_precip, tem1, tem2, ttend @@ -451,7 +453,7 @@ subroutine GFS_MP_generic_post_run( if_save_fields: if (lssav) then ! if (Model%me == 0) print *,'in phys drive, kdt=',Model%kdt, & -! 'totprcpb=', Diag%totprcpb(1),'totprcp=',Diag%totprcp(1), & +! 'totprcpb=', Diag%totprcpb(1,1),'totprcp=',Diag%totprcp(1), & ! 'rain=',Diag%rain(1) do i=1,im cnvprcp (i) = cnvprcp (i) + rainc(i) @@ -460,12 +462,16 @@ subroutine GFS_MP_generic_post_run( totsnw (i) = totsnw (i) + snow(i) totgrp (i) = totgrp (i) + graupel(i) - cnvprcpb(i) = cnvprcpb(i) + rainc(i) - totprcpb(i) = totprcpb(i) + rain(i) toticeb (i) = toticeb (i) + ice(i) totsnwb (i) = totsnwb (i) + snow(i) totgrpb (i) = totgrpb (i) + graupel(i) enddo + do ib=1,num_diag_buckets + do i=1,im + cnvprcpb(i,ib) = cnvprcpb(i,ib) + rainc(i) + totprcpb(i,ib) = totprcpb(i,ib) + rain(i) + enddo + enddo if_tendency_diagnostics: if (ldiag3d) then idtend = dtidx(index_of_temperature,index_of_process_mp) diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_post.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_post.meta index 15ad5f6b3..ea1b456e3 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_post.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_post.meta @@ -590,7 +590,7 @@ standard_name = cumulative_lwe_thickness_of_convective_precipitation_amount_in_bucket long_name = cumulative convective precipitation in bucket units = m - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_loop_extent,number_of_diagnostic_buckets) type = real kind = kind_phys intent = inout @@ -598,7 +598,7 @@ standard_name = accumulated_lwe_thickness_of_precipitation_amount_in_bucket long_name = accumulated total precipitation in bucket units = m - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_loop_extent,number_of_diagnostic_buckets) type = real kind = kind_phys intent = inout @@ -798,6 +798,13 @@ type = real kind = kind_phys intent = in +[num_diag_buckets] + standard_name = number_of_diagnostic_buckets + long_name = number of diagnostic bucket reset periods + units = count + dimensions = () + type = integer + intent = in [num_dfi_radar] standard_name = number_of_radar_derived_temperature_or_convection_suppression_intervals long_name = number of time ranges with radar-derived microphysics temperature tendencies or radar-derived convection suppression diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_post.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_post.F90 index 8102d70eb..21de71ecb 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_post.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_post.F90 @@ -11,7 +11,7 @@ module GFS_SCNV_generic_post subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, qdiag3d, & frain, gu0, gv0, gt0, gq0, save_u, save_v, save_t, save_q, & clw, shcnvcw, rain1, npdf3d, num_p3d, ncnvcld3d, cnvc, cnvw, nsamftrac, & - rainc, cnvprcp, cnvprcpb, cnvw_phy_f3d, cnvc_phy_f3d, & + rainc, cnvprcp, cnvw_phy_f3d, cnvc_phy_f3d, & dtend, dtidx, index_of_temperature, index_of_x_wind, index_of_y_wind, & index_of_process_scnv, ntqv, flag_for_scnv_generic_tend, & ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl,ntgnc,ntsigma, & @@ -41,7 +41,7 @@ subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, qdiag3d, & logical, intent(in) :: shcnvcw real(kind=kind_phys), dimension(:), intent(in) :: rain1 real(kind=kind_phys), dimension(:, :), intent(in) :: cnvw, cnvc - real(kind=kind_phys), dimension(:), intent(inout) :: rainc, cnvprcp, cnvprcpb + real(kind=kind_phys), dimension(:), intent(inout) :: rainc, cnvprcp ! The following arrays may not be allocated, depending on certain flags and microphysics schemes. ! Since Intel 15 crashes when passing unallocated arrays to arrays defined with explicit shape, ! use assumed-shape arrays. Note that Intel 18 and GNU 6.2.0-8.1.0 tolerate explicit-shape arrays diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_post.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_post.meta index f90fccf01..02b6bbe54 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_post.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_post.meta @@ -256,14 +256,6 @@ type = real kind = kind_phys intent = inout -[cnvprcpb] - standard_name = cumulative_lwe_thickness_of_convective_precipitation_amount_in_bucket - long_name = cumulative convective precipitation in bucket - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout [cnvw_phy_f3d] standard_name = convective_cloud_condensate_mixing_ratio long_name = convective cloud water mixing ratio in the phy_f3d array diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_stochastics.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_stochastics.F90 index 974e9dc71..37311d958 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_stochastics.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_stochastics.F90 @@ -62,7 +62,7 @@ subroutine GFS_stochastics_run (im, km, kdt, delt, do_sppt, pert_mp, use_zmtnblc zmtnblck, sppt_wts, skebu_wts, skebv_wts, shum_wts,& diss_est, ugrs, vgrs, tgrs, qgrs_wv, & qgrs_cw, qgrs_rw, qgrs_sw, qgrs_iw, qgrs_gl, & - gu0, gv0, gt0, gq0_wv, dtdtnp, & + gu0, gv0, gt0, gq0_wv, dtdtnp, num_diag_buckets, & gq0_cw, gq0_rw, gq0_sw, gq0_iw, gq0_gl, & rain, rainc, tprcp, totprcp, cnvprcp, & totprcpb, cnvprcpb, cplflx, cpllnd, & @@ -85,6 +85,7 @@ subroutine GFS_stochastics_run (im, km, kdt, delt, do_sppt, pert_mp, use_zmtnblc logical, intent(in) :: use_zmtnblck logical, intent(in) :: do_shum logical, intent(in) :: do_skeb + integer, intent(in) :: num_diag_buckets real(kind_phys), dimension(:), intent(in) :: zmtnblck ! sppt_wts only allocated if do_sppt == .true. real(kind_phys), dimension(:,:), intent(inout), optional :: sppt_wts @@ -123,8 +124,8 @@ subroutine GFS_stochastics_run (im, km, kdt, delt, do_sppt, pert_mp, use_zmtnblc real(kind_phys), dimension(:), intent(inout) :: tprcp real(kind_phys), dimension(:), intent(inout) :: totprcp real(kind_phys), dimension(:), intent(inout) :: cnvprcp - real(kind_phys), dimension(:), intent(inout) :: totprcpb - real(kind_phys), dimension(:), intent(inout) :: cnvprcpb + real(kind_phys), dimension(:,:), intent(inout) :: totprcpb + real(kind_phys), dimension(:,:), intent(inout) :: cnvprcpb logical, intent(in) :: cplflx logical, intent(in) :: cpllnd ! rain_cpl only allocated if cplflx == .true. or cplchm == .true. or cpllnd == .true. @@ -140,7 +141,7 @@ subroutine GFS_stochastics_run (im, km, kdt, delt, do_sppt, pert_mp, use_zmtnblc integer, intent(out) :: errflg !--- local variables - integer :: k, i + integer :: k, i, ib real(kind=kind_phys) :: upert, vpert, tpert, qpert, qnew, sppt_vwt real(kind=kind_phys), dimension(1:im,1:km) :: ca @@ -234,11 +235,13 @@ subroutine GFS_stochastics_run (im, km, kdt, delt, do_sppt, pert_mp, use_zmtnblc ! instantaneous precip rate going into land model at the next time step tprcp(:) = sppt_wts(:,15)*tprcp(:) totprcp(:) = totprcp(:) + (sppt_wts(:,15) - 1 )*rain(:) - ! acccumulated total and convective preciptiation + ! convective precipitation cnvprcp(:) = cnvprcp(:) + (sppt_wts(:,15) - 1 )*rainc(:) ! bucket precipitation adjustment due to sppt - totprcpb(:) = totprcpb(:) + (sppt_wts(:,15) - 1 )*rain(:) - cnvprcpb(:) = cnvprcpb(:) + (sppt_wts(:,15) - 1 )*rainc(:) + do ib=1,num_diag_buckets + totprcpb(:,ib) = totprcpb(:,ib) + (sppt_wts(:,15) - 1 )*rain(:) + cnvprcpb(:,ib) = cnvprcpb(:,ib) + (sppt_wts(:,15) - 1 )*rainc(:) + enddo if (cplflx .or. cpllnd) then rain_cpl(:) = rain_cpl(:) + (sppt_wts(:,15) - 1.0)*drain_cpl(:) @@ -338,11 +341,13 @@ subroutine GFS_stochastics_run (im, km, kdt, delt, do_sppt, pert_mp, use_zmtnblc ! instantaneous precip rate going into land model at the next time step tprcp(:) = ca(:,15)*tprcp(:) totprcp(:) = totprcp(:) + (ca(:,15) - 1 )*rain(:) - ! acccumulated total and convective preciptiation - cnvprcp(:) = cnvprcp(:) + (ca(:,15) - 1 )*rainc(:) - ! bucket precipitation adjustment due to sppt - totprcpb(:) = totprcpb(:) + (ca(:,15) - 1 )*rain(:) - cnvprcpb(:) = cnvprcpb(:) + (ca(:,15) - 1 )*rainc(:) + ! convective precipitation + cnvprcp(:) = cnvprcp(:) + (ca(:,15) - 1 )*rainc(:) + ! bucket precipitation adjustment due to sppt + do ib=1,num_diag_buckets + totprcpb(:,ib) = totprcpb(:,ib) + (ca(:,15) - 1 )*rain(:) + cnvprcpb(:,ib) = cnvprcpb(:,ib) + (ca(:,15) - 1 )*rainc(:) + enddo if (cplflx .or. cpllnd) then rain_cpl(:) = rain_cpl(:) + (ca(:,15) - 1.0)*drain_cpl(:) diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_stochastics.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_stochastics.meta index 904030522..19f1911f2 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_stochastics.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_stochastics.meta @@ -83,6 +83,13 @@ dimensions = () type = integer intent = in +[num_diag_buckets] + standard_name = number_of_diagnostic_buckets + long_name = number of diagnostic bucket reset periods + units = count + dimensions = () + type = integer + intent = in [delt] standard_name = timestep_for_physics long_name = physics timestep @@ -406,7 +413,7 @@ standard_name = accumulated_lwe_thickness_of_precipitation_amount_in_bucket long_name = accumulated total precipitation in bucket units = m - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_loop_extent,number_of_diagnostic_buckets) type = real kind = kind_phys intent = inout @@ -414,7 +421,7 @@ standard_name = cumulative_lwe_thickness_of_convective_precipitation_amount_in_bucket long_name = cumulative convective precipitation in bucket units = m - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_loop_extent,number_of_diagnostic_buckets) type = real kind = kind_phys intent = inout