Skip to content

Commit 692a8b2

Browse files
authored
Merge pull request #249 from jkshuman/jkshuman-AreaBurnt
Update AreaBurnt, add DEBUG, fix indexing
2 parents 03186af + 4cf5aa9 commit 692a8b2

File tree

4 files changed

+29
-26
lines changed

4 files changed

+29
-26
lines changed

biogeochem/EDCanopyStructureMod.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,7 @@ subroutine leaf_area_profile( currentSite , snow_depth_si, frac_sno_eff_si)
12331233
write(fates_log(), *) 'ED: canopy-area-profile wrong', &
12341234
sum(currentPatch%canopy_area_profile(L,1:numpft_ed,1)), &
12351235
currentPatch%patchno, L
1236-
write(fates_log(), *) 'ED: areas',currentPatch%canopy_area_profile(L,1:2,1),currentPatch%patchno
1236+
write(fates_log(), *) 'ED: areas',currentPatch%canopy_area_profile(L,1:numpft_ed,1),currentPatch%patchno
12371237

12381238
currentCohort => currentPatch%shortest
12391239

biogeochem/EDPhysiologyMod.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ subroutine Growth_Derivatives( currentSite, currentCohort, bc_in)
960960
!FIX(RF,032414) - to fix high bl's. needed to prevent numerical errors without the ODEINT.
961961
if (currentCohort%balive > target_balive*1.1_r8)then
962962
va = 0.0_r8; vs = 1._r8
963-
write(fates_log(),*) 'using high bl cap',target_balive,currentCohort%balive
963+
if (DEBUG) write(fates_log(),*) 'using high bl cap',target_balive,currentCohort%balive
964964
endif
965965

966966
else

biogeophys/EDSurfaceAlbedoMod.F90

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -830,11 +830,12 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out )
830830
endif
831831
enddo
832832
enddo
833+
833834
if (lai_change(1,2,1).gt.0.0.and.lai_change(1,2,2).gt.0.0)then
834-
! write(fates_log(),*) 'lai_change(1,2,12)',lai_change(1,2,1:4)
835+
! write(fates_log(),*) 'lai_change(1,2,12)',lai_change(1,2,1:4)
835836
endif
836837
if (lai_change(1,2,2).gt.0.0.and.lai_change(1,2,3).gt.0.0)then
837-
! write(fates_log(),*) ' lai_change (1,2,23)',lai_change(1,2,1:4)
838+
! write(fates_log(),*) ' lai_change (1,2,23)',lai_change(1,2,1:4)
838839
endif
839840
if (lai_change(1,1,3).gt.0.0.and.lai_change(1,1,2).gt.0.0)then
840841
! NO-OP
@@ -846,7 +847,7 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out )
846847
endif
847848
if (lai_change(1,1,4).gt.0.0.and.lai_change(1,1,5).gt.0.0)then
848849
! NO-OP
849-
! write(fates_log(),*) 'first layer of lai_change 4 5',lai_change(1,1,1:5)
850+
! write(fates_log(),*) 'first layer of lai_change 4 5',lai_change(1,1,1:5)
850851
endif
851852

852853
if (radtype == 1)then
@@ -865,10 +866,10 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out )
865866
write(fates_log(),*) 'Large Dir Radn consvn error',error ,ifp,ib
866867
write(fates_log(),*) 'diags', bc_out(s)%albd_parb(ifp,ib), bc_out(s)%ftdd_parb(ifp,ib), &
867868
bc_out(s)%ftid_parb(ifp,ib), bc_out(s)%fabd_parb(ifp,ib)
868-
write(fates_log(),*) 'lai_change',lai_change(currentpatch%ncl_p,1:2,1:4)
869-
write(fates_log(),*) 'elai',currentpatch%elai_profile(currentpatch%ncl_p,1:2,1:4)
870-
write(fates_log(),*) 'esai',currentpatch%esai_profile(currentpatch%ncl_p,1:2,1:4)
871-
write(fates_log(),*) 'ftweight',ftweight(1,1:2,1:4)
869+
write(fates_log(),*) 'lai_change',lai_change(currentpatch%ncl_p,1:numpft_ed,1:4)
870+
write(fates_log(),*) 'elai',currentpatch%elai_profile(currentpatch%ncl_p,1:numpft_ed,1:4)
871+
write(fates_log(),*) 'esai',currentpatch%esai_profile(currentpatch%ncl_p,1:numpft_ed,1:4)
872+
write(fates_log(),*) 'ftweight',ftweight(1,1:numpft_ed,1:4)
872873
write(fates_log(),*) 'cp',currentPatch%area, currentPatch%patchno
873874
write(fates_log(),*) 'bc_in(s)%albgr_dir_rb(ib)',bc_in(s)%albgr_dir_rb(ib)
874875

@@ -884,16 +885,16 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out )
884885
write(fates_log(),*) '>5% Dif Radn consvn error',error ,ifp,ib
885886
write(fates_log(),*) 'diags', bc_out(s)%albi_parb(ifp,ib), bc_out(s)%ftii_parb(ifp,ib), &
886887
bc_out(s)%fabi_parb(ifp,ib)
887-
write(fates_log(),*) 'lai_change',lai_change(currentpatch%ncl_p,1:2,1:4)
888-
write(fates_log(),*) 'elai',currentpatch%elai_profile(currentpatch%ncl_p,1:2,1:4)
889-
write(fates_log(),*) 'esai',currentpatch%esai_profile(currentpatch%ncl_p,1:2,1:4)
890-
write(fates_log(),*) 'ftweight',ftweight(currentpatch%ncl_p,1:2,1:4)
888+
write(fates_log(),*) 'lai_change',lai_change(currentpatch%ncl_p,1:numpft_ed,1:4)
889+
write(fates_log(),*) 'elai',currentpatch%elai_profile(currentpatch%ncl_p,1:numpft_ed,1:4)
890+
write(fates_log(),*) 'esai',currentpatch%esai_profile(currentpatch%ncl_p,1:numpft_ed,1:4)
891+
write(fates_log(),*) 'ftweight',ftweight(currentpatch%ncl_p,1:numpft_ed,1:4)
891892
write(fates_log(),*) 'cp',currentPatch%area, currentPatch%patchno
892893
write(fates_log(),*) 'bc_in(s)%albgr_dif_rb(ib)',bc_in(s)%albgr_dif_rb(ib)
893-
write(fates_log(),*) 'rhol',rhol(1:2,:)
894-
write(fates_log(),*) 'ftw',sum(ftweight(1,:,1)),ftweight(1,1:2,1)
895-
write(fates_log(),*) 'present',currentPatch%present(1,1:2)
896-
write(fates_log(),*) 'CAP',currentPatch%canopy_area_profile(1,1:2,1)
894+
write(fates_log(),*) 'rhol',rhol(1:numpft_ed,:)
895+
write(fates_log(),*) 'ftw',sum(ftweight(1,:,1)),ftweight(1,1:numpft_ed,1)
896+
write(fates_log(),*) 'present',currentPatch%present(1,1:numpft_ed)
897+
write(fates_log(),*) 'CAP',currentPatch%canopy_area_profile(1,1:numpft_ed,1)
897898

898899
bc_out(s)%albi_parb(ifp,ib) = bc_out(s)%albi_parb(ifp,ib) + error
899900
end if

fire/SFMainMod.F90

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ subroutine wind_effect ( currentSite, bc_in)
344344
currentCohort => currentPatch%tallest
345345

346346
do while(associated(currentCohort))
347-
write(fates_log(),*) 'SF currentCohort%c_area ',currentCohort%c_area
347+
if (DEBUG) write(fates_log(),*) 'SF currentCohort%c_area ',currentCohort%c_area
348348
if(EDPftvarcon_inst%woody(currentCohort%pft) == 1)then
349349
currentPatch%total_tree_area = currentPatch%total_tree_area + currentCohort%c_area
350350
else
@@ -477,23 +477,23 @@ subroutine rate_of_spread ( currentSite )
477477
! Equation A5 in Thonicke et al. 2010
478478
! phi_wind (unitless)
479479
! convert wind_elev_fire from m/min to ft/min for Rothermel ROS eqn
480-
! wind max per Lasslop et al 2014 to lenearly reduce ROS for high wind speeds
480+
! wind max per Lasslop et al 2014 to linearly reduce ROS for high wind speeds
481481
!OLD! phi_wind = c * ((3.281_r8*currentPatch%effect_wspeed)**b)*(beta_ratio**(-e))
482482
if (currentPatch%effect_wspeed .le. wind_max) then
483483
wind_elev_fire = currentPatch%effect_wspeed
484484
phi_wind = c * ((3.281_r8*wind_elev_fire)**b)*(beta_ratio**(-e))
485485
if (debug_windspeed) write(fates_log(),*) 'SF wind LESS max ', currentPatch%effect_wspeed
486486
if (debug_windspeed) write(fates_log(),*) 'month and day', hlm_current_month, hlm_current_day
487487
else
488-
! max conditional 225 ft/min from Lasslop 2014 converted to 68.577 m/min
488+
!max condition 225 ft/min (FIREMIP Rabin table A10 JSBACH-Spitfire) convert to 68.577 m/min
489489
wind_elev_fire = max(0.0_r8,(68.577-0.5*currentPatch%effect_wspeed))
490490
phi_wind = c * ((3.281_r8*wind_elev_fire)**b)*(beta_ratio**(-e))
491491
if (debug_windspeed) write(fates_log(),*) 'SF wind GREATER max ', currentPatch%effect_wspeed
492492
if (debug_windspeed) write(fates_log(),*) 'month and day', hlm_current_month, hlm_current_day
493493
endif
494494

495495
! ---propagating flux----
496-
! Equation A2 in Thonicke et al.2010
496+
! Equation A2 in Thonicke et al.2010 and Eq. 42 Rothermal 1972
497497
! xi (unitless)
498498
xi = (exp((0.792_r8 + 3.7597_r8 * (currentPatch%fuel_sav**0.5_r8)) * (beta+0.1_r8))) / &
499499
(192_r8+7.9095_r8 * currentPatch%fuel_sav)
@@ -752,20 +752,22 @@ subroutine area_burnt ( currentSite )
752752
! THIS SHOULD HAVE THE COLUMN AND LU AREA WEIGHT ALSO, NO?
753753

754754
gridarea = km2_to_m2 ! 1M m2 in a km2
755-
currentPatch%NF = ED_val_nignitions * currentPatch%area/area /365 * &
756-
currentSite%FDI
755+
!NF = number of lighting strikes per day per km2
756+
currentPatch%NF = ED_val_nignitions * currentPatch%area/area /365
757757

758758
! If there are 15 lightening strickes per year, per km2. (approx from NASA product)
759759
! then there are 15/365 s/km2 each day.
760760

761761
! Equation 1 in Thonicke et al. 2010
762762
! To Do: Connect here with the Li & Levis GDP fire suppression algorithm.
763-
! Equation 16 in arora and boer model.
763+
! Equation 16 in arora and boer model JGR 2005
764764
!currentPatch%AB = currentPatch%AB *3.0_r8
765+
766+
!size of fire = equation 14 Arora and Boer JGR 2005
765767
size_of_fire = ((3.1416_r8/(4.0_r8*lb))*((df+db)**2.0_r8))
766768

767-
!AB is daily area burnt = size of fires in m2 * number of ignitions
768-
currentPatch%AB = size_of_fire * currentPatch%NF
769+
!AB = daily area burnt = size fires in m2 * num ignitions * prob ignition starts fire
770+
currentPatch%AB = size_of_fire * currentPatch%NF * currentSite%FDI
769771

770772
patch_area_in_m2 = gridarea*currentPatch%area/area
771773

0 commit comments

Comments
 (0)