Skip to content

Commit

Permalink
Merge pull request #7 from ckoven/fire-threshold
Browse files Browse the repository at this point in the history
scorch height history variable
  • Loading branch information
jkshuman authored Jan 17, 2020
2 parents e39aa5f + f3c6126 commit 931824c
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 37 deletions.
3 changes: 0 additions & 3 deletions biogeochem/EDCohortDynamicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,6 @@ subroutine nan_cohort(cc_p)
currentCohort%ddbhdt = nan ! time derivative of dbh

! FIRE
currentCohort%Scorch_ht = nan ! scorch height affecting crown (m)
currentCohort%fraction_crown_burned = nan ! proportion of crown affected by fire
currentCohort%cambial_mort = nan ! probability that trees dies due to cambial char P&R (1986)
currentCohort%crownfire_mort = nan ! probability of tree post-fire mortality due to crown scorch
Expand Down Expand Up @@ -582,7 +581,6 @@ subroutine zero_cohort(cc_p)

currentcohort%year_net_uptake(:) = 999._r8 ! this needs to be 999, or trimming of new cohorts will break.
currentcohort%ts_net_uptake(:) = 0._r8
currentcohort%scorch_ht = 0._r8
currentcohort%fraction_crown_burned = 0._r8
currentCohort%size_class = 1
currentCohort%seed_prod = 0._r8
Expand Down Expand Up @@ -1657,7 +1655,6 @@ subroutine copy_cohort( currentCohort,copyc )
n%ddbhdt = o%ddbhdt

! FIRE
n%scorch_ht = o%scorch_ht
n%fraction_crown_burned = o%fraction_crown_burned
n%fire_mort = o%fire_mort
n%crownfire_mort = o%crownfire_mort
Expand Down
3 changes: 3 additions & 0 deletions biogeochem/EDPatchDynamicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1883,6 +1883,7 @@ subroutine create_patch(currentSite, new_patch, age, areap, label)
new_patch%fabd_sha_z(:,:,:) = 0._r8
new_patch%fabi_sun_z(:,:,:) = 0._r8
new_patch%fabi_sha_z(:,:,:) = 0._r8
new_patch%scorch_ht(:) = 0._r8
new_patch%frac_burnt = 0._r8
new_patch%total_tree_area = 0.0_r8
new_patch%NCL_p = 1
Expand Down Expand Up @@ -1980,6 +1981,7 @@ subroutine zero_patch(cp_p)
currentPatch%fire = 999 ! sr decide_fire.1=fire hot enough to proceed. 0=stop everything- no fires today
currentPatch%fd = 0.0_r8 ! fire duration (mins)
currentPatch%ros_back = 0.0_r8 ! backward ros (m/min)
currentPatch%scorch_ht(:) = 0.0_r8 ! scorch height of flames on a given PFT
currentPatch%frac_burnt = 0.0_r8 ! fraction burnt daily
currentPatch%burnt_frac_litter(:) = 0.0_r8
currentPatch%btran_ft(:) = 0.0_r8
Expand Down Expand Up @@ -2295,6 +2297,7 @@ subroutine fuse_2_patches(csite, dp, rp)
rp%fi = (dp%fi*dp%area + rp%fi*rp%area) * inv_sum_area
rp%fd = (dp%fd*dp%area + rp%fd*rp%area) * inv_sum_area
rp%ros_back = (dp%ros_back*dp%area + rp%ros_back*rp%area) * inv_sum_area
rp%scorch_ht(:) = (dp%scorch_ht(:)*dp%area + rp%scorch_ht(:)*rp%area) * inv_sum_area
rp%frac_burnt = (dp%frac_burnt*dp%area + rp%frac_burnt*rp%area) * inv_sum_area
rp%burnt_frac_litter(:) = (dp%burnt_frac_litter(:)*dp%area + rp%burnt_frac_litter(:)*rp%area) * inv_sum_area
rp%btran_ft(:) = (dp%btran_ft(:)*dp%area + rp%btran_ft(:)*rp%area) * inv_sum_area
Expand Down
52 changes: 29 additions & 23 deletions fire/SFMainMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module SFMainMod
use PRTGenericMod, only : repro_organ
use PRTGenericMod, only : struct_organ
use PRTGenericMod, only : SetState

use FatesInterfaceMod , only : numpft

implicit none
private
Expand Down Expand Up @@ -801,8 +801,8 @@ end subroutine area_burnt_intensity
subroutine crown_scorching ( currentSite )
!*****************************************************************

!currentPatch%FI average fire intensity of flaming front during day. kW/m.
!currentCohort%SH scorch height for the cohort(m)
!currentPatch%FI average fire intensity of flaming front during day. kW/m.
!currentPatch%SH(pft) scorch height for all cohorts of a given PFT on a given patch (m)

type(ed_site_type), intent(in), target :: currentSite

Expand All @@ -814,39 +814,44 @@ subroutine crown_scorching ( currentSite )
real(r8) :: sapw_c ! sapwood carbon [kg]
real(r8) :: struct_c ! structure carbon [kg]

integer :: i_pft


currentPatch => currentSite%oldest_patch;
do while(associated(currentPatch))

tree_ag_biomass = 0.0_r8
if (currentPatch%fire == 1) then
currentCohort => currentPatch%tallest;
do while(associated(currentCohort))
if (EDPftvarcon_inst%woody(currentCohort%pft) == 1) then !trees only

leaf_c = currentCohort%prt%GetState(leaf_organ, all_carbon_elements)
sapw_c = currentCohort%prt%GetState(sapw_organ, all_carbon_elements)
struct_c = currentCohort%prt%GetState(struct_organ, all_carbon_elements)

tree_ag_biomass = tree_ag_biomass + &
currentCohort%n * (leaf_c + &
EDPftvarcon_inst%allom_agb_frac(currentCohort%pft)*(sapw_c + struct_c))
currentCohort%n * (leaf_c + &
EDPftvarcon_inst%allom_agb_frac(currentCohort%pft)*(sapw_c + struct_c))


currentCohort%Scorch_ht = 0.0_r8
if (tree_ag_biomass > 0.0_r8) then

!Equation 16 in Thonicke et al. 2010 !Van Wagner 1973 EQ8 !2/3 Byram (1959)
currentCohort%Scorch_ht = EDPftvarcon_inst%fire_alpha_SH(currentCohort%pft) * (currentPatch%FI**0.667_r8)

if(write_SF == itrue)then
if ( hlm_masterproc == itrue ) write(fates_log(),*) 'currentCohort%SH',currentCohort%Scorch_ht
endif
endif ! tree biomass

endif !trees only
currentCohort=>currentCohort%shorter;
enddo !end cohort loop

do i_pft=1,numpft
if (tree_ag_biomass > 0.0_r8 .and. EDPftvarcon_inst%woody(i_pft) == 1) then

!Equation 16 in Thonicke et al. 2010 !Van Wagner 1973 EQ8 !2/3 Byram (1959)
currentPatch%Scorch_ht(i_pft) = EDPftvarcon_inst%fire_alpha_SH(i_pft) * (currentPatch%FI**0.667_r8)

if(write_SF == itrue)then
if ( hlm_masterproc == itrue ) write(fates_log(),*) 'currentPatch%SH',currentPatch%Scorch_ht(i_pft)
endif
else
currentPatch%Scorch_ht(i_pft) = 0.0_r8
endif ! tree biomass
end do

endif !fire

currentPatch => currentPatch%younger;
Expand Down Expand Up @@ -878,17 +883,18 @@ subroutine crown_damage ( currentSite )
if (EDPftvarcon_inst%woody(currentCohort%pft) == 1) then !trees only
! Flames lower than bottom of canopy.
! c%hite is height of cohort
if (currentCohort%Scorch_ht < &
if (currentPatch%Scorch_ht(currentCohort%pft) < &
(currentCohort%hite-currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft))) then
currentCohort%fraction_crown_burned = 0.0_r8
else
! Flames part of way up canopy.
! Equation 17 in Thonicke et al. 2010.
! flames over bottom of canopy but not over top.
if ((currentCohort%hite > 0.0_r8).and.(currentCohort%Scorch_ht >= &
if ((currentCohort%hite > 0.0_r8).and.(currentPatch%Scorch_ht(currentCohort%pft) >= &
(currentCohort%hite-currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft)))) then

currentCohort%fraction_crown_burned = (currentCohort%Scorch_ht-currentCohort%hite*(1.0_r8- &
currentCohort%fraction_crown_burned = (currentPatch%Scorch_ht(currentCohort%pft) - &
currentCohort%hite*(1.0_r8 - &
EDPftvarcon_inst%crown(currentCohort%pft)))/(currentCohort%hite* &
EDPftvarcon_inst%crown(currentCohort%pft))

Expand Down
2 changes: 1 addition & 1 deletion main/EDTypesMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,6 @@ module EDTypesMod
real(r8) :: dbdeaddt ! time derivative of dead biomass : KgC/year

! FIRE
real(r8) :: scorch_ht ! scorch height: m
real(r8) :: fraction_crown_burned ! proportion of crown affected by fire:-
real(r8) :: cambial_mort ! probability that trees dies due to cambial char
! (conditional on the tree being subjected to the fire)
Expand Down Expand Up @@ -522,6 +521,7 @@ module EDTypesMod
real(r8) :: fd ! fire duration: mins

! FIRE EFFECTS
real(r8) :: scorch_ht(maxpft) ! scorch height: m
real(r8) :: frac_burnt ! fraction burnt: frac gridcell/day
real(r8) :: tfc_ros ! total fuel consumed - no trunks. KgC/m2/day
real(r8) :: burnt_frac_litter(nfsc) ! fraction of each litter pool burned:-
Expand Down
32 changes: 22 additions & 10 deletions main/FatesHistoryInterfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ module FatesHistoryInterfaceMod
integer :: ih_TFC_ROS_pa
integer :: ih_fire_intensity_pa
integer :: ih_fire_area_pa
! integer :: ih_scorch_height_pa
integer :: ih_fire_fuel_bulkd_pa
integer :: ih_fire_fuel_eff_moist_pa
integer :: ih_fire_fuel_sav_pa
Expand Down Expand Up @@ -207,6 +206,7 @@ module FatesHistoryInterfaceMod
! Indices to site by patch age by pft variables
integer :: ih_biomass_si_agepft
integer :: ih_npp_si_agepft
integer :: ih_scorch_height_si_agepft

! Indices to (site) variables

Expand Down Expand Up @@ -1631,7 +1631,6 @@ subroutine update_history_dyn(this,nc,nsites,sites)
hio_effect_wspeed_pa => this%hvars(ih_effect_wspeed_pa)%r81d, &
hio_fire_intensity_pa => this%hvars(ih_fire_intensity_pa)%r81d, &
hio_fire_area_pa => this%hvars(ih_fire_area_pa)%r81d, &
! hio_scorch_height_pa => this%hvars(ih_scorch_height_pa)%r81d, &
hio_fire_fuel_bulkd_pa => this%hvars(ih_fire_fuel_bulkd_pa)%r81d, &
hio_fire_fuel_eff_moist_pa => this%hvars(ih_fire_fuel_eff_moist_pa)%r81d, &
hio_fire_fuel_sav_pa => this%hvars(ih_fire_fuel_sav_pa)%r81d, &
Expand Down Expand Up @@ -1775,6 +1774,7 @@ subroutine update_history_dyn(this,nc,nsites,sites)
hio_nplant_si_scagpft => this%hvars(ih_nplant_si_scagpft)%r82d, &
hio_npp_si_agepft => this%hvars(ih_npp_si_agepft)%r82d, &
hio_biomass_si_agepft => this%hvars(ih_biomass_si_agepft)%r82d, &
hio_scorch_height_si_agepft => this%hvars(ih_scorch_height_si_agepft)%r82d, &
hio_yesterdaycanopylevel_canopy_si_scls => this%hvars(ih_yesterdaycanopylevel_canopy_si_scls)%r82d, &
hio_yesterdaycanopylevel_understory_si_scls => this%hvars(ih_yesterdaycanopylevel_understory_si_scls)%r82d, &
hio_area_si_age => this%hvars(ih_area_si_age)%r82d, &
Expand Down Expand Up @@ -1941,6 +1941,15 @@ subroutine update_history_dyn(this,nc,nsites,sites)
+ cpatch%area * AREA_INV
endif

do i_pft = 1,numpft
! for scorch height, weight the value by patch area within any given age calss (in the event that there is
! more than one patch per age class.
iagepft = cpatch%age_class + (i_pft-1) * nlevage
hio_scorch_height_si_agepft(io_si,iagepft) = hio_scorch_height_si_agepft(io_si,iagepft) + &
cpatch%Scorch_ht(i_pft) * cpatch%area

end do

ccohort => cpatch%shortest
do while(associated(ccohort))

Expand Down Expand Up @@ -2206,8 +2215,6 @@ subroutine update_history_dyn(this,nc,nsites,sites)
hio_biomass_si_agepft(io_si,iagepft) = hio_biomass_si_agepft(io_si,iagepft) + &
total_c * ccohort%n * AREA_INV



! update SCPF/SCLS- and canopy/subcanopy- partitioned quantities
if (ccohort%canopy_layer .eq. 1) then
hio_nplant_canopy_si_scag(io_si,iscag) = hio_nplant_canopy_si_scag(io_si,iscag) + ccohort%n
Expand Down Expand Up @@ -2438,7 +2445,6 @@ subroutine update_history_dyn(this,nc,nsites,sites)
hio_tfc_ros_pa(io_pa) = cpatch%TFC_ROS
hio_fire_intensity_pa(io_pa) = cpatch%FI
hio_fire_area_pa(io_pa) = cpatch%frac_burnt
!hio_scorch_height_pa(io_pa) = cpatch%SH
hio_fire_fuel_bulkd_pa(io_pa) = cpatch%fuel_bulkd
hio_fire_fuel_eff_moist_pa(io_pa) = cpatch%fuel_eff_moist
hio_fire_fuel_sav_pa(io_pa) = cpatch%fuel_sav
Expand Down Expand Up @@ -2479,6 +2485,11 @@ subroutine update_history_dyn(this,nc,nsites,sites)
if (hio_area_si_age(io_si, ipa2) .gt. tiny) then
hio_lai_si_age(io_si, ipa2) = hio_lai_si_age(io_si, ipa2) / (hio_area_si_age(io_si, ipa2)*AREA)
hio_ncl_si_age(io_si, ipa2) = hio_ncl_si_age(io_si, ipa2) / (hio_area_si_age(io_si, ipa2)*AREA)
do i_pft = 1, numpft
iagepft = ipa2 + (i_pft-1) * nlevage
hio_scorch_height_si_agepft(io_si, iagepft) = &
hio_scorch_height_si_agepft(io_si, iagepft) / (hio_area_si_age(io_si, ipa2)*AREA)
enddo
else
hio_lai_si_age(io_si, ipa2) = 0._r8
hio_ncl_si_age(io_si, ipa2) = 0._r8
Expand Down Expand Up @@ -3906,11 +3917,6 @@ subroutine define_history_vars(this, initialize_variables)
avgflag='A', vtype=patch_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, &
ivar=ivar, initialize=initialize_variables, index = ih_fire_area_pa )

!call this%set_history_var(vname='SCORCH_HEIGHT', units='m', &
! long='spitfire flame height:m', use_default='active', &
! avgflag='A', vtype=patch_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, &
! ivar=ivar, initialize=initialize_variables, index = ih_scorch_height_pa )

call this%set_history_var(vname='fire_fuel_mef', units='m', &
long='spitfire fuel moisture', use_default='active', &
avgflag='A', vtype=patch_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, &
Expand Down Expand Up @@ -4404,6 +4410,12 @@ subroutine define_history_vars(this, initialize_variables)
avgflag='A', vtype=site_agepft_r8, hlms='CLM:ALM', flushval=0.0_r8, &
upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_biomass_si_agepft )

call this%set_history_var(vname='SCORCH_HEIGHT',units = 'm', &
long='SPITFIRE Flame Scorch Height (calculated per PFT in each patch age bin)', &
use_default='active', &
avgflag='A', vtype=site_agepft_r8, hlms='CLM:ALM', flushval=0.0_r8, &
upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_scorch_height_si_agepft )


! Carbon Flux (grid dimension x scpf) (THESE ARE DEFAULT INACTIVE!!!
! (BECAUSE THEY TAKE UP SPACE!!!
Expand Down

0 comments on commit 931824c

Please sign in to comment.