C
      PROGRAM skip
C
      PARAMETER(MWV=33000)
      CHARACTER INFILE*20
      REAL time(MWV)
      REAL XR1(MWV),XR2(MWV),XR3(MWV)
C
      WRITE(*,*)
      WRITE(*,*) 'Skip Data of Taiwan Wave Data'
      WRITE(*,*) '------------------------------------------------------
     +-----------'
      WRITE(*,*)
C
C  Prompt for input RECON'ed file
C
      WRITE(*,1010) 
 1010 FORMAT(1X,'Enter input wave name ')
      READ(*,1020) INFILE
 1020 FORMAT(A20)
C      
C *** Read input data file  ***
C
      OPEN(11,FILE=INFILE)
        i=1
   10   read(11,*,end=11)time(i),xr1(i),xr2(i),xr3(i)
        i=i+1
        goto 10
   11 CLOSE(11)
c
      NT=i-1
      dt=time(2)-time(1)
      write(*,*)'NT and DT=',NT,DT
      dur=(nt-1)*dt
      write(*,*)'Duration (sec)=',dur
C
c *** output ***
c
      WRITE(*,2010) 
 2010 FORMAT(1X,'Enter output wave name ')
      READ(*,2020) INFILE
 2020 FORMAT(A20)

      write(*,*)
      write(*,*)'Skip Data (no=0; yes=skip number)?'
      read(*,*)iskip
      iskip=iskip+1
      OPEN(11,FILE=INFILE,STATUS='unknown')
      do i=1,nt,iskip
      write(11,2000)dt*(i-1),xr1(i),xr2(i),xr3(i)
      end do
 2000 format(4e13.5)
      CLOSE(11)
c
        STOP
	END
