Skip to content

Commit

Permalink
changed critical slope routine slightly to use lrad instead of irad, …
Browse files Browse the repository at this point in the history
…though it is not currently being used.
  • Loading branch information
daminton committed Feb 16, 2017
1 parent 0716ae3 commit 7fa53ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/crater/crater_critical_slope.f90
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
!**********************************************************************************************************************************


function crater_critical_slope(user,crater,iradsq) result(critical)
function crater_critical_slope(user,crater,lrad) result(critical)
use module_globals
use module_util
use module_crater, EXCEPT_THIS_ONE => crater_critical_slope
Expand All @@ -25,17 +25,17 @@ function crater_critical_slope(user,crater,iradsq) result(critical)
! Arguments
type(usertype),intent(in) :: user
type(cratertype),intent(in) :: crater
integer(I4B),intent(in) :: iradsq
real(DP),intent(in) :: lrad
real(DP) :: critical

! Internal variables
real(DP) :: r

r = sqrt(iradsq * 1.0_DP) / (crater%fradpx * 1.0_DP)
r = lrad / crater%frad
if (r < 0.2_DP) then
critical = 0.0_DP
else if (r < 0.98_DP) then
critical = abs(0.228_DP + 2 * 0.083_DP * r - 3 * 0.039_DP * r**2)
critical = max(abs(0.228_DP + 2 * 0.083_DP * r - 3 * 0.039_DP * r**2),CRITSLP)
else
critical = max(abs(0.187_DP - 2 * 0.018_DP * r - 3 * 0.015_DP * r**2),CRITSLP)
end if
Expand Down

0 comments on commit 7fa53ab

Please sign in to comment.