diff --git a/examples/global-lunar-bombardment/ctem.in b/examples/global-lunar-bombardment/ctem.in index a9196839..4220c91e 100755 --- a/examples/global-lunar-bombardment/ctem.in +++ b/examples/global-lunar-bombardment/ctem.in @@ -60,7 +60,7 @@ doseismic F ! Perform seismic shaking calcul ! Optional inputF These have internally set default values that work reasonable well. Comment them out with deplimit 9e99 ! Depth limit for craters (m) - Default is to ignore. -maxcrat 1.00e0 ! Fraction of gridsize that maximum crater can be - Default 1.0 +maxcrat 0.10e0 ! Fraction of gridsize that maximum crater can be - Default 1.0 killatmaxcrater F ! Stop the run if a crater larger than the maximum is produced - Default F basinimp 35.0e3 ! Size of impactor to switch to lunar basin scaling law - Default is to ignore docollapse T ! Do slope collapse - Default T diff --git a/src/crater/crater_populate.f90 b/src/crater/crater_populate.f90 index ab8e9540..249dbfcf 100644 --- a/src/crater/crater_populate.f90 +++ b/src/crater/crater_populate.f90 @@ -157,6 +157,18 @@ subroutine crater_populate(user,surf,crater,domain,prod,production_list,vdist,nt call crater_generate(user,crater,domain,prod,production_list,vdist,surf) if (user%testflag) write(*,*) 'Dcrat = ',crater%fcrat if (user%testflag) write(*,*) 'Dtrans = ',crater%rad*2 + if (crater%fcrat > domain%biggest_crater) then ! End the run if the crater is too big + if ( user%testflag .eqv. .false. ) then + if (user%killatmaxcrater) then + fracdone = real(icrater,kind=DP) / real(ntotcrat,kind=DP) + write(*,*) + write(*,'("Ended run at ",F7.2,"% due to crater of size: ",ES13.4)') fracdone * 100,crater%fcrat + exit + else + makecrater = .false. ! Ignore this big crater + end if + end if + end if if (user%doquasimc) then if (crater%timestamp > user%rctime) then user%testflag = .false. @@ -169,16 +181,6 @@ subroutine crater_populate(user,surf,crater,domain,prod,production_list,vdist,nt end if end if end if - if (crater%fcrat > domain%biggest_crater) then ! End the run if the crater is too big - if (user%killatmaxcrater) then - fracdone = real(icrater,kind=DP) / real(ntotcrat,kind=DP) - write(*,*) - write(*,'("Ended run at ",F7.2,"% due to crater of size: ",ES13.4)') fracdone * 100,crater%fcrat - exit - else - makecrater = .false. ! Ignore this big crater - end if - end if if (crater%fcrat > 0.8_DP * domain%side) then surf%ejcov = 0.0_DP surf%dem = 0.0_DP