Subversion Repositories lagranto.ecmwf

Rev

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

Rev 3 Rev 13
Line 50... Line 50...
50
      real      eps
50
      real      eps
51
      parameter (eps=1.e-8)
51
      parameter (eps=1.e-8)
52
 
52
 
53
c     Auxiliary variables
53
c     Auxiliary variables
54
      real      rid0,rjd0,rkd0,rid1,rjd1,rkd1
54
      real      rid0,rjd0,rkd0,rid1,rjd1,rkd1
-
 
55
      integer   i
55
 
56
 
56
c     Externals 
57
c     Externals 
57
      real      int_time
58
      real      int_time
58
      external  int_time
59
      external  int_time
59
 
60
 
Line 414... Line 415...
414
 
415
 
415
c     Get the pressure at the lowest level and at the surface 
416
c     Get the pressure at the lowest level and at the surface
416
      ppo0 = int_index3(vert,nx,ny,nz,rid,rjd,real(1),0.)
417
      ppo0 = int_index3(vert,nx,ny,nz,rid,rjd,real(1),0.)
417
      psur = int_index3(surf,nx,ny, 1,rid,rjd,real(1),0.)
418
      psur = int_index3(surf,nx,ny, 1,rid,rjd,real(1),0.)
418
 
419
 
-
 
420
c     Decide whether the pressure is ascending or descending
-
 
421
      ppo1 = int_index3(vert,nx,ny,nz,rid,rjd,real(nz),0.)
-
 
422
      if ( ppo1.gt.ppo0 ) then
-
 
423
         ppo0 = ppo1
-
 
424
      endif
-
 
425
 
419
c     The point is between the surface and the lowest level: return
426
c     The point is between the surface and the lowest level: return
-
 
427
      if ( mode.eq.3 ) then
420
      if ( (ppo.ge.ppo0).and.(ppo.le.psur).or.
428
        if ( (ppo.ge.ppo0).and.(ppo.le.psur).or.
421
     >     (ppo.le.ppo0).and.(ppo.ge.psur) )
429
     >       (ppo.le.ppo0).and.(ppo.ge.psur) )
422
     >then 
430
     >  then
423
         psur = int_index3(surf,nx,ny, 1,rid,rjd,real(1),0.)
431
           psur = int_index3(surf,nx,ny, 1,rid,rjd,real(1),0.)
424
         rkd  = (psur-ppo)/(psur-ppo0)
432
           rkd  = (psur-ppo)/(psur-ppo0)
425
         goto 100
433
           goto 100
426
      endif
434
        endif
-
 
435
      endif
427
 
436
 
428
c     Full-level search (TH): linear ascending scanning through all levels
437
c     Full-level search (TH): linear ascending scanning through all levels
429
      if ( mode.eq.1 ) then
438
      if ( mode.eq.1 ) then
430
        
439
        
431
         ppo0 = int_index3(vert,nx,ny,nz,rid,rjd,real(1),0.)
440
         ppo0 = int_index3(vert,nx,ny,nz,rid,rjd,real(1),0.)