Skip to content

Commit

Permalink
merge NOAA-EMC#773
Browse files Browse the repository at this point in the history
  • Loading branch information
uturuncoglu committed Jan 24, 2024
2 parents 49fada6 + 3009def commit 91bc28f
Show file tree
Hide file tree
Showing 4 changed files with 314 additions and 55 deletions.
56 changes: 34 additions & 22 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -458,15 +458,18 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: emanoc (:) => null() !< instantaneous anthro. oc emission

!--- Smoke. These 2 arrays are input smoke emission and frp
real (kind=kind_phys), pointer :: ebb_smoke_in(:) => null() !< input smoke emission
real (kind=kind_phys), pointer :: frp_input (:) => null() !< input FRP

real (kind=kind_phys), pointer :: ebb_smoke_in(:) => null() !< input smoke emission
real (kind=kind_phys), pointer :: frp_output (:) => null() !< output FRP
!--- 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
integer, pointer :: fire_type (:) => null() !< fire type
real (kind=kind_phys), pointer :: peak_hr (:) => null() !< peak hour of fire emissions
real (kind=kind_phys), pointer :: lu_nofire (:) => null() !<lu_nofire pixels
real (kind=kind_phys), pointer :: lu_qfire (:) => null() !<lu_qfire pixels
!--- 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
real (kind=kind_phys), pointer :: fire_heat_flux (:) => null() !< heat flux from wildfire
real (kind=kind_phys), pointer :: frac_grid_burned (:) => 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 @@ -630,10 +633,6 @@ module GFS_typedefs
!--- For fire diurnal cycle
real (kind=kind_phys), pointer :: ebu_smoke (:,:) => null() !< 3D ebu array

!--- For smoke and dust optical extinction
real (kind=kind_phys), pointer :: smoke_ext (:,:) => null() !< 3D aod array
real (kind=kind_phys), pointer :: dust_ext (:,:) => null() !< 3D aod array

!--- For MYNN PBL transport of smoke and dust
real (kind=kind_phys), pointer :: chem3d (:,:,:) => null() !< 3D aod array
real (kind=kind_phys), pointer :: ddvel (:,: ) => null() !< 2D dry deposition velocity
Expand All @@ -647,6 +646,8 @@ module GFS_typedefs
!--- Fire plume rise diagnostics
real (kind=kind_phys), pointer :: min_fplume (:) => null() !< minimum plume rise level
real (kind=kind_phys), pointer :: max_fplume (:) => null() !< maximum plume rise level
real (kind=kind_phys), pointer :: uspdavg (:) => null() !< BL average wind speed
real (kind=kind_phys), pointer :: hpbl_thetav (:) => null() !< BL depth parcel method
!--- hourly fire potential index
real (kind=kind_phys), pointer :: rrfs_hwp (:) => null() !< hourly fire potential index
real (kind=kind_phys), pointer :: rrfs_hwp_ave (:) => null() !< *Average* hourly fire potential index
Expand Down Expand Up @@ -1543,6 +1544,7 @@ module GFS_typedefs
logical :: do_plumerise
integer :: addsmoke_flag
integer :: plumerisefire_frq
integer :: n_dbg_lines
integer :: smoke_forecast
logical :: aero_ind_fdb ! WFA/IFA indirect
logical :: aero_dir_fdb ! smoke/dust direct
Expand Down Expand Up @@ -2703,8 +2705,8 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
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))
allocate (Sfcprop%fire_heat_flux (IM))
allocate (Sfcprop%frac_grid_burned(IM))

!
Sfcprop%wetness = clear_val
Expand All @@ -2725,8 +2727,8 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
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
Sfcprop%fire_heat_flux = clear_val
Sfcprop%frac_grid_burned= clear_val
!
end if

Expand Down Expand Up @@ -2820,20 +2822,28 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
allocate (Sfcprop%emseas (IM))
allocate (Sfcprop%emanoc (IM))
allocate (Sfcprop%ebb_smoke_in (IM))
allocate (Sfcprop%frp_input (IM))
allocate (Sfcprop%frp_output (IM))
allocate (Sfcprop%fhist (IM))
allocate (Sfcprop%coef_bb_dc(IM))
allocate (Sfcprop%fire_type (IM))
allocate (Sfcprop%peak_hr (IM))
allocate (Sfcprop%lu_nofire (IM))
allocate (Sfcprop%lu_qfire (IM))
allocate (Sfcprop%fire_in (IM,Model%fire_aux_data_levels))

! IMPORTANT: This initialization must match rrfs_sd_fill_data
Sfcprop%emdust = clear_val
Sfcprop%emseas = clear_val
Sfcprop%emanoc = clear_val
Sfcprop%ebb_smoke_in = clear_val
Sfcprop%frp_input = clear_val
Sfcprop%frp_output = clear_val
Sfcprop%fhist = 1.
Sfcprop%coef_bb_dc = clear_val
Sfcprop%fire_type = 0
Sfcprop%fire_in = clear_val
Sfcprop%peak_hr = clear_val
Sfcprop%lu_nofire = clear_val
Sfcprop%lu_qfire = clear_val
endif

end subroutine sfcprop_create
Expand Down Expand Up @@ -3203,27 +3213,27 @@ subroutine coupling_create (Coupling, IM, Model)
if(Model%rrfs_sd) then
!--- needed for smoke aerosol option
allocate (Coupling%ebu_smoke (IM,Model%levs))
allocate (Coupling%smoke_ext (IM,Model%levs))
allocate (Coupling%dust_ext (IM,Model%levs))
allocate (Coupling%chem3d (IM,Model%levs,Model%nchem))
allocate (Coupling%ddvel (IM,Model%ndvel))
allocate (Coupling%wetdpc_flux(IM,Model%nchem))
allocate (Coupling%wetdpr_flux(IM,Model%nchem))
allocate (Coupling%drydep_flux(IM,Model%ndvel))
allocate (Coupling%min_fplume(IM))
allocate (Coupling%max_fplume(IM))
allocate (Coupling%uspdavg(IM))
allocate (Coupling%hpbl_thetav(IM))
allocate (Coupling%rrfs_hwp (IM))
allocate (Coupling%rrfs_hwp_ave (IM))
Coupling%ebu_smoke = clear_val
Coupling%smoke_ext = clear_val
Coupling%dust_ext = clear_val
Coupling%chem3d = clear_val
Coupling%ddvel = clear_val
Coupling%wetdpc_flux = clear_val
Coupling%wetdpr_flux = clear_val
Coupling%drydep_flux = clear_val
Coupling%min_fplume = clear_val
Coupling%max_fplume = clear_val
Coupling%uspdavg = clear_val
Coupling%hpbl_thetav = clear_val
Coupling%rrfs_hwp = clear_val
Coupling%rrfs_hwp_ave = clear_val
endif
Expand Down Expand Up @@ -3912,11 +3922,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
real(kind=kind_phys) :: dust_moist_correction = 1.0
real(kind=kind_phys) :: dust_alpha = 0.
real(kind=kind_phys) :: dust_gamma = 0.
real(kind=kind_phys) :: wetdep_ls_alpha = 0.
real(kind=kind_phys) :: wetdep_ls_alpha = 0.5
integer :: dust_moist_opt = 1 ! fecan :1 else shao
integer :: ebb_dcycle = 1 ! 1:retro; 2:forecast
integer :: seas_opt = 2
integer :: dust_opt = 5
integer :: dust_opt = 1
integer :: drydep_opt = 1
integer :: coarsepm_settling = 1
integer :: plume_wind_eff = 1
Expand All @@ -3925,6 +3935,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
logical :: do_plumerise = .false.
integer :: addsmoke_flag = 1
integer :: plumerisefire_frq = 60
integer :: n_dbg_lines = 3
integer :: smoke_forecast = 0 ! RRFS-sd read in ebb_smoke
logical :: aero_ind_fdb = .false. ! RRFS-sd wfa/ifa emission
logical :: aero_dir_fdb = .false. ! RRFS-sd smoke/dust radiation feedback
Expand Down Expand Up @@ -4096,7 +4107,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
wetdep_ls_opt, smoke_forecast, aero_ind_fdb, aero_dir_fdb, &
rrfs_smoke_debug, do_plumerise, plumerisefire_frq, &
addsmoke_flag, enh_mix, mix_chem, smoke_dir_fdb_coef, &
do_smoke_transport,smoke_conv_wet_coef, &
do_smoke_transport,smoke_conv_wet_coef,n_dbg_lines, &
!--- C3/GF closures
ichoice,ichoicem,ichoice_s, &
!--- (DFI) time ranges with radar-prescribed microphysics tendencies
Expand Down Expand Up @@ -4330,6 +4341,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%extended_sd_diags = extended_sd_diags
Model%wetdep_ls_opt = wetdep_ls_opt
Model%do_plumerise = do_plumerise
Model%n_dbg_lines = n_dbg_lines
Model%plumerisefire_frq = plumerisefire_frq
Model%addsmoke_flag = addsmoke_flag
Model%smoke_forecast = smoke_forecast
Expand Down
60 changes: 57 additions & 3 deletions ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -979,15 +979,15 @@
type = real
kind = kind_phys
active = (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme)
[fire_heat_flux_out]
[fire_heat_flux]
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]
[frac_grid_burned]
standard_name = fraction_of_grid_cell_burning
long_name = ration of the burnt area to the grid cell area
units = frac
Expand Down Expand Up @@ -2288,7 +2288,7 @@
type = real
kind = kind_phys
active = (do_smoke_coupling)
[frp_input]
[frp_output]
standard_name = frp_hourly
long_name = hourly fire radiative power
units = MW
Expand All @@ -2312,6 +2312,37 @@
type = real
kind = kind_phys
active = (do_smoke_coupling)
[fire_type]
standard_name = fire_type
long_name = type of fire
units = 1
dimensions = (horizontal_loop_extent)
type = integer
active = (do_smoke_coupling)
[peak_hr]
standard_name = peak_hr_fire
long_name = time_of_peak_fire_emissions
units = s
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (do_smoke_coupling)
[lu_nofire]
standard_name = sum_of_land_use_fractions_for_no_fire_pixels
long_name = land use of no fire pixels for type
units = 1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (do_smoke_coupling)
[lu_qfire]
standard_name = sum_of_land_use_fractions_for_cropland_fire_pixels
long_name = land use of fire pixels for type
units = 1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (do_smoke_coupling)
[fire_in]
standard_name = smoke_fire_auxiliary_input
long_name = smoke fire auxiliary input variables
Expand Down Expand Up @@ -3156,6 +3187,22 @@
type = real
kind = kind_phys
active = (do_smoke_coupling)
[uspdavg]
standard_name = mean_wind_speed_in_boundary_layer
long_name = average wind speed within the boundary layer
units = m s-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (do_smoke_coupling)
[hpbl_thetav]
standard_name = atmosphere_boundary_layer_thickness_from_modified_parcel
long_name = pbl height based on modified parcel method
units = m
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (do_smoke_coupling)
[rrfs_hwp]
standard_name = hourly_wildfire_potential
long_name = rrfs hourly fire weather potential
Expand Down Expand Up @@ -6788,6 +6835,13 @@
dimensions = ()
type = integer
active = (do_smoke_coupling)
[n_dbg_lines]
standard_name = smoke_debug_lines
long_name = rrfs smoke add smoke option
units = index
dimensions = ()
type = integer
active = (do_smoke_coupling)
[addsmoke_flag]
standard_name = control_for_smoke_biomass_burning_emissions
long_name = rrfs smoke add smoke option
Expand Down
Loading

0 comments on commit 91bc28f

Please sign in to comment.