-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcheck_for_removal.f
37 lines (28 loc) · 1010 Bytes
/
check_for_removal.f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
subroutine check_for_removal (surface,dh,
& nb,nn,fluxmax_erosion,surfmin,dt,
& iremove)
c subroutine where the condition for node removal is defined
c INPUT: surface = surface attached to current node
c dh = incremental erosion over the current time step
c nb = number of neighbours per node
c nn = list of neighbours
c fluxmax_erosion = maximum erosive flux permitted
c surfmin = minimum surface permitted
c dt = current time step length
c OUTPUT:
c iremove = 0 keep it
c = 1 remove it
c subroutines called:
c NONE
integer nn(*)
common /vocal/ ivocal
iremove=0
flux=min(0.,surface*dh/dt)
do j=1,nb
jj=nn(j)
flux=flux+min(0.,surface*dh/dt)
enddo
if(flux.gt.-fluxmax_erosion/10. .or.
& surface.lt.surfmin/2.) iremove=1
return
end