Skip to content

Commit

Permalink
Merge pull request #710 from JoshuaRady/Disturbance_Check_Fix
Browse files Browse the repository at this point in the history
Add Tolerance Error Check in EDPatchDynamicsMod.F90: spawn_patches()
  • Loading branch information
rgknox authored Apr 13, 2021
2 parents b8986c5 + 228039b commit 832dc2f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions biogeochem/EDPatchDynamicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,8 @@ subroutine spawn_patches( currentSite, bc_in)
! !USES:

use EDParamsMod , only : ED_val_understorey_death, logging_coll_under_frac
use EDCohortDynamicsMod , only : zero_cohort, copy_cohort, terminate_cohorts
use EDCohortDynamicsMod , only : zero_cohort, copy_cohort, terminate_cohorts
use FatesConstantsMod , only : rsnbl_math_prec

!
! !ARGUMENTS:
Expand Down Expand Up @@ -500,7 +501,7 @@ subroutine spawn_patches( currentSite, bc_in)
do while(associated(currentPatch))


if(currentPatch%disturbance_rate>1.0_r8) then
if(currentPatch%disturbance_rate > (1.0_r8 + rsnbl_math_prec)) then
write(fates_log(),*) 'patch disturbance rate > 1 ?',currentPatch%disturbance_rate
call dump_patch(currentPatch)
call endrun(msg=errMsg(sourcefile, __LINE__))
Expand Down

0 comments on commit 832dc2f

Please sign in to comment.