Subversion Repositories lagranto.ecmwf

Rev

Rev 3 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3 Rev 5
Line 33... Line 33...
33
      integer                                hour,min
33
      integer                                hour,min
34
      character*20                           datestr
34
      character*20                           datestr
35
      character*120                          str
35
      character*120                          str
36
      character*4                            str1
36
      character*4                            str1
37
      character*2                            str2,str3,str4,str5,str6
37
      character*2                            str2,str3,str4,str5,str6
-
 
38
      integer                                isok
-
 
39
      integer                                nleaving
38
 
40
 
39
c     ----------------------------------------------------------------------
41
c     ----------------------------------------------------------------------
40
c     Do the reformating
42
c     Do the reformating
41
c     ----------------------------------------------------------------------
43
c     ----------------------------------------------------------------------
42
 
44
 
Line 263... Line 265...
263
            enddo
265
            enddo
264
         enddo
266
         enddo
265
 
267
 
266
      endif
268
      endif
267
         
269
         
-
 
270
c     Get number of trajectories leaving domain
-
 
271
      if ( (mode.eq.'leaving') ) then
268
 
272
 
-
 
273
c        Read the complete trajectory file
-
 
274
         allocate(tra(ntra,ntim,ncol),stat=stat)
-
 
275
         call ropen_tra(fid,inpfile,ntra,ntim,ncol,refdate,vars,inpmode)
-
 
276
         call read_tra (fid,tra,ntra,ntim,ncol,inpmode)
-
 
277
         call close_tra(fid,inpmode)
-
 
278
 
-
 
279
c        Determine the number of trajectories leaving domain
-
 
280
         do i=1,ntra
-
 
281
            isok = 1
-
 
282
            do j=1,ntim
-
 
283
               if ( tra(i,j,4).lt.0. ) isok = 0
-
 
284
            enddo         
-
 
285
            if ( isok.eq.0 ) then
-
 
286
               nleaving = nleaving + 1
-
 
287
            endif
-
 
288
         enddo
-
 
289
 
-
 
290
c        Write output
-
 
291
	 print*,nleaving     
-
 
292
 
-
 
293
      endif
-
 
294
         
269
      end
295
      end
270
 
296
 
271
 
297
 
272
      
298
      
273
 
299