From a550cb1fe8e5ce22648d331b9b52918e87dfe360 Mon Sep 17 00:00:00 2001 From: daminton Date: Thu, 16 Feb 2017 19:15:36 +0000 Subject: [PATCH] Fixed slope collapse routine to conserve mass --- src/crater/crater_slope_collapse.f90 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/crater/crater_slope_collapse.f90 b/src/crater/crater_slope_collapse.f90 index 7fda521b..77c05399 100644 --- a/src/crater/crater_slope_collapse.f90 +++ b/src/crater/crater_slope_collapse.f90 @@ -61,7 +61,7 @@ subroutine crater_slope_collapse(user,surf,crater,domain,deltaMtot) ! determine area to effect inc = max(min(crater%fcratpx,ceiling(SQRT2*user%gridsize)),1) + 1 crater%maxinc = max(crater%maxinc,inc) - incsq = inc*inc + incsq = inc**2 !if (inc >= user%gridsize/2) then ! write(*,*) 'D =',crater%fcrat, ' Cl/S =',(crater%fcratpx*user%pix)/domain%side @@ -79,9 +79,7 @@ subroutine crater_slope_collapse(user,surf,crater,domain,deltaMtot) allocate(cumulative_elchange(-inc:inc,-inc:inc)) allocate(indarray(6,-inc:inc,-inc:inc)) allocate(kappat(-inc:inc,-inc:inc)) - !mult = inc/(user%gridsize/2) + 1 ! Reduce max diffusion if the loopover area exceeds the periodic boundary conditions mult = (1 + (inc/(user%gridsize/2)))**2 - !difflim = diffmax/mult cumulative_elchange = 0._DP