Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed a bug that caused an underflow in the depth model with debug flags on
  • Loading branch information
Austin Blevins committed Feb 7, 2023
1 parent e4f2ed7 commit b2aab6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/regolith/regolith_depth_model.f90
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ subroutine regolith_depth_model(user,domain,finterval,nflux,p)
f = 0.5_DP * dr * ( fmin + fmax )
psum = psum + f
end do
psumfunc = exp(-1.0_DP * PI * psum * t)
if (psumfunc > epsilon(psum)) then
psumfunc = -1.0_DP * PI * psum * t
if (psumfunc > exp(epsilon(psum))) then
p(2,i) = 1.0_DP - exp(-1.0_DP * PI * psum * t)
else
p(2,i) = 1.0_DP
Expand Down

0 comments on commit b2aab6a

Please sign in to comment.