C
C *** OUTPUT OF WAVE DATA TO FILE ***
C
      SUBROUTINE WVOT(WV,NWV,MWV,DT)
C
C WV(I) : WAVE DATA
C NWV   : NUMBER OF WAVE DATA
C MWV   : NWV IN MAIN
C DT    : DELTA TIME
C
      IMPLICIT REAL*8(A-H,O-Z)
      DIMENSION WV(MWV)
      CHARACTER FNAME*30
C
C *** FILE OUTPUT TO FILE DATA ***
C
      WRITE(*,1000)
      WRITE(*,1010)
      READ(*,*)IYES
      IF(IYES.NE.0)GOTO 20
 1000 FORMAT(/' From SUBROUTINE WVOT : wave data to file')
 1010 FORMAT(/' File out (yes=0)? :',\)
C
   10 WRITE(*,1020)
      READ(*,'(A)',ERR=10)FNAME
      IF(FNAME(1:1).EQ.' ')GOTO 10
 1020 FORMAT(/' Enter file name :',\)
C
      OPEN(7,FILE=FNAME,ERR=10)
      WRITE(7,2000)NWV,DT
      DO 100 IWV=1,NWV,8
      WRITE(7,2010)(WV((IWV-1)+I),I=1,8)
  100 CONTINUE
      CLOSE(7)
 2000 FORMAT(I5,3F10.4)
 2010 FORMAT(8F10.4)
C
   20 WRITE(*,*)
C
      RETURN
      END
