Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fire-hydro bug fix #665

Merged
merged 2 commits into from
Jul 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised that this was necessary. RH<1 is incredibly dry, almost impossible. How low are the values seen here?

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