Skip to content

Commit

Permalink
added fuel roughness and midflame wind height throughout, mv fire_win…
Browse files Browse the repository at this point in the history
…d_height to namelist.fire
  • Loading branch information
janmandel committed Feb 24, 2011
1 parent b77462d commit 72219b9
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 27 deletions.
1 change: 0 additions & 1 deletion wrfv2_fire/Registry/registry.fire
Expand Up @@ -145,7 +145,6 @@ rconfig integer fire_sprd_mdl namelist,fire max_domains
rconfig real fire_crwn_hgt namelist,fire max_domains 15. - "fire_crwn_hgt" "height that heat from crown fire is released" "m"
rconfig real fire_ext_grnd namelist,fire max_domains 50. - "fire_ext_grnd" "extinction depth of sfc fire heat" "m"
rconfig real fire_ext_crwn namelist,fire max_domains 50. - "fire_ext_crwn" "extinction depth of crown fire heat" "m"
rconfig real fire_wind_height namelist,fire max_domains 6.096 - "fire_wind_height" "height of uah,vah wind in fire spread formula" "m"
rconfig integer fuel_using_z0 namelist,fire max_domains 1 - "fuel_using_z0" "0=fuel roughness from fuel categories, 1=piecewise const from z0, 2=interpolated from z0"" ""
rconfig integer fire_fuel_read namelist,fire max_domains -1 - "fire_fuel_read" "fuel categories are set by: if 0, uniform; if 1, user-presc; if 2, read from file" ""
rconfig integer fire_fuel_cat namelist,fire max_domains 1 - "fire_fuel_cat" "fuel category if ifuelread=0" ""
Expand Down
1 change: 1 addition & 0 deletions wrfv2_fire/phys/Makefile
Expand Up @@ -412,6 +412,7 @@ module_fr_sfire_driver_wrf.o: \

module_fr_sfire_atm.o: \
../share/module_model_constants.o \
module_fr_sfire_phys.o \
module_fr_sfire_util.o

module_fr_sfire_model.o: \
Expand Down
3 changes: 1 addition & 2 deletions wrfv2_fire/phys/module_fr_sfire_atm.F
Expand Up @@ -8,6 +8,7 @@
module module_fr_sfire_atm

use module_model_constants, only: cp,xlv,g
use module_fr_sfire_phys, only: fire_wind_height
use module_fr_sfire_util

contains
Expand Down Expand Up @@ -177,7 +178,6 @@ END SUBROUTINE fire_tendency
!***
!
subroutine interpolate_atm2fire(id, & ! for debug output, <= 0 no output
fire_wind_height, & ! interpolation height
ids,ide, kds,kde, jds,jde, & ! atm grid dimensions
ims,ime, kms,kme, jms,jme, &
ips,ipe,jps,jpe, &
Expand All @@ -200,7 +200,6 @@ subroutine interpolate_atm2fire(id, & ! for debug output, <= 0 no

!*** arguments
integer, intent(in)::id
real, intent(in):: fire_wind_height ! height above the terrain for vertical interpolation
integer, intent(in):: &
ids,ide, kds,kde, jds,jde, & ! atm domain bounds
ims,ime, kms,kme, jms,jme, & ! atm memory bounds
Expand Down
15 changes: 2 additions & 13 deletions wrfv2_fire/phys/module_fr_sfire_driver.F
Expand Up @@ -242,7 +242,6 @@ subroutine sfire_driver_em ( grid , config_flags &
grid%u_frame,grid%v_frame, &
unit_fxlong,unit_fxlat, & ! coordinates of grid center
config_flags%fire_ext_grnd,config_flags%fire_ext_crwn,config_flags%fire_crwn_hgt, &
config_flags%fire_wind_height, & ! height of wind input to fire spread formula
config_flags%fuel_using_z0, & ! use z0 from atm modes for fuel
fire_num_ignitions, &
fire_ignition_longlat, &
Expand Down Expand Up @@ -301,7 +300,6 @@ subroutine sfire_driver_phys (ifun,need_lfn_update, &
u_frame,v_frame, &
unit_fxlong,unit_fxlat, & ! fxlong, fxlat units in m
fire_ext_grnd,fire_ext_crwn,fire_crwn_hgt, &
fire_wind_height, & ! for vertical wind interpolation
fuel_using_z0, &
num_ignitions, &
ignition_longlat, &
Expand Down Expand Up @@ -361,8 +359,7 @@ subroutine sfire_driver_phys (ifun,need_lfn_update, &
unit_fxlong,unit_fxlat, & ! fxlong, fxlat units in m
fire_crwn_hgt, & ! lowest height crown fire heat is released (m)
fire_ext_grnd, & ! extinction depth of ground fire heat (m)
fire_ext_crwn, & ! wind height for vertical interploation to fire spread
fire_wind_height
fire_ext_crwn ! and for the canopy (m)
integer, intent(in):: fuel_using_z0 ! flag to use atm z0 or not
Expand Down Expand Up @@ -617,13 +614,6 @@ subroutine sfire_driver_phys (ifun,need_lfn_update, &
endif
if(fire_wind_height > 0.)then ! set fz0,fwh for compatibility
do j=jfts,jfte
do i=ifts,ifte
fwh(i,j)=fire_wind_height
enddo
enddo
endif
if(fuel_using_z0.eq.0)then
call message('using roughness from fuel categories')
call crash('not implemented')
Expand Down Expand Up @@ -675,7 +665,6 @@ subroutine sfire_driver_phys (ifun,need_lfn_update, &
if(fuel_using_z0.eq.3)then
call interpolate_atm2fire(id, & ! flag for debug output
fire_wind_height, & ! height to interpolate to
ids,ide, kds,kde, jds,jde, & ! atm grid dimensions
ims,ime, kms,kme, jms,jme, &
ips,ipe, jps,jpe, &
Expand Down Expand Up @@ -732,7 +721,7 @@ subroutine sfire_driver_phys (ifun,need_lfn_update, &
fgrnhfx,fgrnqfx, & ! output: heat fluxes
ros, & ! output: rate of spread for display
nfuel_cat, & ! fuel data per point
fuel_time, & ! save derived internal data
fuel_time,fwh,fz0, & ! save derived internal data
fp & ! fire coefficients
)
Expand Down
8 changes: 4 additions & 4 deletions wrfv2_fire/phys/module_fr_sfire_model.F
Expand Up @@ -32,7 +32,7 @@ subroutine sfire_model ( &
grnhfx,grnqfx, & ! output: heat fluxes
ros, & ! output: rate of spread
nfuel_cat, & ! fuel data per point
fuel_time, & ! save derived internal data
fuel_time,fwh,fz0, & ! save derived internal data
fp &
)

Expand Down Expand Up @@ -119,7 +119,7 @@ subroutine sfire_model ( &

! constant arrays - set at initialization
real, intent(inout), dimension(ifms:ifme, jfms:jfme)::nfuel_cat ! cell based, data, constant
real,intent(inout),dimension(ifms:ifme,jfms:jfme):: fuel_time
real,intent(inout),dimension(ifms:ifme,jfms:jfme):: fuel_time,fwh,fz0
type(fire_params),intent(inout)::fp

!*** local
Expand Down Expand Up @@ -194,8 +194,8 @@ subroutine sfire_model ( &
ifts,ifte,jfts,jfte, &
fdx,fdy,nfuel_cat0, &
nfuel_cat,fuel_time, &
fp &
)
fwh,fz0, &
fp)

! initialize model state to no fire
if(.not.restart)then
Expand Down
45 changes: 38 additions & 7 deletions wrfv2_fire/phys/module_fr_sfire_phys.F
Expand Up @@ -14,8 +14,12 @@ module module_fr_sfire_phys
! subroutines and functions
PUBLIC:: init_fuel_cats,fire_ros,heat_fluxes,set_nfuel_cat,set_fire_params,write_fuels_m

! types
PUBLIC::fire_params

! variables
PUBLIC:: fire_wind_height

! arrays passed to fire_ros
type fire_params
real,pointer,dimension(:,:):: vx,vy ! wind velocity (m/s)
Expand Down Expand Up @@ -92,7 +96,7 @@ module module_fr_sfire_phys
!

! scalar fuel coefficients
REAL, SAVE:: cmbcnst,hfgl,fuelmc_g,fuelmc_c
REAL, SAVE:: cmbcnst,hfgl,fuelmc_g,fuelmc_c, fire_wind_height
! computed values
REAL, SAVE:: bmst,fuelheat

Expand All @@ -101,6 +105,7 @@ module module_fr_sfire_phys
DATA hfgl / 17.e4 / ! W/m^2
DATA fuelmc_g / 0.08 / ! set = 0 for dry ground fuel
DATA fuelmc_c / 1.00 / ! set = 0 for dry canopy
DATA fire_wind_height/0./ ! m, 6.1m Behave, 0 to use fcwh in each category
! REAL, PARAMETER :: bmst = fuelmc_g/(1+fuelmc_g)
! REAL, PARAMETER :: fuelheat = cmbcnst * 4.30e-04 ! convert J/kg to BTU/lb
! real, parameter :: xlv = 2.5e6 ! to make it selfcontained
Expand All @@ -117,9 +122,9 @@ module module_fr_sfire_phys
INTEGER, DIMENSION( mfuelcats ), save :: ichap
REAL , DIMENSION( mfuelcats ), save :: windrf,weight,fgi,fci,fci_d,fct,fcbr, &
fueldepthm,fueldens,fuelmce, &
savr,st,se
savr,st,se,fcwh,fcz0
DATA windrf /0.36, 0.36, 0.44, 0.55, 0.42, 0.44, 0.44, &
0.36, 0.36, 0.36, 0.36, 0.43, 0.46, 1e-7, zf*0 /
0.36, 0.36, 0.36, 0.36, 0.43, 0.46, 1e-7, zf*0 / ! added jmandel October 2010
DATA fgi / 0.166, 0.897, 0.675, 2.468, 0.785, 1.345, 1.092, &
1.121, 0.780, 2.694, 2.582, 7.749, 13.024, 1.e-7, zf*0. /
DATA fueldepthm /0.305, 0.305, 0.762, 1.829, 0.61, 0.762,0.762, &
Expand All @@ -142,6 +147,10 @@ module module_fr_sfire_phys
DATA fct / 60., 60., 60., 60., 60., 60., 60., &
60., 120., 180., 180., 180., 180. , 60. , zf*0. /
DATA ichap / 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , zf*0/
DATA fcwh /0.6 , 0.6, 1.5, 36, 1.2, 1.5, 1.5, &
0.12, 0.12, 0.6, 0.6, 1.38, 1.8, 1.8, zf*0 / ! fuel wind height, added jm 2/23/11
DATA fcz0 /0.3, 0.3, 0.75, 18., 0.6, 0.75, 0.75, &
0.06, 0.06, 0.3, 0.3, 0.69, 0.9, 0.9, zf*0 / ! fuel roughness height, added jm 2/23/11
! =========================================================================

contains
Expand All @@ -158,9 +167,9 @@ subroutine init_fuel_cats
!*** executable

! read
namelist /fuel_scalars/ cmbcnst,hfgl,fuelmc_g,fuelmc_c,nfuelcats,no_fuel_cat
namelist /fuel_scalars/ cmbcnst,hfgl,fuelmc_g,fuelmc_c,nfuelcats,no_fuel_cat,fire_wind_height
namelist /fuel_categories/ fuel_name,windrf,fgi,fueldepthm,savr, &
fuelmce,fueldens,st,se,weight,fci_d,fct,ichap
fuelmce,fueldens,st,se,weight,fci_d,fct,ichap,fcwh,fcz0

!$ if (OMP_GET_THREAD_NUM() .ne. 0)then
!$ call crash('init_fuel_cats: must be called from master thread')
Expand Down Expand Up @@ -188,6 +197,7 @@ subroutine init_fuel_cats
call wrf_dm_bcast_real(hfgl,1)
call wrf_dm_bcast_real(fuelmc_g,1)
call wrf_dm_bcast_real(fuelmc_c,1)
call wrf_dm_bcast_real(fire_wind_height,1)
call wrf_dm_bcast_integer(nfuelcats,1)
call wrf_dm_bcast_integer(no_fuel_cat,1)
call wrf_dm_bcast_real(windrf, nfuelcats)
Expand All @@ -202,6 +212,8 @@ subroutine init_fuel_cats
call wrf_dm_bcast_real(fci_d, nfuelcats)
call wrf_dm_bcast_real(fct, nfuelcats)
call wrf_dm_bcast_integer(ichap, nfuelcats)
call wrf_dm_bcast_integer(fcwh, nfuelcats)
call wrf_dm_bcast_integer(fcz0, nfuelcats)

! compute derived scalars

Expand All @@ -219,6 +231,13 @@ subroutine init_fuel_cats
endif
END DO

if(.not. fire_wind_height>0)then
! reset wind reduction factors
do i=1,nfuelcats
windrf(i)=1.
enddo
endif

! prints

call message('**********************************************************')
Expand Down Expand Up @@ -305,7 +324,7 @@ subroutine write_fuels_m(nsteps,maxwind,maxslope)
!real,pointer,dimension(:,:):: ischap ! 1 if chapparal
!end type fire_params
real, dimension(1:2,1:nsteps), target::vx,vy,zsf,dzdxf,dzdyf,bbb,betafl,phiwc,r_0,fgip,ischap
real, dimension(1:2,1:nsteps)::nfuel_cat,fuel_time,ros
real, dimension(1:2,1:nsteps)::nfuel_cat,fuel_time,ros,fwh,fz0
real::ros_back,ros_wind,ros_slope,propx,propy,r

fp%vx=>vx
Expand Down Expand Up @@ -358,6 +377,7 @@ subroutine write_fuels_m(nsteps,maxwind,maxslope)
1,2,1,nsteps, &
0.,0.,k, &
nfuel_cat,fuel_time, &
fwh,fz0, &
fp )
! set up windspeed and slope table
propx=1.
Expand Down Expand Up @@ -417,6 +437,7 @@ subroutine set_fire_params( &
ifts,ifte,jfts,jfte, &
fdx,fdy,nfuel_cat0, &
nfuel_cat,fuel_time, &
fwh,fz0, &
fp )

implicit none
Expand All @@ -430,7 +451,8 @@ subroutine set_fire_params( &
real, intent(in):: fdx,fdy ! fire mesh spacing
integer,intent(in)::nfuel_cat0 ! default fuel category, if nfuel_cat=0
real, intent(in),dimension(ifms:ifme, jfms:jfme)::nfuel_cat ! fuel data
real, intent(out), dimension(ifms:ifme, jfms:jfme)::fuel_time ! fire params arrays
real, intent(out), dimension(ifms:ifme, jfms:jfme)::fuel_time, &! fire params arrays
fwh,fz0
type(fire_params),intent(inout)::fp

!*** local
Expand Down Expand Up @@ -458,6 +480,8 @@ subroutine set_fire_params( &
fuel_time(i,j)=7./0.85 ! does not matter, just what was there before
fp%phiwc(i,j)=0.
fp%r_0(i,j)=0. ! no fuel, no spread.
fwh(i,j) = 0.2 ! just so that something is there
fz0(i,j) = 0.1
else
if(k.eq.0.and.nfuel_cat0.ge.1.and.nfuel_cat0.le.nfuelcats)then
! replace k=0 by default
Expand All @@ -473,6 +497,13 @@ subroutine set_fire_params( &
call crash('set_fire_params: fuel category out of bounds')
endif

! other quantities passed directly, not in fp
if(fire_wind_height>0)then
fwh(i,j)=fire_wind_height
else
fwh(i,j)=fcwh(k)
endif
fz0(i,j)=fcz0(k)
fuel_time(i,j)=weight(k)/0.85 ! cell based

! do not understand calculations of stime in binit.m4
Expand Down
1 change: 1 addition & 0 deletions wrfv2_fire/test/em_fire/hill/namelist.fire
Expand Up @@ -2,6 +2,7 @@
cmbcnst = 17.433e+06, ! J/kg combustion heat dry fuel
hfgl = 17.e4 , ! W/m^2 heat flux to ignite canopy
fuelmc_g = 0.08, ! ground fuel moisture, set = 0 for dry
fire_wind_height = 0., ! height to take wind from (m), 0 to use fcwh
!jc fuelmc_g = 0.09, ! ground fuel moisture, set = 0 for dry
fuelmc_c = 1.00, ! canopy fuel moisture, set = 0 for dry
nfuelcats = 13, ! number of fuel categories used
Expand Down

0 comments on commit 72219b9

Please sign in to comment.