Skip to content

Commit

Permalink
fxing fuel diagnostics to account for wind reduction factors and for …
Browse files Browse the repository at this point in the history
…moisture
  • Loading branch information
janmandel committed Aug 30, 2012
1 parent 2afc3de commit bce8561
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions wrfv2_fire/phys/module_fr_sfire_phys.F
Expand Up @@ -838,9 +838,9 @@ subroutine write_fuels_m(nsteps,maxwind,maxslope)
integer, intent(in):: nsteps ! number of steps for speed computation
real, intent(in):: maxwind,maxslope ! computer from zero to these

integer:: iounit,k,j,i
integer:: iounit,k,j,i,isave
type(fire_params)::fp
real, dimension(1:3,1:nsteps), target::vx,vy,zsf,dzdxf,dzdyf,bbb,phisc,phiwc,r_0,fgip,ischap,fmc_g
real, dimension(1:3,1:nsteps), target::vx,vy,zsf,dzdxf,dzdyf,bbb,phisc,phiwc,r_0,fgip,ischap,fmc_g,wind
real, dimension(1:3,1:nsteps)::nfuel_cat,fuel_time,ros,fwh,fz0
real::ros_back,ros_wind,ros_slope,propx,propy,r

Expand Down Expand Up @@ -897,45 +897,51 @@ subroutine write_fuels_m(nsteps,maxwind,maxslope)
! nfuel_cat,fuel_time, &
! fp )
nfuel_cat = k
do j=1,nsteps ! set moisture - must be before set_fire_params
fmc_g(1,j)=fuelmc_g
fmc_g(2,j)=fuelmc_g
fmc_g(3,j)=(fuelmce(k)*(j-1))/(nsteps-2)
enddo
isave=fire_fmc_read
fire_fmc_read=0
call set_fire_params( &
1,2,1,nsteps, &
1,2,1,nsteps, &
1,2,1,nsteps, &
1,3,1,nsteps, &
1,3,1,nsteps, &
1,3,1,nsteps, &
0.,0.,k, &
nfuel_cat,fuel_time, &
fp )
! set up windspeed and slope table
fire_fmc_read=isave
! set up windspeed slope moisture table
propx=1.
propy=0.
do j=1,nsteps
r=float(j-1)/float(nsteps-1)
! line 1 varies windspeed (in x direction), zero slope
vx(1,j)=maxwind*r
wind(1,j)=maxwind*r
vx(1,j)=wind(1,j)*windrf(k)
vy(1,j)=0.
dzdxf(1,j)=0.
dzdyf(1,j)=0.
fmc_g(1,j)=fuelmc_g
! line 2 varies slope (in x direction), zero slope
vx(2,j)=0.
vy(2,j)=0.
dzdxf(2,j)=maxslope*r
dzdyf(2,j)=0.
fmc_g(2,j)=fuelmc_g
! line 3 varies moisture, zero slope and wind
vx(3,j)=0.
vy(3,j)=0.
dzdxf(3,j)=0.
dzdyf(3,j)=0.
fmc_g(3,j)=(fuelmce(k)*(j-1))/(nsteps-2)
enddo
do j=1,nsteps
do i=1,3
call fire_ros(ros_back,ros_wind,ros_slope, &
propx,propy,i,j,fp)
ros(i,j)=ros_back+ros_wind+ros_slope
enddo
write(iounit,13)k,'wind',j,vx(1,j),'wind speed'
write(iounit,13)k,'ros_wind',j,ros(1,j),'rate of spread for the wind speed'
write(iounit,13)k,'wind',j,wind(1,j),'wind speed at 6.1m'
write(iounit,13)k,'ros_wind',j,ros(1,j),'rate of spread for the wind speed at 6.1m'
write(iounit,13)k,'slope',j,dzdxf(2,j),'slope'
write(iounit,13)k,'ros_slope',j,ros(2,j),'rate of spread for the slope'
write(iounit,13)k,'fmc_g',j,fmc_g(3,j),'fuel moisture content'
Expand Down Expand Up @@ -1042,6 +1048,7 @@ subroutine set_fire_params( &
if(fire_fmc_read.eq.1)then
fp%fmc_g(i,j)=fuelmc_g
endif
! print *,'fmc_g:',fire_fmc_read,i,j,fp%fmc_g(i,j)

! end jm addition

Expand Down

0 comments on commit bce8561

Please sign in to comment.