Skip to content

Commit

Permalink
Merge pull request #417 from grantfirl/ufs-dev-PR120
Browse files Browse the repository at this point in the history
UFS-dev PR#120
  • Loading branch information
grantfirl authored Feb 16, 2024
2 parents 7189ee1 + 7d99f78 commit 07174af
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 17 deletions.
41 changes: 31 additions & 10 deletions scm/src/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,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 @@ -1043,6 +1046,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 @@ -1916,7 +1922,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 @@ -1982,6 +1989,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 @@ -2655,6 +2663,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 @@ -2673,13 +2685,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 @@ -3463,7 +3474,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 @@ -3506,6 +3517,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 @@ -3931,6 +3944,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 @@ -4756,6 +4770,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 @@ -5721,6 +5736,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 @@ -7756,6 +7772,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 @@ -7791,8 +7808,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 @@ -7815,8 +7833,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 @@ -8004,8 +8023,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 @@ -8109,6 +8129,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 scm/src/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 @@ -1644,7 +1660,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 @@ -4662,6 +4678,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 @@ -9099,6 +9121,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 @@ -9282,12 +9311,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 @@ -9297,6 +9327,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

0 comments on commit 07174af

Please sign in to comment.