Skip to content

Commit

Permalink
Temp code to clean out the surface if a crater gets too big (>80% dom…
Browse files Browse the repository at this point in the history
…ain size). This prevents infinite hole bug so needs to be looked at again
  • Loading branch information
daminton committed Mar 17, 2017
1 parent af10cd9 commit f237874
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/crater/crater_populate.f90
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ subroutine crater_populate(user,surf,crater,domain,prod,production_list,vdist,nt
integer(I4B),parameter :: TRUECHUNK = 1000000 ! Size of truelist chunks to allocate
integer(I4B) :: truesize
integer(I4B) :: craters_since_tally,icrater_last_tally,craters_since_subpixel,icrater_last_subpixel
integer(I4B) :: i,j
integer(I4B) :: i,j,layer
real(DP) :: finterval ! fraction of interval so far completed
character(len=MESSAGESIZE) :: message ! message for the progress bar
real(DP) :: ejbmass
Expand Down Expand Up @@ -142,6 +142,16 @@ subroutine crater_populate(user,surf,crater,domain,prod,production_list,vdist,nt
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
do layer = 1,user%numlayers
surf%diam(layer) = 0.0_DP
surf%xl(layer) = 0.0_SP
surf%yl(layer) = 0.0_SP
end do
makecrater = .false.
end if

if (crater%fcrat < domain%smallest_crater) makecrater = .false.

Expand Down

0 comments on commit f237874

Please sign in to comment.