diff --git a/biogeochem/EDPatchDynamicsMod.F90 b/biogeochem/EDPatchDynamicsMod.F90 index fa2ac315af..1130aea6f4 100644 --- a/biogeochem/EDPatchDynamicsMod.F90 +++ b/biogeochem/EDPatchDynamicsMod.F90 @@ -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 diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index df5f999426..95423f7be1 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -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.