1 |
C $Header: /u/gcmpack/MITgcm/pkg/flt/flt_down.F,v 1.3 2009/01/04 00:58:23 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "FLT_OPTIONS.h" |
5 |
|
6 |
SUBROUTINE FLT_DOWN ( |
7 |
I myTime, myIter, myThid ) |
8 |
|
9 |
C ================================================================== |
10 |
C SUBROUTINE FLT_DOWN |
11 |
C ================================================================== |
12 |
C o This routine moves particles vertical from the surface to |
13 |
C the target depth |
14 |
C ================================================================== |
15 |
|
16 |
C !USES: |
17 |
IMPLICIT NONE |
18 |
|
19 |
C == global variables == |
20 |
#include "EEPARAMS.h" |
21 |
#include "SIZE.h" |
22 |
#include "FLT.h" |
23 |
|
24 |
C == routine arguments == |
25 |
_RL myTime |
26 |
INTEGER myIter, myThid |
27 |
|
28 |
C == local variables == |
29 |
INTEGER bi, bj |
30 |
INTEGER ip |
31 |
|
32 |
C == end of interface == |
33 |
|
34 |
DO bj=myByLo(myThid),myByHi(myThid) |
35 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
36 |
|
37 |
DO ip=1,npart_tile(bi,bj) |
38 |
|
39 |
IF ( |
40 |
& ( myTime.GE.tstart(ip,bi,bj)) |
41 |
& .AND. |
42 |
& ( tend(ip,bi,bj).EQ.-1. .OR. myTime.LE. tend(ip,bi,bj)) |
43 |
& .AND. |
44 |
& (kpart(ip,bi,bj) .LE. flt_surf) |
45 |
& .AND. |
46 |
& (iup(ip,bi,bj) .GT. 0.) |
47 |
& ) THEN |
48 |
|
49 |
c IF (tstart(ip,bi,bj) .NE. -1. .AND. |
50 |
c & myTime .GE. tstart(ip,bi,bj) .AND. |
51 |
c & myTime .LE. tend(ip,bi,bj) .AND. |
52 |
c & kpart(ip,bi,bj) .EQ. flt_surf .AND. |
53 |
c & iup(ip,bi,bj) .GT. 0.) THEN |
54 |
|
55 |
C move float to the target depth |
56 |
|
57 |
IF (mod(myTime,iup(ip,bi,bj)).EQ.itop(ip,bi,bj)) |
58 |
& kpart(ip,bi,bj) = kfloat(ip,bi,bj) |
59 |
|
60 |
ENDIF |
61 |
ENDDO |
62 |
|
63 |
ENDDO |
64 |
ENDDO |
65 |
|
66 |
RETURN |
67 |
END |
68 |
|