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 138... Line 138...
138
 
138
 
139
c     Auxiliary variables
139
c     Auxiliary variables
140
      integer      i,j,n
140
      integer      i,j,n
141
      real         arr(ntra)
141
      real         arr(ntra)
142
      integer      ntimes
142
      integer      ntimes
143
      real         times(1000)
143
      real         times(10000)
144
      integer      ierr
144
      integer      ierr
145
      character*80 vars(ncol+2)
145
      character*80 vars(ncol+2)
146
      integer      nvars
146
      integer      nvars
147
 
147
 
148
c     Read ascii mode, sorted by trajectory (mode=1)
148
c     Read ascii mode, sorted by trajectory (mode=1)
Line 504... Line 504...
504
         write(fid,*)
504
         write(fid,*)
505
 
505
 
506
c        Write variable names
506
c        Write variable names
507
         str=''
507
         str=''
508
         do i=1,ncol
508
         do i=1,ncol
-
 
509
            varname = vars(i)
-
 
510
            vars(i) = varname(1:9)
509
            str=trim(str)//trim(vars(i))
511
            str     = trim(str)//trim(vars(i))
510
         enddo
512
         enddo
511
         write(fid,'(a6,a9,a8,a6,100a10)') (trim(vars(i)),i=1,ncol)
513
         write(fid,'(a6,a9,a8,a6,100a10)') (trim(vars(i)),i=1,ncol)
512
         write(fid,'(a6,a9,a8,a6,100a10)') 
514
         write(fid,'(a6,a9,a8,a6,100a10)') 
513
     >              '------','---------','--------','------',
515
     >              '------','---------','--------','------',
514
     >              ('----------',i=5,ncol)
516
     >              ('----------',i=5,ncol)
Line 676... Line 678...
676
      character*500 str
678
      character*500 str
677
      integer       nline0,nline1,nline2
679
      integer       nline0,nline1,nline2
678
      integer       isstr,isok
680
      integer       isstr,isok
679
      character     ch
681
      character     ch
680
      character*80  vars(200)
682
      character*80  vars(200)
-
 
683
      integer       ios
681
 
684
 
682
c     Open file
685
c     Open file
683
      if (mode.eq.1) then
686
      if (mode.eq.1) then
684
         fid=10
687
         fid=10
685
         open(fid,file=filename)
688
         open(fid,file=filename)
Line 718... Line 721...
718
         ntim = 0
721
         ntim = 0
719
 
722
 
720
c        Get the first data block
723
c        Get the first data block
721
         nline0  = 5
724
         nline0  = 5
722
         nline1  = 5
725
         nline1  = 5
723
         read(fid,*,end=140)
726
         read(fid,*,end=140,iostat=ios)
724
 100     read(fid,'(a500)',end=110) str
727
 100     read(fid,'(a500)',end=110,iostat=ios) str
725
         if (str.ne.'') then
728
         if (str.ne.'') then
726
            nline1 = nline1 + 1
729
            nline1 = nline1 + 1
727
            goto 100
730
            goto 100
728
         endif
731
         endif
729
 110     continue
732
 110     continue
730
         
733
         
731
c        Get the total numbers of lines in the data block
734
c        Get the total numbers of lines in the data block
732
         nline2 = nline1
735
         nline2 = nline1
-
 
736
         if ( ios.eq.0 ) then
733
 120     read(fid,*,end=130)
737
 120        read(fid,*,end=130)
734
         nline2 = nline2 + 1
738
            nline2 = nline2 + 1
735
         goto 120
739
            goto 120
736
 130     nline2 = nline2 + 1
740
 130        nline2 = nline2 + 1
-
 
741
         endif
737
 
742
 
738
c        Set the dimensions
743
c        Set the dimensions
739
         if (mode.eq.1) then
744
         if (mode.eq.1) then
740
            ntim = nline1 - nline0
745
            ntim = nline1 - nline0
741
            ntra = (nline2-nline0+1)/(ntim+1)
746
            ntra = (nline2-nline0+1)/(ntim+1)