diff --git a/src/crater/crater_dimensions.f90 b/src/crater/crater_dimensions.f90 index 9d909215..f32b10eb 100644 --- a/src/crater/crater_dimensions.f90 +++ b/src/crater/crater_dimensions.f90 @@ -51,7 +51,7 @@ subroutine crater_dimensions(user,crater,domain) crater%rimheight = 0.236_DP * (crater%fcrat * 1e-3_DP)**(0.399_DP) * 1e3_DP !* crater%fcrat crater%rimwidth = 0.467_DP * (crater%fcrat * 1e-3_DP)**(0.836_DP) * 1e3_DP !* crater%fcrat crater%floordepth = 1.044_DP * (crater%fcrat * 1e-3_DP)**(0.301_DP) * 1e3_DP !* crater%fcrat - crater%floordiam = 0.187_DP * (crater%fcrat * 1e-3_DP)**(1.249_DP) * 1e3_DP !* crater%fcrat + crater%floordiam = min(0.187_DP * (crater%fcrat * 1e-3_DP)**(1.249_DP) * 1e3_DP, 0.9_DP * crater%fcrat) !* crater%fcrat crater%peakheight = 0.032_DP * (crater%fcrat * 1e-3_DP)**(0.900_DP) * 1e3_DP !* crater%fcrat end select diff --git a/src/crater/crater_profile.f90 b/src/crater/crater_profile.f90 index ce033da3..3723d081 100644 --- a/src/crater/crater_profile.f90 +++ b/src/crater/crater_profile.f90 @@ -47,7 +47,7 @@ function crater_profile(user,crater,r) result(h) if (r < flrad) then h = -crater%floordepth - else if (r > 1.0_DP) then + else if (r >= 1.0_DP) then h = crater%rimheight * (r**(-RIMDROP)) else h = c0 + c1 * r + c2 * r**2 + c3 * r**3 diff --git a/src/crater/crater_realistic_topography.f90 b/src/crater/crater_realistic_topography.f90 index 30767a5f..64521562 100644 --- a/src/crater/crater_realistic_topography.f90 +++ b/src/crater/crater_realistic_topography.f90 @@ -108,24 +108,26 @@ end subroutine crater_realistic_slope_texture end interface - ! Executable code - - if (crater%morphtype .eq. 'COMPLEX') then + select case(crater%morphtype) + case("COMPLEX","PEAKRING","MULTIRING") call complex_terrace(user,surf,crater,deltaMtot) call complex_wall_texture(user,surf,crater,domain,deltaMtot) call complex_floor(user,surf,crater,deltaMtot) call complex_peak(user,surf,crater,deltaMtot) - end if + end select ! Retrieve the size of the ejecta dem and correct for indexing inc = (size(ejecta_dem,1) - 1) / 2 call ejecta_texture(user,surf,crater,deltaMtot,inc,ejecta_dem) - if ((crater%morphtype .eq. 'COMPLEX').and.(user%docollapse)) then - ! Do a final pass of the slope collapse with a shallower slope than normal to smooth out all of the sharp edges - call crater_slope_collapse(user,surf,crater,domain,(complex_collapse_slope * user%pix)**2,deltaMtot) - end if + ! Do a final pass of the slope collapse with a shallower slope than normal to smooth out all of the sharp edges + if (user%docollapse) then + select case(crater%morphtype) + case("COMPLEX","PEAKRING","MULTIRING") + call crater_slope_collapse(user,surf,crater,domain,(complex_collapse_slope * user%pix)**2,deltaMtot) + end select + end if return end subroutine crater_realistic_topography