diff --git a/src/regolith/regolith_depth_model.f90 b/src/regolith/regolith_depth_model.f90 index 6b424055..879375db 100644 --- a/src/regolith/regolith_depth_model.f90 +++ b/src/regolith/regolith_depth_model.f90 @@ -97,8 +97,9 @@ 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 = exp(-1.0_DP * PI * psum * t) + psumfunc = -1.0_DP * PI * psum * t + if (psumfunc > log(epsilon(psum))) then p(2,i) = 1.0_DP - exp(-1.0_DP * PI * psum * t) else p(2,i) = 1.0_DP