Skip to content

Commit

Permalink
Winterwx (#614)
Browse files Browse the repository at this point in the history
* Six new winter wx diags added to output, accumulated fields added to restart file and changed nsradar_reset, radar_reset to something that makes more sense, that is, nsfullradar_diag and fullradar_diag. Also, added  new namelist parameter to use new precip ice density with the  NOAH LSM. Code changes to upp also made to include the new winter wx diags.
  • Loading branch information
ericaligo-NOAA authored Feb 17, 2023
1 parent 711e33a commit 8b84603
Show file tree
Hide file tree
Showing 9 changed files with 281 additions and 32 deletions.
10 changes: 5 additions & 5 deletions ccpp/data/CCPP_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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() !<
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions ccpp/data/CCPP_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
62 changes: 49 additions & 13 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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() !
Expand Down Expand Up @@ -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))
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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, &
Expand All @@ -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, &
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
70 changes: 62 additions & 8 deletions ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit 8b84603

Please sign in to comment.