Skip to content

Commit

Permalink
MYNN-EDMF, MYNN surface layer, and Thompson AA updates (NOAA-EMC#712)
Browse files Browse the repository at this point in the history
* In GFS_diagnostics make LAI, WILT and FLDCP be outputted with all LSMs. Also, output of LAI should
not depend on RDLAI.

* In GFS_typedefs.* add surface heat flux from the fire for use in RUC LSM.

* Fix hail size output diagnostic array size (#1)

* Added one more variable - frac_grid_burned_out - to GFS_typedefs.F90.
Also, the surface heat flux from fires and frac_grid_burned_out are added to the
model output in GFS_diagnostics.F90.

---------

Co-authored-by: tanyasmirnova <[email protected]>
Co-authored-by: Anders Jensen <[email protected]>
  • Loading branch information
3 people committed Nov 17, 2023
1 parent 9ba5c5d commit 34675c2
Show file tree
Hide file tree
Showing 4 changed files with 152 additions and 61 deletions.
41 changes: 31 additions & 10 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,9 @@ module GFS_typedefs
!--- For fire diurnal cycle
real (kind=kind_phys), pointer :: fhist (:) => null() !< instantaneous fire coef_bb
real (kind=kind_phys), pointer :: coef_bb_dc (:) => null() !< instantaneous fire coef_bb
!--- wildfire heat flux
real (kind=kind_phys), pointer :: fire_heat_flux_out (:) => null() !< heat flux from wildfire
real (kind=kind_phys), pointer :: frac_grid_burned_out (:) => null() !< fraction of grid cell burning

!--- For smoke and dust auxiliary inputs
real (kind=kind_phys), pointer :: fire_in (:,:) => null() !< fire auxiliary inputs
Expand Down Expand Up @@ -1050,6 +1053,9 @@ module GFS_typedefs
integer :: isncond_opt=1 !< control for soil thermal conductivity option in RUC land surface model
integer :: isncovr_opt=1 !< control for snow cover fraction option in RUC land surface model

! -- Fire heat flux
logical :: add_fire_heat_flux=.false. !<control to add fireheat flux to RUC LSM

logical :: use_ufo !< flag for gcycle surface option

! GFDL Surface Layer options
Expand Down Expand Up @@ -1908,7 +1914,8 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: det_thl (:,:) => null() !
real (kind=kind_phys), pointer :: det_sqv (:,:) => null() !
real (kind=kind_phys), pointer :: maxMF (:) => null() !
integer, pointer :: nupdraft (:) => null() !
real (kind=kind_phys), pointer :: maxwidth (:) => null() !
real (kind=kind_phys), pointer :: ztop_plume (:) => null() !
integer, pointer :: ktop_plume (:) => null() !
real (kind=kind_phys), pointer :: exch_h (:,:) => null() !
real (kind=kind_phys), pointer :: exch_m (:,:) => null() !
Expand Down Expand Up @@ -1974,6 +1981,7 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: cldfra (:,:) => null() !< instantaneous 3D cloud fraction
!--- MP quantities for 3D diagnositics
real (kind=kind_phys), pointer :: refl_10cm(:,:) => null() !< instantaneous refl_10cm
real (kind=kind_phys), pointer :: max_hail_diam_sfc(:) => null() !< instantaneous max hail diameter sfc
real (kind=kind_phys), pointer :: cldfra2d (:) => null() !< instantaneous 2D cloud fraction
real (kind=kind_phys), pointer :: total_albedo (:) => null() !< total sky (with cloud) albedo at toa
real (kind=kind_phys), pointer :: lwp_ex (:) => null() !< liquid water path from microphysics
Expand Down Expand Up @@ -2665,6 +2673,10 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
allocate (Sfcprop%snowfallac_ice (IM))
allocate (Sfcprop%acsnow_land (IM))
allocate (Sfcprop%acsnow_ice (IM))
allocate (Sfcprop%xlaixy (IM))
allocate (Sfcprop%fire_heat_flux_out (IM))
allocate (Sfcprop%frac_grid_burned_out (IM))

!
Sfcprop%wetness = clear_val
Sfcprop%sh2o = clear_val
Expand All @@ -2683,13 +2695,12 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
Sfcprop%snowfallac_ice = clear_val
Sfcprop%acsnow_land = clear_val
Sfcprop%acsnow_ice = clear_val
Sfcprop%xlaixy = clear_val
Sfcprop%fire_heat_flux_out = clear_val
Sfcprop%frac_grid_burned_out = clear_val
!
if (Model%rdlai) then
allocate (Sfcprop%xlaixy (IM))
Sfcprop%xlaixy = clear_val
end if

end if

allocate (Sfcprop%rmol (IM ))
allocate (Sfcprop%flhc (IM ))
allocate (Sfcprop%flqc (IM ))
Expand Down Expand Up @@ -3472,7 +3483,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
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 :: rdlai = .false. !< read LAI from input file at cold start (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
real(kind=kind_phys) :: aoasis = 1.0 !< potential evaporation multiplication factor for NOAH LSM WRFv4
Expand Down Expand Up @@ -3515,6 +3526,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &

logical :: use_ufo = .false. !< flag for gcycle surface option

logical :: add_fire_heat_flux = .false. !< Flag for fire heat flux

logical :: lcurr_sf = .false. !< flag for taking ocean currents into account in GFDL surface layer
logical :: pert_cd = .false. !< flag for perturbing the surface drag coefficient for momentum in surface layer scheme
integer :: ntsflg = 0 !< flag for updating skin temperature in the GFDL surface layer scheme
Expand Down Expand Up @@ -3926,6 +3939,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
iopt_inf, iopt_rad,iopt_alb,iopt_snf,iopt_tbot,iopt_stc, &
iopt_trs, iopt_diag, &
! RUC lsm options
add_fire_heat_flux, &
mosaic_lu, mosaic_soil, isncond_opt, isncovr_opt, &
! GFDL surface layer options
lcurr_sf, pert_cd, ntsflg, sfenth, &
Expand Down Expand Up @@ -4702,6 +4716,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%mosaic_soil = mosaic_soil
Model%isncond_opt = isncond_opt
Model%isncovr_opt = isncovr_opt
Model%add_fire_heat_flux = add_fire_heat_flux ! JLS

!--- tuning parameters for physical parameterizations
Model%ras = ras
Expand Down Expand Up @@ -5666,6 +5681,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
print *,' mosaic_soil = ',mosaic_soil
print *,' isncond_opt = ',isncond_opt
print *,' isncovr_opt = ',isncovr_opt
print *,' add_fire_heat_flux = ',add_fire_heat_flux
else
print *,' Unsupported LSM type - job aborted - lsm=',Model%lsm
stop
Expand Down Expand Up @@ -7700,6 +7716,7 @@ subroutine diag_create (Diag, IM, Model)

!--- 3D diagnostics for Thompson MP / GFDL MP
allocate (Diag%refl_10cm(IM,Model%levs))
allocate (Diag%max_hail_diam_sfc(IM))

!--- New PBL Diagnostics
allocate (Diag%dkt(IM,Model%levs))
Expand Down Expand Up @@ -7735,8 +7752,9 @@ subroutine diag_create (Diag, IM, Model)
allocate (Diag%qbuoy (IM,Model%levs))
allocate (Diag%qdiss (IM,Model%levs))
endif
allocate (Diag%nupdraft (IM))
allocate (Diag%maxwidth (IM))
allocate (Diag%maxmf (IM))
allocate (Diag%ztop_plume(IM))
allocate (Diag%ktop_plume(IM))
allocate (Diag%exch_h (IM,Model%levs))
allocate (Diag%exch_m (IM,Model%levs))
Expand All @@ -7759,8 +7777,9 @@ subroutine diag_create (Diag, IM, Model)
Diag%qbuoy = clear_val
Diag%qdiss = clear_val
endif
Diag%nupdraft = 0
Diag%maxwidth = clear_val
Diag%maxmf = clear_val
Diag%ztop_plume = clear_val
Diag%ktop_plume = 0
Diag%exch_h = clear_val
Diag%exch_m = clear_val
Expand Down Expand Up @@ -7948,8 +7967,9 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center)
Diag%det_thl = clear_val
Diag%det_sqv = clear_val
endif
Diag%nupdraft = 0
Diag%maxwidth = clear_val
Diag%maxmf = clear_val
Diag%ztop_plume = clear_val
Diag%ktop_plume = 0
Diag%exch_h = clear_val
Diag%exch_m = clear_val
Expand Down Expand Up @@ -8053,6 +8073,7 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center)

! max hourly diagnostics
Diag%refl_10cm = -35.
Diag%max_hail_diam_sfc = -999.
Diag%refdmax = -35.
Diag%refdmax263k = -35.
Diag%t02max = -999.
Expand Down
50 changes: 44 additions & 6 deletions ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,22 @@
type = real
kind = kind_phys
active = (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme)
[fire_heat_flux_out]
standard_name = surface_fire_heat_flux
long_name = heat flux of fire at the surface
units = W m-2
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme)
[frac_grid_burned_out]
standard_name = fraction_of_grid_cell_burning
long_name = ration of the burnt area to the grid cell area
units = frac
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme)
[snoalb]
standard_name = upper_bound_of_max_albedo_assuming_deep_snow
long_name = maximum snow albedo
Expand Down Expand Up @@ -1630,7 +1646,7 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_land_surface_scheme == identifier_for_noah_land_surface_scheme .or. control_for_land_surface_scheme == identifier_for_noahmp_land_surface_scheme .or. (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme .and. flag_for_reading_leaf_area_index_from_input))
active = (control_for_land_surface_scheme == identifier_for_noah_land_surface_scheme .or. control_for_land_surface_scheme == identifier_for_noahmp_land_surface_scheme .or. control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme)
[xsaixy]
standard_name = stem_area_index
long_name = stem area index
Expand Down Expand Up @@ -4648,6 +4664,12 @@
units = flag
dimensions = ()
type = integer
[add_fire_heat_flux]
standard_name = flag_for_fire_heat_flux
long_name = flag to add fire heat flux to LSM
units = flag
dimensions = ()
type = logical
[isncond_opt]
standard_name = control_for_soil_thermal_conductivity_option_in_ruc_lsm
long_name = control for soil thermal conductivity option in RUC land surface model
Expand Down Expand Up @@ -9006,6 +9028,13 @@
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
[max_hail_diam_sfc]
standard_name = max_hail_diameter_sfc
long_name = instantaneous maximum hail diameter at lowest model level
units = m
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[dkt]
standard_name = atmosphere_heat_diffusivity
long_name = atmospheric heat diffusivity
Expand Down Expand Up @@ -9189,12 +9218,13 @@
type = real
kind = kind_phys
active = (flag_for_mellor_yamada_nakanishi_niino_pbl_scheme .and. control_for_tke_budget_output == 1)
[nupdraft]
standard_name = number_of_plumes
long_name = number of plumes per grid column
units = count
[maxwidth]
standard_name = maximum_width_of_plumes
long_name = maximum width of plumes per grid column
units = m
dimensions = (horizontal_loop_extent)
type = integer
type = real
kind = kind_phys
active = (flag_for_mellor_yamada_nakanishi_niino_pbl_scheme)
[maxMF]
standard_name = maximum_mass_flux
Expand All @@ -9204,6 +9234,14 @@
type = real
kind = kind_phys
active = (flag_for_mellor_yamada_nakanishi_niino_pbl_scheme)
[ztop_plume]
standard_name = height_of_tallest_plume_in_a_column
long_name = height of tallest plume in a column
units = m
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (flag_for_mellor_yamada_nakanishi_niino_pbl_scheme)
[ktop_shallow]
standard_name = k_level_of_highest_reaching_plume
long_name = k-level of highest reaching plume
Expand Down
Loading

0 comments on commit 34675c2

Please sign in to comment.