Skip to content

Commit

Permalink
WRF_Fire model developments (wrf-model#403)
Browse files Browse the repository at this point in the history
TYPE: new feature/enhancement

KEYWORDS: WRF-Fire, level-set method, other fire-related enhancements

SOURCE: Domingo Munoz-Esparza (NCAR)

DESCRIPTION OF CHANGES: Here a list of the changes:
•	Proper parallelization of the entire level-set algorithm using MPI.
•	3rd-order Runge-Kutta time integration scheme for the level-set equations.
•	3rd- and 5th-order weighted essentially non-oscillatory (WENO) schemes for the discretization of the advection term in the level-set equations [also 2nd- and 4th-order schemes are available].
•	A hybrid-order level-set method with locally reduced artificial viscosity (high-order over a local band).
•	Reinitialization PDE for the level set (also using hybrid-order discretization).
•	Transport and dispersion of fire-generated smoke as a passive tracer.
•	Diagnosed flame length.
•	Option to extrapolate mid-flame height winds to reduce over-coupling of atmospheric fields impacted by the fire.
•	Initialization from observed fire area.
•	Scott & Burgan (40) fuel model crosswalk to Anderson (13).
•	Several bug fixes.
•	Modified test/em_fire/namelist.input* files.

LIST OF MODIFIED FILES: list of changed files (use `git diff --name-status master` to get formatted list)

M       Registry/registry.fire
M       dyn_em/module_initialize_fire.F
M       phys/module_fr_fire_atm.F
M       phys/module_fr_fire_core.F
M       phys/module_fr_fire_driver.F
M       phys/module_fr_fire_driver_wrf.F
M       phys/module_fr_fire_model.F
M       phys/module_fr_fire_phys.F
M       phys/module_fr_fire_util.F
M       test/em_fire/namelist.input_hill_simple
M       test/em_fire/namelist.input_two_fires

TESTS CONDUCTED: 
1. Regression test with WTF_v04.04 produces the following failures (note that the listed Nesting cases also failed with the fresh repository version of the code where the current developments where implemented):
WRFV3_gnu_32_33_34.2018-03-05_13:50:44:em_real8      namelist.input.76      Nesting    mpi     FCST     FAIL      
WRFV3_gnu_32_33_34.2018-03-05_13:50:44:em_real8      namelist.input.77      Nesting    mpi     FCST     FAIL      
WRFV3_intel_13_14_15.2018-03-05_13:50:24:em_real8      namelist.input.76      Nesting    mpi     FCST     FAIL      
WRFV3_intel_13_14_15.2018-03-05_13:50:24:em_real8      namelist.input.76      Nesting    openmp  FCST     FAIL      
WRFV3_intel_13_14_15.2018-03-05_13:50:24:em_real8      namelist.input.77      Nesting    mpi     FCST     FAIL      
WRFV3_pgi_52_53_54.2018-03-05_13:51:23:em_real8      namelist.input.77      Nesting    openmp  FCST     FAIL

2. Performed an extensive suite of both idealized and real fire simulations. All completed successfully.
  • Loading branch information
domingom authored and davegill committed Mar 9, 2018
1 parent b357a11 commit e26f21f
Show file tree
Hide file tree
Showing 11 changed files with 1,334 additions and 434 deletions.
67 changes: 51 additions & 16 deletions Registry/registry.fire
Expand Up @@ -12,7 +12,7 @@ package fire_sfire ifire==2 - state:nfuel_ca

# level function history support
dimspec ign 2 constant=1 z i_lfn_history
state real lfn_hist *i{ign}*j fire 1 Z i012hr "LFN_HIST" "level function history" "1"
state real lfn_hist *i*j fire 1 Z i012hr "LFN_HIST" "level function history" "1"
state real lfn_time {ign} fire 1 - i012hr "LFN_TIME" "level function history time" "s"


Expand All @@ -32,18 +32,28 @@ state real rthfrten ikj fire 1 z hr "RTHFRTEN"
state real rqvfrten ikj fire 1 z hr "RQVFRTEN" "humidity tendency"

# diagnostics only
state real avg_fuel_frac ij fire 1 z hr "AVG_FUEL_FRAC" "fuel remaining averaged to atmospheric grid" "1"
state real grnhfx ij fire 1 z hr "GRNHFX" "heat flux from ground fire" "W/m^2"
state real grnqfx ij fire 1 z hr "GRNQFX" "moisture flux from ground fire" "W/m^2"
state real canhfx ij fire 1 z hr "CANHFX" "heat flux from crown fire" "W/m^2"
state real canqfx ij fire 1 z hr "CANQFX" "moisture flux from crown fire" "W/m^2"
state real uah ij fire 1 X hr "UAH" "wind at fire_wind_height" "m/s"
state real vah ij fire 1 Y hr "VAH" "wind at fire_wind_height" "m/s"
state real avg_fuel_frac ij fire 1 z hr "AVG_FUEL_FRAC" "fuel remaining averaged to atmospheric grid" "1"
state real grnhfx ij fire 1 z hr "GRNHFX" "heat flux from ground fire" "W/m^2"
state real grnqfx ij fire 1 z hr "GRNQFX" "moisture flux from ground fire" "W/m^2"
state real canhfx ij fire 1 z hr "CANHFX" "heat flux from crown fire" "W/m^2"
state real canqfx ij fire 1 z hr "CANQFX" "moisture flux from crown fire" "W/m^2"
state real uah ij fire 1 X hr "UAH" "wind at fire_wind_height" "m/s"
state real vah ij fire 1 Y hr "VAH" "wind at fire_wind_height" "m/s"
state real grnhfx_fu ij fire 1 z r "GRNHFX_FU" "heat flux from ground fire (feedback unsensitive)" "W/m^2"
state real grnqfx_fu ij fire 1 z r "GRNQFX_FU" "moisture flux from ground fire (feedback unsensitive)" "W/m^2"

# sfire variables on fire grid
# (also using tign_g,zs,z_at_w,dz8w,nfuel_cat,fluxes,zsf)
#
state real lfn *i*j fire 1 z hr "LFN" "level function" "1"
state real lfn_0 *i*j fire 1 z r "LFN_0" "level function for time integration, step 0" "1"
state real lfn_1 *i*j fire 1 z r "LFN_1" "level function for time integration, step 1" "1"
state real lfn_2 *i*j fire 1 z r "LFN_2" "level function for time integration, step 2" "1"
state real lfn_s0 *i*j fire 1 z r "LFN_S0" "level set sign function from LSM integration" "1"
state real lfn_s1 *i*j fire 1 z r "LFN_S1" "level set function for reinitialization integration" "1"
state real lfn_s2 *i*j fire 1 z r "LFN_S2" "level set function for reinitialization integration" "1"
state real lfn_s3 *i*j fire 1 z r "LFN_S3" "level set function for reinitialization integration" "1"
#
state real fuel_frac *i*j fire 1 z hr "FUEL_FRAC" "fuel remaining" "1"
state real fire_area *i*j fire 1 z hr "FIRE_AREA" "fraction of cell area on fire" "1"
state real uf *i*j fire 1 z hr "UF" "fire wind" "m/s"
Expand All @@ -52,7 +62,10 @@ state real fgrnhfx *i*j fire 1 z hr "FGRNHFX"
state real fgrnqfx *i*j fire 1 z hr "FGRNQFX" "moisture flux from ground fire" "W/m^2"
state real fcanhfx *i*j fire 1 z hr "FCANHFX" "heat flux from crown fire" "W/m^2"
state real fcanqfx *i*j fire 1 z hr "FCANQFX" "moisture flux from crown fire" "W/m^2"
state real ros *i*j fire 1 z hr "ROS" "rate of spread" "m/s"
state real ros *i*j fire 1 z r "ROS" "rate of spread" "m/s"
state real burnt_area_dt *i*j fire 1 z hr "BURNT_AREA_DT" "fraction of cell area burnt on current dt" "-"
state real flame_length *i*j fire 1 z hr "FLAME_LENGTH" "fire flame length" "m"
state real ros_front *i*j fire 1 z hr "ROS_FRONT" "rate of spread at fire front" "m/s"

# constant data arrays
state real fxlong *i*j fire 1 z ihr "FXLONG" "longitude of midpoints of fire cells" "degrees"
Expand All @@ -64,14 +77,16 @@ state real phiwc *i*j fire 1 z hr "PHIWC"
state real r_0 *i*j fire 1 z hr "R_0" "fuel"
state real fgip *i*j fire 1 z hr "FGIP" "fuel"
state real ischap *i*j fire 1 z hr "ISCHAP" "fuel"
state real fz0 *i*j fire 1 z ihr "FZ0" "roughness length of fire cells" "m"
state real iboros *i*j fire 1 z hr "IBOROS" "fire intensity over rate of spread" "kJ/m^2"

#
# fire configure namelist variables
#
#<Table> <Type> <Sym> <How set> <Nentries> <Default>
rconfig integer ifire namelist,fire max_domains 0
rconfig integer fire_boundary_guard namelist,fire max_domains 2 - "fire_boundary_guard" "cells to stop when fire close to domain boundary"
# ignition for sfire
rconfig integer fire_boundary_guard namelist,fire max_domains 8 - "fire_boundary_guard" "cells to stop when fire close to domain boundary"
# ignition for WRF-Fire
rconfig integer fire_num_ignitions namelist,fire max_domains 0 - "fire_num_ignitions" "number of ignition lines"
rconfig real fire_ignition_ros1 namelist,fire max_domains 0.01 - "fire_ignition_ros1" "rate of spread during ignition" "m/s"
rconfig real fire_ignition_start_lon1 namelist,fire max_domains 0. - "fire_ignition_start_long1" "long coord of start of ignition line" "deg"
Expand Down Expand Up @@ -148,13 +163,12 @@ rconfig integer fire_fuel_cat namelist,fire max_domains
# sfire switches
rconfig integer fire_print_msg namelist,fire max_domains 0 - "fire_write_msg" "write fire statistics, 0 no writes, 1+ for more" ""
rconfig integer fire_print_file namelist,fire max_domains 0 - "fire_write_file" "write fire output text files, 0 no writes, 1+ for more" ""
# method selection`
# method selection
rconfig integer fire_fuel_left_method namelist,fire max_domains 1 - "fire_fuel_left_method" "1 or 2, compute fuel_left" ""
rconfig integer fire_fuel_left_irl namelist,fire max_domains 2 - "fire_fuel_left_irl" "submesh to compute fuel lwft, even, at least 2" ""
rconfig integer fire_fuel_left_jrl namelist,fire max_domains 2 - "fire_fuel_left_jrl" "submesh to compute fuel lwft, even, at least 2" ""
rconfig real fire_back_weight namelist,fire max_domains 0.5 - "fire_back_weight" "RK timestepping coefficient, 0=forward, 0.5=Heun" "1"
rconfig integer fire_grows_only namelist,fire max_domains 1 - "fire_grows_only" "if >0 level set function cannot increase = fire can only grow" "1"
rconfig integer fire_upwinding namelist,fire max_domains 3 - "fire_upwinding" "upwind normal spread: 1=standard, 2=godunov, 3=eno, 4=sethian" "1"
rconfig integer fire_upwinding namelist,fire max_domains 9 - "fire_upwinding" "upwind normal spread: 1=standard, 2=godunov, 3=eno, 4=sethian, 5=2nd-order, 6=WENO3, 7=WENO5, 8=hybrid WENO3/ENO1, 9=hybrid WENO5/ENO1" "1"
rconfig integer fire_upwind_split namelist,fire max_domains 0 - "fire_upwind_split" "1=upwind advection separately from normal direction spread" "1"
rconfig real fire_viscosity namelist,fire max_domains 0.4 - "fire_viscosity" "artificial viscosity in level set method" "1"
rconfig real fire_lfn_ext_up namelist,fire max_domains 1.0 - "fire_lfn_ext_up" "0.=extend level set function at boundary by reflection, 1.=always up" "1"
Expand Down Expand Up @@ -200,10 +214,32 @@ rconfig real sfc_vegfra namelist,fire max_domains
rconfig real sfc_canwat namelist,fire max_domains 0 - "sfc_canwat" "canopy water" ""
rconfig integer sfc_ivgtyp namelist,fire max_domains 18 - "sfc_ivgtyp" "dominant vegetation category in the LSM scheme" ""
rconfig integer sfc_isltyp namelist,fire max_domains 7 - "sfc_isltyp" "dominant soil category in the LSM scheme" ""
# namelist options for new WRF-Fire capabilities DME
rconfig logical fire_lsm_reinit namelist,fire max_domains .true. - "flag to activate reinitialization of level set method"
rconfig integer fire_lsm_reinit_iter namelist,fire max_domains 1 - "number of iterations for the reinitialization PDE"
rconfig integer fire_upwinding_reinit namelist,fire max_domains 4 - "numerical scheme (space) for reinitialization PDE: 1=WENO3, 2=WENO5, 3=hybrid WENO3-ENO1, 4=hybrid WENO5-ENO1"
rconfig logical fire_is_real_perim namelist,fire max_domains .false. - ".false. = point/line ignition, .true. = observed perimeter"
rconfig integer fire_lsm_band_ngp namelist,fire max_domains 4 - "number of grid points around lfn=0 that WENO5/3 is used (ENO1 elsewhere), for fire_upwinding_reinit=4,5 and fire_upwinding=8,9 options"
rconfig logical fire_lsm_zcoupling namelist,fire max_domains .false. - "flag to activate reference velocity at a different height from fire_wind_height"
rconfig real fire_lsm_zcoupling_ref namelist,fire max_domains 50. - "reference height from wich u at fire_wind_hegiht is calculated using a logarithmic profile" "m"
rconfig real fire_tracer_smoke namelist,fire max_domains 0.02 - "parts per unit of burned fuel becoming smoke (tracer_opt=3)" "g_smoke/kg_air"
rconfig real fire_viscosity_bg namelist,fire max_domains 0.4 - "fire_viscosity_bg" "artificial viscosity in the near-front region" "1"
rconfig real fire_viscosity_band namelist,fire max_domains 0.5 - "fire_viscosity_band" "number of times the hybrid advection band to transition from fire_viscosity_bg to fire_viscosity" "1"
rconfig integer fire_viscosity_ngp namelist,fire max_domains 2 - "number of grid points around lfn=0 where low artificial viscosity is used = fire_viscosity_bg"
rconfig real fire_slope_factor namelist,fire max_domains 1.0 - "slope correction factor" "-"
# tracers for WRF-Fire
state real fire_smoke ikjftb tracer 1 - irhusdf=(bdy_interp:dt) "fire_smoke" "fire_smoke" "g_smoke/kg_air"
package tracer_fire tracer_opt==3 - tracer:fire_smoke
#
# Fire halo descriptions
#
halo HALO_FIRE_LFN dyn_em 24:lfn
halo HALO_FIRE_LFN dyn_em 48:lfn
halo HALO_FIRE_LFN_0 dyn_em 48:lfn_0
halo HALO_FIRE_LFN_1 dyn_em 48:lfn_1
halo HALO_FIRE_LFN_2 dyn_em 48:lfn_2
halo HALO_FIRE_LFN_S1 dyn_em 48:lfn_s1
halo HALO_FIRE_LFN_S2 dyn_em 48:lfn_s2
halo HALO_FIRE_LFN_S3 dyn_em 48:lfn_s3
halo HALO_FIRE_TIGN dyn_em 8:tign_g
halo HALO_FIRE_HT dyn_em 8:ht
halo HALO_FIRE_PHB dyn_em 8:phb
Expand All @@ -218,5 +254,4 @@ halo HALO_FIRE_FUEL dyn_em 8:fuel_frac,fuel_time,bbb,betafl,phiwc,r_0,fgip,
# ----------------------------------------
# end fire variables and configuration
# ----------------------------------------

##
5 changes: 0 additions & 5 deletions dyn_em/module_initialize_fire.F
Expand Up @@ -445,11 +445,6 @@ SUBROUTINE init_domain_rk ( grid &
ifms,ifme,jfms,jfme, &
ifts,ifte,jfts,jfte, &
grid%fxlong,grid%fxlat )
call set_ideal_coord( grid%dx,grid%dy, &
ids,ide,jds,jde, &
ims,ime,jms,jme, &
its,ite,jts,jte, &
grid%xlong,grid%xlat )

! set terrain height

Expand Down
60 changes: 60 additions & 0 deletions phys/module_fr_fire_atm.F
Expand Up @@ -10,9 +10,69 @@ module module_fr_fire_atm

use module_model_constants, only: cp,xlv
use module_fr_fire_util
use module_state_description, only: num_tracer
use module_state_description, only: p_fire_smoke

contains

! DME subroutine for passive tracers
subroutine add_fire_tracer_emissions( &
tracer_opt,dt,dx,dy, &
ifms,ifme,jfms,jfme, &
ifts,ifte,jtfs,jfte, &
ids,ide,kds,kde,jds,jde, &
ims,ime,kms,kme,jms,jme, &
its,ite,kts,kte,jts,jte, &
rho,dz8w, &
burnt_area_dt,fgip, &
tracer,fire_tracer_smoke &
)

implicit none
! arguments
integer,intent(in)::tracer_opt
real,intent(in)::fire_tracer_smoke
real,intent(in)::dt,dx,dy
integer,intent(in)::ifms,ifme,jfms,jfme,ifts,ifte,jtfs,jfte,ids,ide,kds,kde,jds,jde,ims,ime,kms,kme,jms,jme,its,ite,kts,kte,jts,jte
real,intent(in)::rho(ims:ime,kms:kme,jms:jme),dz8w(ims:ime,kms:kme,jms:jme)
real,intent(in),dimension(ifms:ifme,jfms:jfme)::burnt_area_dt,fgip
real,intent(inout)::tracer(ims:ime,kms:kme,jms:jme,num_tracer)
! local
integer::isz1,jsz1,isz2,jsz2,ir,jr
integer::i,j,ibase,jbase,i_f,ioff,j_f,joff
real::avgw,emis,conv

isz1 = ite-its+1
jsz1 = jte-jts+1
isz2 = ifte-ifts+1
jsz2 = jfte-jtfs+1
ir=isz2/isz1
jr=jsz2/jsz1
avgw = 1.0/(ir*jr)

do j=max(jds+1,jts),min(jte,jde-2)
jbase=jtfs+jr*(j-jts)
do i=max(ids+1,its),min(ite,ide-2)
ibase=ifts+ir*(i-its)
do joff=0,jr-1
j_f=joff+jbase
do ioff=0,ir-1
i_f=ioff+ibase
if (num_tracer >0)then
emis=avgw*fire_tracer_smoke*burnt_area_dt(i_f,j_f)*fgip(i_f,j_f)*1000/(rho(i,kts,j)*dz8w(i,kts,j)) ! g_smoke/kg_air
tracer(i,kts,j,p_fire_smoke)=tracer(i,kts,j,p_fire_smoke)+emis
endif
enddo
enddo
enddo
enddo

end subroutine add_fire_tracer_emissions

!
!***
!

SUBROUTINE fire_tendency( &
ids,ide, kds,kde, jds,jde, & ! dimensions
ims,ime, kms,kme, jms,jme, &
Expand Down

0 comments on commit e26f21f

Please sign in to comment.