Subversion Repositories lagranto.ecmwf

Rev

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

Rev 5 Rev 13
Line 668... Line 668...
668
      real          varmin(4),varmax(4),stag(4)
668
      real          varmin(4),varmax(4),stag(4)
669
      real          mdv
669
      real          mdv
670
      character*80  cfn
670
      character*80  cfn
671
      integer       ierr
671
      integer       ierr
672
      integer       i,ndim
672
      integer       i,ndim
673
      character*80  vars(100)
-
 
674
      integer       nvars
673
      integer       nvars
675
      integer       ntimes
674
      integer       ntimes
676
      real          times(100)
675
      real          times(100)
677
      character*500 str
676
      character*500 str
678
      integer       nline0,nline1,nline2
677
      integer       nline0,nline1,nline2
679
      integer       isstr,isok
678
      integer       isstr,isok
680
      character     ch
679
      character     ch
-
 
680
      character*80  vars(200)
681
 
681
 
682
c     Open file
682
c     Open file
683
      if (mode.eq.1) then
683
      if (mode.eq.1) then
684
         fid=10
684
         fid=10
685
         open(fid,file=filename)
685
         open(fid,file=filename)
Line 703... Line 703...
703
c        Get the number of columns
703
c        Get the number of columns
704
         isstr=0
704
         isstr=0
705
         ncol =0
705
         ncol =0
706
         do i=1,500
706
         do i=1,500
707
            ch = str(i:i)
707
            ch = str(i:i)
708
 
-
 
709
            if ( (isstr.eq.0).and.(ch.ne.' ') ) then
708
            if ( (isstr.eq.0).and.(ch.ne.' ') ) then
710
               isstr=1
709
               isstr=1
711
            elseif ( (isstr.eq.1).and.(ch.eq.' ') ) then
710
            elseif ( (isstr.eq.1).and.(ch.eq.' ') ) then
712
               isstr=0
711
               isstr=0
713
               ncol=ncol+1
712
               ncol=ncol+1
714
            endif
713
            endif
715
         enddo
714
         enddo
716
 
715
 
-
 
716
c        Init the dimensions for empty trajectory files
-
 
717
         ntra = 0
-
 
718
         ntim = 0
-
 
719
 
717
c        Get the first data block
720
c        Get the first data block
718
         nline0  = 5
721
         nline0  = 5
719
         nline1  = 5
722
         nline1  = 5
720
         read(fid,*)
723
         read(fid,*,end=140)
721
 100     read(fid,'(a500)',end=110) str
724
 100     read(fid,'(a500)',end=110) str
722
         if (str.ne.'') then
725
         if (str.ne.'') then
723
            nline1 = nline1 + 1
726
            nline1 = nline1 + 1
724
            goto 100
727
            goto 100
725
         endif
728
         endif
Line 754... Line 757...
754
         ncol = nvars-1
757
         ncol = nvars-1
755
 
758
 
756
      endif
759
      endif
757
 
760
 
758
c     Close file
761
c     Close file
-
 
762
 140  continue
759
      if (mode.eq.1) then
763
      if (mode.eq.1) then
760
         close(fid)
764
         close(fid)
761
      elseif (mode.eq.2) then
765
      elseif (mode.eq.2) then
762
         close(fid)
766
         close(fid)
763
      elseif (mode.eq.3) then
767
      elseif (mode.eq.3) then