Skip to content

Commit

Permalink
Merge pull request #665 from xuchongang/xuchongang/fire_bug_fix
Browse files Browse the repository at this point in the history
fire-hydro bug fix
  • Loading branch information
glemieux authored Jul 2, 2020
2 parents 154bd29 + 8f2be05 commit 68bc434
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions biogeochem/EDPatchDynamicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1452,6 +1452,7 @@ subroutine fire_litter_fluxes(currentSite, currentPatch, newPatch, patch_site_ar
num_dead_trees = (currentCohort%fire_mort * &
currentCohort%n*patch_site_areadis/currentPatch%area)
call AccumulateMortalityWaterStorage(currentSite,currentCohort,num_dead_trees)
currentCohort => currentCohort%taller
end do
end if

Expand Down
2 changes: 1 addition & 1 deletion fire/SFMainMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ subroutine fire_danger_index ( currentSite, bc_in)
d_NI = 0.0_r8
currentSite%acc_NI = 0.0_r8
else
yipsolon = (SF_val_fdi_a* temp_in_C)/(SF_val_fdi_b+ temp_in_C)+log(rh/100.0_r8)
yipsolon = (SF_val_fdi_a* temp_in_C)/(SF_val_fdi_b+ temp_in_C)+log(max(1.0_r8,rh)/100.0_r8)
dewpoint = (SF_val_fdi_b*yipsolon)/(SF_val_fdi_a-yipsolon) !Standard met. formula
d_NI = ( temp_in_C-dewpoint)* temp_in_C !follows Nesterov 1968. Equation 5. Thonicke et al. 2010.
if (d_NI < 0.0_r8) then !Change in NI cannot be negative.
Expand Down

0 comments on commit 68bc434

Please sign in to comment.