Skip to content

Commit

Permalink
Merge pull request #1166 from ckoven/fire_bugfix
Browse files Browse the repository at this point in the history
Fire edge-case bugfix
  • Loading branch information
rgknox authored Apr 26, 2024
2 parents 6c85a1b + 6e5b865 commit a1c989d
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions fire/SFMainMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ module SFMainMod
use PRTGenericMod, only : SetState
use FatesInterfaceTypesMod , only : numpft
use FatesAllometryMod, only : CrownDepth
use FatesConstantsMod, only : nearzero

implicit none
private
Expand Down Expand Up @@ -295,10 +296,18 @@ subroutine charecteristics_of_fuel ( currentSite )

! Correct averaging for the fact that we are not using the trunks pool for fire ROS and intensity (5)
! Consumption of fuel in trunk pool does not influence fire ROS or intensity (Pyne 1996)
currentPatch%fuel_bulkd = currentPatch%fuel_bulkd * (1.0_r8/(1.0_r8-currentPatch%fuel_frac(tr_sf)))
currentPatch%fuel_sav = currentPatch%fuel_sav * (1.0_r8/(1.0_r8-currentPatch%fuel_frac(tr_sf)))
currentPatch%fuel_mef = currentPatch%fuel_mef * (1.0_r8/(1.0_r8-currentPatch%fuel_frac(tr_sf)))
currentPatch%fuel_eff_moist = currentPatch%fuel_eff_moist * (1.0_r8/(1.0_r8-currentPatch%fuel_frac(tr_sf)))
if ( (1.0_r8-currentPatch%fuel_frac(tr_sf)) .gt. nearzero ) then
currentPatch%fuel_bulkd = currentPatch%fuel_bulkd * (1.0_r8/(1.0_r8-currentPatch%fuel_frac(tr_sf)))
currentPatch%fuel_sav = currentPatch%fuel_sav * (1.0_r8/(1.0_r8-currentPatch%fuel_frac(tr_sf)))
currentPatch%fuel_mef = currentPatch%fuel_mef * (1.0_r8/(1.0_r8-currentPatch%fuel_frac(tr_sf)))
currentPatch%fuel_eff_moist = currentPatch%fuel_eff_moist * (1.0_r8/(1.0_r8-currentPatch%fuel_frac(tr_sf)))
else
! somehow the fuel is all trunk. put dummy values from large branches so as not to break things later in code.
currentPatch%fuel_bulkd = SF_val_FBD(lb_sf)
currentPatch%fuel_sav = SF_val_SAV(lb_sf)
currentPatch%fuel_mef = MEF(lb_sf)
currentPatch%fuel_eff_moist = fuel_moisture(lb_sf)
endif

! Pass litter moisture into the fuel burning routine (all fuels: twigs,s branch,l branch,trunk,dead leaves,live grass)
! (wo/me term in Thonicke et al. 2010)
Expand Down

0 comments on commit a1c989d

Please sign in to comment.