diff --git a/ccpp/data/CCPP_typedefs.F90 b/ccpp/data/CCPP_typedefs.F90 index 1c6e4316f..b886beb3e 100644 --- a/ccpp/data/CCPP_typedefs.F90 +++ b/ccpp/data/CCPP_typedefs.F90 @@ -249,7 +249,7 @@ module CCPP_typedefs real (kind=kind_phys), pointer :: qss_ice(:) => null() !< real (kind=kind_phys), pointer :: qss_land(:) => null() !< real (kind=kind_phys), pointer :: qss_water(:) => null() !< - logical :: radar_reset !< + logical :: fullradar_diag !< real (kind=kind_phys) :: raddt !< real (kind=kind_phys), pointer :: rainmp(:) => null() !< real (kind=kind_phys), pointer :: raincd(:) => null() !< @@ -1478,11 +1478,11 @@ subroutine gfs_interstitial_phys_reset (Interstitial, Model) ! Use same logic in UFS to reset Thompson extended diagnostics Interstitial%ext_diag_thompson_reset = Interstitial%max_hourly_reset ! - ! Set flag for resetting radar reflectivity calculation - if (Model%nsradar_reset<0) then - Interstitial%radar_reset = .true. + ! Frequency flag for computing the full radar reflectivity (water coated ice) + if (Model%nsfullradar_diag<0) then + Interstitial%fullradar_diag = .true. else - Interstitial%radar_reset = mod(Model%kdt-1, nint(Model%nsradar_reset/Model%dtp)) == 0 + Interstitial%fullradar_diag = (Model%kdt == 1 .or. mod(Model%kdt, nint(Model%nsfullradar_diag/Model%dtp)) == 0) end if ! end subroutine gfs_interstitial_phys_reset diff --git a/ccpp/data/CCPP_typedefs.meta b/ccpp/data/CCPP_typedefs.meta index c5e7fb5be..c7c5b4521 100644 --- a/ccpp/data/CCPP_typedefs.meta +++ b/ccpp/data/CCPP_typedefs.meta @@ -1699,9 +1699,9 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys -[radar_reset] - standard_name = flag_for_resetting_radar_reflectivity_calculation - long_name = flag for resetting radar reflectivity calculation +[fullradar_diag] + standard_name = do_full_radar_reflectivity + long_name = flag for computing full radar reflectivity units = flag dimensions = () type = logical diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index 9ae606df4..8dd562b14 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -370,7 +370,6 @@ module GFS_typedefs 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 @@ -893,7 +892,7 @@ module GFS_typedefs logical :: ltaerosol !< flag for aerosol version logical :: mraerosol !< flag for merra2_aerosol_aware logical :: lradar !< flag for radar reflectivity - real(kind=kind_phys) :: nsradar_reset !< seconds between resetting radar reflectivity calculation + real(kind=kind_phys) :: nsfullradar_diag!< seconds between resetting radar reflectivity calculation real(kind=kind_phys) :: ttendlim !< temperature tendency limiter per time step in K/s logical :: ext_diag_thompson !< flag for extended diagnostic output from Thompson integer :: thompson_ext_ndiag3d=37 !< number of 3d arrays for extended diagnostic output from Thompson @@ -927,6 +926,7 @@ module GFS_typedefs 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 integer :: lsnow_lsm_ubound!< upper bound for snow arrays, depending on lsnow_lsm + logical :: exticeden !< flag for calculating frozen precip ice density outside of the LSM real(kind=kind_phys), pointer :: zs(:) => null() !< depth of soil levels for land surface model real(kind=kind_phys), pointer :: dzs(:) => null() !< thickness 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 @@ -1731,6 +1731,14 @@ module GFS_typedefs real (kind=kind_phys), pointer :: toticeb(:) => null() !< accumulated ice precipitation in bucket (kg/m2) 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) + real (kind=kind_phys), pointer :: frzr (:) => null() !< accumulated surface freezing rain (m) + real (kind=kind_phys), pointer :: frzrb (:) => null() !< accumulated surface freezing rain in bucket (m) + real (kind=kind_phys), pointer :: frozr (:) => null() !< accumulated surface graupel (m) + real (kind=kind_phys), pointer :: frozrb (:) => null() !< accumulated surface graupel in bucket (m) + real (kind=kind_phys), pointer :: tsnowp (:) => null() !< accumulated surface snowfall (m) + real (kind=kind_phys), pointer :: tsnowpb(:) => null() !< accumulated surface snowfall in bucket (m) + real (kind=kind_phys), pointer :: rhonewsn1(:) => null() !< precipitation ice density outside RUC LSM (kg/m3) + real (kind=kind_phys), pointer :: rhosnf(:) => null() !< precipitation ice density inside RUC LSM (kg/m3) !--- MYNN variables real (kind=kind_phys), pointer :: edmf_a (:,:) => null() ! @@ -2422,7 +2430,6 @@ subroutine sfcprop_create (Sfcprop, IM, Model) 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)) @@ -2438,7 +2445,6 @@ subroutine sfcprop_create (Sfcprop, IM, Model) 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 @@ -3102,7 +3108,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & logical :: ltaerosol = .false. !< flag for aerosol version logical :: mraerosol = .false. !< flag for merra2_aerosol_aware logical :: lradar = .false. !< flag for radar reflectivity - real(kind=kind_phys) :: nsradar_reset = -999.0 !< seconds between resetting radar reflectivity calculation, set to <0 for every time step + real(kind=kind_phys) :: nsfullradar_diag = -999.0 !< seconds between resetting radar reflectivity calculation, set to <0 for every time step real(kind=kind_phys) :: ttendlim = -999.0 !< temperature tendency limiter, set to <0 to deactivate logical :: ext_diag_thompson = .false. !< flag for extended diagnostic output from Thompson real(kind=kind_phys) :: dt_inner = -999.0 !< time step for the inner loop @@ -3120,6 +3126,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & integer :: lsoil = 4 !< number of soil layers integer :: lsoil_lsm = -1 !< number of soil layers internal to land surface model; -1 use lsoil integer :: lsnow_lsm = 3 !< maximum number of snow layers internal to land surface model + logical :: exticeden = .false. !< Use variable precip ice density for NOAH LSM if true or original formulation logical :: rdlai = .false. !< read LAI from input file (for RUC LSM or NOAH LSM WRFv4) logical :: ua_phys = .false. !< flag for using University of Arizona? extension to NOAH LSM WRFv4 logical :: usemonalb = .true. !< flag to read surface diffused shortwave albedo from input file for NOAH LSM WRFv4 @@ -3514,7 +3521,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & mg_do_graupel, mg_do_hail, mg_nccons, mg_nicons, mg_ngcons, & mg_ncnst, mg_ninst, mg_ngnst, sed_supersat, do_sb_physics, & mg_alf, mg_qcmin, mg_do_ice_gmao, mg_do_liq_liu, & - ltaerosol, lradar, nsradar_reset, lrefres, ttendlim, & + ltaerosol, lradar, nsfullradar_diag, lrefres, ttendlim, & ext_diag_thompson, dt_inner, lgfdlmprad, & sedi_semi, decfl, & nssl_cccn, nssl_alphah, nssl_alphahl, & @@ -3524,7 +3531,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- land/surface model control lsm, lsoil, lsoil_lsm, lsnow_lsm, kice, rdlai, & nmtvr, ivegsrc, use_ufo, iopt_thcnd, ua_phys, usemonalb, & - aoasis, fasdas, & + aoasis, fasdas,exticeden, & ! Noah MP options iopt_dveg,iopt_crs,iopt_btr,iopt_run,iopt_sfc, iopt_frz, & iopt_inf, iopt_rad,iopt_alb,iopt_snf,iopt_tbot,iopt_stc, & @@ -4064,7 +4071,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & stop end if Model%lradar = lradar - Model%nsradar_reset = nsradar_reset + Model%nsfullradar_diag = nsfullradar_diag Model%ttendlim = ttendlim Model%ext_diag_thompson= ext_diag_thompson if (dt_inner>0) then @@ -4172,7 +4179,15 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%ivegsrc = ivegsrc Model%isot = isot Model%use_ufo = use_ufo - + Model%exticeden = exticeden + if (Model%exticeden .and. & + (Model%imp_physics /= Model%imp_physics_gfdl .and. Model%imp_physics /= Model%imp_physics_thompson .and. & + Model%imp_physics /= Model%imp_physics_nssl )) then + !see GFS_MP_generic_post.F90; exticeden is only compatible with GFDL, + !Thompson, or NSSL MP + print *,' Using exticeden = T is only valid when using GFDL, Thompson, or NSSL microphysics.' + stop + end if ! GFDL surface layer options Model%lcurr_sf = lcurr_sf Model%pert_cd = pert_cd @@ -4193,7 +4208,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%iopt_inf = iopt_inf Model%iopt_rad = iopt_rad Model%iopt_alb = iopt_alb - Model%iopt_snf = iopt_snf + if (Model%lsm==Model%lsm_noahmp .and. Model%exticeden .and. iopt_snf == 4) then + Model%iopt_snf = 5 + else + Model%iopt_snf = iopt_snf + end if Model%iopt_tbot = iopt_tbot Model%iopt_stc = iopt_stc Model%iopt_trs = iopt_trs @@ -5062,6 +5081,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & if (Model%me == Model%master) then if (Model%lsm == 1) then print *,' NOAH Land Surface Model used' + elseif (Model%lsm == 0) then print *,' OSU no longer supported - job aborted' stop @@ -5358,7 +5378,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & ' decfl=',decfl, & ' effr_in =',Model%effr_in, & ' lradar =',Model%lradar, & - ' nsradar_reset =',Model%nsradar_reset, & + ' nsfullradar_diag =',Model%nsfullradar_diag, & ' num_p3d =',Model%num_p3d, & ' num_p2d =',Model%num_p2d @@ -5861,7 +5881,7 @@ subroutine control_print(Model) print *, ' ltaerosol : ', Model%ltaerosol print *, ' mraerosol : ', Model%mraerosol print *, ' lradar : ', Model%lradar - print *, ' nsradar_reset : ', Model%nsradar_reset + print *, ' nsfullradar_diag : ', Model%nsfullradar_diag print *, ' lrefres : ', Model%lrefres print *, ' ttendlim : ', Model%ttendlim print *, ' ext_diag_thompson : ', Model%ext_diag_thompson @@ -6885,6 +6905,14 @@ subroutine diag_create (Diag, IM, Model) allocate (Diag%epi (IM)) allocate (Diag%smcwlt2 (IM)) allocate (Diag%smcref2 (IM)) + allocate (Diag%rhonewsn1 (IM)) + allocate (Diag%rhosnf (IM)) + allocate (Diag%frzr (IM)) + allocate (Diag%frzrb (IM)) + allocate (Diag%frozr (IM)) + allocate (Diag%frozrb (IM)) + allocate (Diag%tsnowp (IM)) + allocate (Diag%tsnowpb (IM)) if (.not. Model%lsm == Model%lsm_ruc) then allocate (Diag%wet1 (IM)) end if @@ -7220,6 +7248,9 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center) Diag%toticeb = zero Diag%totsnwb = zero Diag%totgrpb = zero + Diag%frzrb = zero + Diag%frozrb = zero + Diag%tsnowpb = zero !--- MYNN variables: if (Model%do_mynnedmf) then @@ -7340,7 +7371,9 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center) Diag%t02min = 999. Diag%rh02max = -999. Diag%rh02min = 999. - Diag%pratemax = 0. + Diag%pratemax = 0. + Diag%rhonewsn1 = 200. + Diag%rhosnf = -1.e3 set_totprcp = .false. if (present(linit) ) set_totprcp = linit if (present(iauwindow_center) ) set_totprcp = iauwindow_center @@ -7350,6 +7383,9 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center) Diag%totice = zero Diag%totsnw = zero Diag%totgrp = zero + Diag%frzr = zero + Diag%frozr = zero + Diag%tsnowp = zero endif end subroutine diag_phys_zero diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index f1aa084ab..c41afa9fb 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -1627,14 +1627,6 @@ type = real kind = kind_phys active = (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme) -[rhofr] - standard_name = frozen_precipitation_density - long_name = density of frozen precipitation - units = kg m-3 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - active = (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme) [tsnow_land] standard_name = temperature_in_surface_snow_at_surface_adjacent_layer_over_land long_name = snow temperature at the bottom of the first snow layer over land @@ -4182,6 +4174,12 @@ units = count dimensions = () type = integer +[exticeden] + standard_name = do_external_surface_frozen_precipitation_density + long_name = flag for calculating frozen precip ice density outside of the LSM + units = flag + dimensions = () + type = logical [zs] standard_name = depth_of_soil_layers long_name = depth of soil levels for land surface model @@ -7517,6 +7515,62 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys +[frzr] + standard_name = cumulative_lwe_thickness_of_surface_freezing_rain_amount + long_name = accumulated surface freezing rain + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[frzrb] + standard_name = cumulative_lwe_thickness_of_surface_freezing_rain_amount_in_bucket + long_name = accumulated surface freezing rain in bucket + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[frozr] + standard_name = cumulative_lwe_thickness_of_surface_graupel_amount + long_name = accumulated surface graupel + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[frozrb] + standard_name = cumulative_lwe_thickness_of_surface_graupel_amount_in_bucket + long_name = accumulated surface graupel in bucket + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[tsnowp] + standard_name = cumulative_lwe_thickness_of_surface_snow_amount + long_name = accumulated surface snow + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[tsnowpb] + standard_name = cumulative_lwe_thickness_of_surface_snow_amount_in_bucket + long_name = accumulated surface snow in bucket + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[rhonewsn1] + standard_name = surface_frozen_precipitation_density + long_name = density of precipitation ice + units = kg m-3 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[rhosnf] + standard_name = lsm_internal_surface_frozen_precipitation_density + long_name = density of frozen precipitation + units = kg m-3 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys [train] standard_name = accumulated_change_of_air_temperature_due_to_FA_scheme long_name = accumulated change of air temperature due to FA MP scheme diff --git a/ccpp/driver/GFS_diagnostics.F90 b/ccpp/driver/GFS_diagnostics.F90 index ff01c6630..9617b3fc2 100644 --- a/ccpp/driver/GFS_diagnostics.F90 +++ b/ccpp/driver/GFS_diagnostics.F90 @@ -1642,6 +1642,89 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%pratemax(:) enddo + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'frzr' + ExtDiag(idx)%desc = 'accumulated surface freezing rain' + ExtDiag(idx)%unit = 'kg/m**2' + ExtDiag(idx)%mod_name = 'gfs_phys' + ExtDiag(idx)%cnvfac = cn_th + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%frzr(:) + enddo + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'frzrb' + ExtDiag(idx)%desc = 'accumulated surface freezing rain in bucket' + ExtDiag(idx)%unit = 'kg/m**2' + ExtDiag(idx)%mod_name = 'gfs_phys' + ExtDiag(idx)%cnvfac = cn_th + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%frzrb(:) + enddo + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'frozr' + ExtDiag(idx)%desc = 'accumulated surface graupel' + ExtDiag(idx)%unit = 'kg/m**2' + ExtDiag(idx)%mod_name = 'gfs_phys' + ExtDiag(idx)%cnvfac = cn_th + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%frozr(:) + enddo + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'frozrb' + ExtDiag(idx)%desc = 'accumulated surface graupel in bucket' + ExtDiag(idx)%unit = 'kg/m**2' + ExtDiag(idx)%mod_name = 'gfs_phys' + ExtDiag(idx)%cnvfac = cn_th + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%frozrb(:) + enddo + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'tsnowp' + ExtDiag(idx)%desc = 'accumulated surface snow' + ExtDiag(idx)%unit = 'kg/m**2' + ExtDiag(idx)%mod_name = 'gfs_phys' + ExtDiag(idx)%cnvfac = cn_th + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%tsnowp(:) + enddo + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'tsnowpb' + ExtDiag(idx)%desc = 'accumulated surface snow in bucket' + ExtDiag(idx)%unit = 'kg/m**2' + ExtDiag(idx)%mod_name = 'gfs_phys' + ExtDiag(idx)%cnvfac = cn_th + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%tsnowpb(:) + enddo + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'rhonewsn' + ExtDiag(idx)%desc = 'precipitation ice density' + ExtDiag(idx)%unit = 'kg m^-3' + ExtDiag(idx)%mod_name = 'gfs_phys' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%rhonewsn1(:) + enddo + idx = idx + 1 ExtDiag(idx)%axes = 2 ExtDiag(idx)%name = 'rain' diff --git a/ccpp/driver/GFS_restart.F90 b/ccpp/driver/GFS_restart.F90 index 4774ff299..c3930d752 100644 --- a/ccpp/driver/GFS_restart.F90 +++ b/ccpp/driver/GFS_restart.F90 @@ -88,6 +88,15 @@ subroutine GFS_restart_populate (Restart, Model, Statein, Stateout, Sfcprop, & else if( trim(ExtDiag(idx)%name) == 'totgrp_ave') then ndiag_rst = ndiag_rst +1 ndiag_idx(ndiag_rst) = idx + else if( trim(ExtDiag(idx)%name) == 'tsnowp') then + ndiag_rst = ndiag_rst +1 + ndiag_idx(ndiag_rst) = idx + else if( trim(ExtDiag(idx)%name) == 'frozr') then + ndiag_rst = ndiag_rst +1 + ndiag_idx(ndiag_rst) = idx + else if( trim(ExtDiag(idx)%name) == 'frzr') then + ndiag_rst = ndiag_rst +1 + ndiag_idx(ndiag_rst) = idx endif endif enddo diff --git a/ccpp/physics b/ccpp/physics index fb066dd18..336285206 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit fb066dd1815cbec4a32f49c35c9cae690de4d3a2 +Subproject commit 336285206d19f06bde4b37a741ac9bc0e15f05e1 diff --git a/io/post_fv3.F90 b/io/post_fv3.F90 index 6b08c4785..58852ce41 100644 --- a/io/post_fv3.F90 +++ b/io/post_fv3.F90 @@ -527,7 +527,8 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp) rel_vort_max, rel_vort_maxhy1, refd_max, & refdm10c_max, u10max, v10max, wspd10max, sfcuxi, & sfcvxi, t10m, t10avg, psfcavg, akhsavg, akmsavg, & - albedo, tg, prate_max, pwat + albedo, tg, prate_max, pwat, snow_acm, snow_bkt, & + acgraup, graup_bucket, acfrain, frzrn_bucket use soil, only: sldpth, sh2o, smc, stc use masks, only: lmv, lmh, htm, vtm, gdlat, gdlon, dx, dy, hbm2, sm, sice use ctlblk_mod, only: im, jm, lm, lp1, jsta, jend, jsta_2l, jend_2u, jsta_m,jend_m, & @@ -1191,6 +1192,72 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp) enddo endif + !Accumulated snowfall + if(trim(fieldname)=='tsnowp') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,snow_acm,arrayr42d,sm,fillValue) + do j=jsta,jend + do i=ista, iend + snow_acm(i,j) = arrayr42d(i,j) + if (abs(arrayr42d(i,j)-fillValue) < small) snow_acm(i,j) = spval + enddo + enddo + endif + + !Snowfall bucket + if(trim(fieldname)=='tsnowpb') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,snow_bkt,arrayr42d,sm,fillValue) + do j=jsta,jend + do i=ista, iend + snow_bkt(i,j) = arrayr42d(i,j) + if (abs(arrayr42d(i,j)-fillValue) < small) snow_bkt(i,j) = spval + enddo + enddo + endif + + !Accumulated graupel + if(trim(fieldname)=='frozr') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,acgraup,arrayr42d,sm,fillValue) + do j=jsta,jend + do i=ista, iend + acgraup(i,j) = arrayr42d(i,j) + if (abs(arrayr42d(i,j)-fillValue) < small) acgraup(i,j) = spval + enddo + enddo + endif + + !Graupel bucket + if(trim(fieldname)=='frozrb') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,graup_bucket,arrayr42d,sm,fillValue) + do j=jsta,jend + do i=ista, iend + graup_bucket(i,j) = arrayr42d(i,j) + if (abs(arrayr42d(i,j)-fillValue) < small) graup_bucket(i,j) = spval + enddo + enddo + endif + + !Accumulated freezing rain + if(trim(fieldname)=='frzr') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,acfrain,arrayr42d,sm,fillValue) + do j=jsta,jend + do i=ista, iend + acfrain(i,j) = arrayr42d(i,j) + if (abs(arrayr42d(i,j)-fillValue) < small) acfrain(i,j) = spval + enddo + enddo + endif + + !Freezing rain bucket + if(trim(fieldname)=='frzrb') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,frzrn_bucket,arrayr42d,sm,fillValue) + do j=jsta,jend + do i=ista, iend + frzrn_bucket(i,j) = arrayr42d(i,j) + if (abs(arrayr42d(i,j)-fillValue) < small) frzrn_bucket(i,j) = spval + enddo + enddo + endif + ! max hourly surface precipitation rate if(trim(fieldname)=='pratemax') then !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,prate_max,arrayr42d,sm,fillValue) diff --git a/upp b/upp index 2b2c84a60..b37f8ab7b 160000 --- a/upp +++ b/upp @@ -1 +1 @@ -Subproject commit 2b2c84a609f575fc293a4f90238391681bc383f0 +Subproject commit b37f8ab7b0f298346d79a37e0c5d4a64037fd4d4