Subversion Repositories lagranto.ecmwf

Rev

Rev 13 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13 Rev 15
Line 267... Line 267...
267
      call ropen_tra(fid,inpfile,ntra,ntime,nfield,
267
      call ropen_tra(fid,inpfile,ntra,ntime,nfield,
268
     >                   reftime,varsinp,inpmode)
268
     >                   reftime,varsinp,inpmode)
269
      call read_tra (fid,trainp,ntra,ntime,nfield,inpmode)
269
      call read_tra (fid,trainp,ntra,ntime,nfield,inpmode)
270
      call close_tra(fid,inpmode)
270
      call close_tra(fid,inpmode)
271
 
271
 
-
 
272
c     Bring trajectories into grid interval
-
 
273
      print*,xmin,ymin,dx,dy,nx,ny
-
 
274
      if ( ( abs(xmin+180.).lt.eps).and.
-
 
275
     >     ( abs(ymin+90. ).lt.eps).and.
-
 
276
     >     ( abs(dx-1.    ).lt.eps).and.
-
 
277
     >     ( abs(dy-1.    ).lt.eps).and.
-
 
278
     >     ( nx.eq.360    ).and.
-
 
279
     >     ( ny.eq.180    ) )
-
 
280
     >then
-
 
281
        print*,'HALLO'
-
 
282
        do i=1,ntra
-
 
283
          do j=1,ntime
-
 
284
            if ( trainp(i,j,2).lt.-180. ) then
-
 
285
                trainp(i,j,2) = trainp(i,j,2) + 360.
-
 
286
            endif
-
 
287
            if ( trainp(i,j,2).gt.180. ) then
-
 
288
                trainp(i,j,2) = trainp(i,j,2) - 360.
-
 
289
            endif
-
 
290
         enddo
-
 
291
        enddo
-
 
292
      endif
-
 
293
 
272
c     Check that first four columns correspond to time,lon,lat,p
294
c     Check that first four columns correspond to time,lon,lat,p
273
      if ( (varsinp(1).ne.'time' ).or.
295
      if ( (varsinp(1).ne.'time' ).or.
274
     >     (varsinp(2).ne.'xpos' ).and.(varsinp(2).ne.'lon' ).or.
296
     >     (varsinp(2).ne.'xpos' ).and.(varsinp(2).ne.'lon' ).or.
275
     >     (varsinp(3).ne.'ypos' ).and.(varsinp(3).ne.'lat' ).or.
297
     >     (varsinp(3).ne.'ypos' ).and.(varsinp(3).ne.'lat' ).or.
276
     >     (varsinp(4).ne.'ppos' ).and.(varsinp(4).ne.'p'   ) )
298
     >     (varsinp(4).ne.'ppos' ).and.(varsinp(4).ne.'p'   ) )
Line 727... Line 749...
727
c        Gridding of trajectory
749
c        Gridding of trajectory
728
         do j=1,npts
750
         do j=1,npts
729
 
751
 
730
c           Check whether point is in data domain
752
c           Check whether point is in data domain
731
	    if ( (nlon(j).gt.xmin).and.(nlon(j).lt.xmax).and.
753
	    if ( (nlon(j).gt.xmin).and.(nlon(j).lt.xmax).and.
732
     >           (nlat(j).gt.ymin).and.(nlat(j).lt.ymax))
754
     >       (nlat(j).gt.ymin).and.(nlat(j).lt.ymax))
733
     >      then
755
     >      then
734
 
756
 
735
c              Increase counter for gridded points
757
c              Increase counter for gridded points
736
               count = count + 1
758
               count = count + 1
737
 
759