      SUBROUTINE W2G
     I(MEND1,NEND1,JEND1,MNWAV,IMAX,JMAX,IMX,JMAXHF,KMAX,
     I IFAX ,TRIGS,PNM  ,QDAT,
     O GDAT ,
     W GWRK)
C
      DIMENSION QDAT(2,KMAX,MNWAV)

c990408
c      DIMENSION IFAX(10),TRIGS(500)
      DIMENSION IFAX(10),TRIGS(IMAX)
C...WARNING: THE DIMENSION OF GDAT,GWRK SHOULD BE .GE. IMX*JMAX*KMAX
C            IMX=IMAX+2
      DIMENSION GDAT(IMAX,JMAX,KMAX),GWRK(IMAX,JMAX,KMAX)
      DIMENSION PNM (MNWAV,JMAXHF)
C
C...IPNM=1; THIS SUBR. IS ASSUMED TO BE CALLED WITH PNM
      IPNM=1
      CALL LGNW2G
     I(MEND1,NEND1,JEND1,MNWAV,IMAX,JMAX,JMAXHF,KMAX,IPNM,PNM,QDAT,
     O GDAT ,
     W GWRK)
      LOT=JMAX*KMAX
      CALL FFT991(GDAT,TRIGS,IFAX,1,IMX,IMAX,LOT,1)
C     CALL FFT991(GDAT,GWRK,TRIGS,IFAX,1,IMX,IMAX,LOT,1)
C
      RETURN
      END SUBROUTINE W2G

