/[MITgcm]/MITgcm/pkg/flt/flt_traj.F
ViewVC logotype

Diff of /MITgcm/pkg/flt/flt_traj.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.5 by jmc, Tue Feb 3 23:05:46 2009 UTC revision 1.6 by jmc, Thu Feb 5 01:01:48 2009 UTC
# Line 33  C     === Functions == Line 33  C     === Functions ==
33        INTEGER ILNBLNK        INTEGER ILNBLNK
34        _RL global2local_i        _RL global2local_i
35        _RL global2local_j        _RL global2local_j
36          _RL FLT_MAP_K2R
37          EXTERNAL ILNBLNK
38          EXTERNAL FLT_MAP_K2R
39    
40  C     == local variables ==  C     == local variables ==
41        INTEGER bi, bj, imax        INTEGER bi, bj, imax
42        PARAMETER (imax=10)        PARAMETER (imax=13)
43        INTEGER ip, kp, ii        INTEGER ip, kp, ii
44        _RL xx, yy        _RL ix, jy, i0x, j0y, zz
45        _RL uu,vv,tt,ss, pp        _RL uu, vv, tt, ss, pp
46    
47        INTEGER ioUnit, irecord        INTEGER ioUnit, irecord
48        _RL tmp(imax)        _RL tmp(imax)
# Line 91  C total number of timesteps Line 94  C total number of timesteps
94           tmp(5) = npart_times + 1.           tmp(5) = npart_times + 1.
95  C total number of floats  C total number of floats
96           tmp(6) = max_npart           tmp(6) = max_npart
97           DO ip=7,imax           DO ii=7,imax
98              tmp(ip) = 0.              tmp(ii) = 0.
99           ENDDO           ENDDO
100    
101           ioUnit = -1           ioUnit = -1
# Line 100  C total number of floats Line 103  C total number of floats
103       &                          'RL', imax, tmp,       &                          'RL', imax, tmp,
104       &                           bi,bj,-1, myIter, myThid )       &                           bi,bj,-1, myIter, myThid )
105    
106             i0x = DFLOAT( myXGlobalLo-1 + (bi-1)*sNx )
107             j0y = DFLOAT( myYGlobalLo-1 + (bj-1)*sNy )
108           DO ip=1,npart_tile(bi,bj)           DO ip=1,npart_tile(bi,bj)
109    
110              xx=global2local_i(xpart(ip,bi,bj),bi,bj,myThid)              ix=global2local_i(xpart(ip,bi,bj),bi,bj,myThid)
111              yy=global2local_j(ypart(ip,bi,bj),bi,bj,myThid)              jy=global2local_j(ypart(ip,bi,bj),bi,bj,myThid)
112                zz = FLT_MAP_K2R( kpart(ip,bi,bj),bi,bj,myThid)
113              kp = NINT(kpart(ip,bi,bj))              kp = NINT(kpart(ip,bi,bj))
114              tmp(1)  = npart(ip,bi,bj)              tmp(1)  = npart(ip,bi,bj)
115              tmp(2)  = myTime              tmp(2)  = myTime
116              tmp(3)  = xpart(ip,bi,bj)              tmp(3)  = xpart(ip,bi,bj)
117              tmp(4)  = ypart(ip,bi,bj)              tmp(4)  = ypart(ip,bi,bj)
118              tmp(5)  = kpart(ip,bi,bj)              tmp(5)  = zz
119                tmp(6)  = ix + i0x
120                tmp(7)  = jy + j0y
121                tmp(8)  = kpart(ip,bi,bj)
122    
123              IF ( ( myTime.GE.tstart(ip,bi,bj)) .AND.              IF ( ( myTime.GE.tstart(ip,bi,bj)) .AND.
124       &           ( tend(ip,bi,bj).EQ.-1. .OR. myTime.LE.tend(ip,bi,bj))       &           ( tend(ip,bi,bj).EQ.-1. .OR. myTime.LE.tend(ip,bi,bj))
# Line 130  C-- jmc: not sure if this is right but a Line 139  C-- jmc: not sure if this is right but a
139                  kp = MIN( MAX(kp,1), Nr)                  kp = MIN( MAX(kp,1), Nr)
140                ENDIF                ENDIF
141    
142                CALL FLT_BILINEAR  (xx,yy,uu,uVel,  kp,1,bi,bj,myThid)                CALL FLT_BILINEAR  (ix,jy,uu,uVel,  kp,1,bi,bj,myThid)
143                CALL FLT_BILINEAR  (xx,yy,vv,vVel,  kp,2,bi,bj,myThid)                CALL FLT_BILINEAR  (ix,jy,vv,vVel,  kp,2,bi,bj,myThid)
144                CALL FLT_BILINEAR2D(xx,yy,pp,etaN,     0,bi,bj,myThid)                CALL FLT_BILINEAR2D(ix,jy,pp,etaN,     0,bi,bj,myThid)
145                CALL FLT_BILINEAR  (xx,yy,tt,theta, kp,0,bi,bj,myThid)                CALL FLT_BILINEAR  (ix,jy,tt,theta, kp,0,bi,bj,myThid)
146                CALL FLT_BILINEAR  (xx,yy,ss,salt,  kp,0,bi,bj,myThid)                CALL FLT_BILINEAR  (ix,jy,ss,salt,  kp,0,bi,bj,myThid)
147    
148                tmp(6)   = uu                tmp( 9) = pp
149                tmp(7)   = vv                tmp(10) = uu
150                tmp(8)   = tt                tmp(11) = vv
151                tmp(9)   = ss                tmp(12) = tt
152                tmp(10)  = pp                tmp(13) = ss
153              ELSE              ELSE
154                tmp(6)   = flt_nan                tmp( 9) = flt_nan
155                tmp(7)   = flt_nan                tmp(10) = flt_nan
156                tmp(8)   = flt_nan                tmp(11) = flt_nan
157                tmp(9)   = flt_nan                tmp(12) = flt_nan
158                tmp(10)  = flt_nan                tmp(13) = flt_nan
159              ENDIF              ENDIF
160    
161  C (3) WRITE float positions into file  C (3) WRITE float positions into file

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.22