SUBROUTINE W2GUV I(MEND1,NEND1,JEND1 ,MNWAV,IMAX,JMAX,IMX ,JMAXHF,KMAX, I IFAX ,TRIGS,SINCLT,ER ,PNM ,DPNM,QROT,QDIV, O GU ,GV , W GWRK) C C...GU,GV IS NOT PSEUDO WIND,9.5.NOT MULTIPLIED BY SINCLT C DIMENSION QROT(2,KMAX,MNWAV),QDIV(2,KMAX,MNWAV) c990408 c DIMENSION IFAX(10),TRIGS(500) DIMENSION IFAX(10),TRIGS(IMAX) C...WARNING: THE DIMENSION OF GU,GV,GWRK SHOULD BE .GE. IMX*JMAX*KMAX C IMX=IMAX+2 DIMENSION GU (IMAX,JMAX,KMAX),GV (IMAX,JMAX,KMAX) DIMENSION GWRK(IMAX,JMAX,KMAX) DIMENSION PNM (MNWAV,JMAXHF) ,DPNM(MNWAV,JMAXHF) DIMENSION SINCLT(JMAX) C C...CONVERSION TO PSI & CHI ERSQ =ER*ER ERSQIV=1.0/ERSQ L=0 DO 200 M=1,MEND1 NMAX=MIN(NEND1,JEND1+1-M) NMIN=1 IF(M.EQ.1) NMIN=2 DO 220 N=NMIN,NMAX AN =N+M-2 FNN1=-ERSQ/( AN*(AN+1.0) ) *vdir loopcnt=200 DO 220 K=1,2 DO 220 K1=1,KMAX QROT(K,K1,L+N)=FNN1*QROT(K,K1,L+N) QDIV(K,K1,L+N)=FNN1*QDIV(K,K1,L+N) 220 CONTINUE L=L+NMAX 200 CONTINUE C CALL LGNUV I(MEND1,NEND1,JEND1,MNWAV,IMAX,JMAX,JMAXHF,KMAX,PNM,DPNM,QROT,QDIV, O GU ,GV , W GWRK) LOT=JMAX*KMAX CALL FFT991(GU,TRIGS,IFAX,1,IMX,IMAX,LOT,1) CALL FFT991(GV,TRIGS,IFAX,1,IMX,IMAX,LOT,1) C CALL FFT991(GU ,GWRK,TRIGS,IFAX,1,IMX,IMAX,LOT,1) C CALL FFT991(GV ,GWRK,TRIGS,IFAX,1,IMX,IMAX,LOT,1) C DO 100 J=1,JMAX SINCLI=0.0 IF(SINCLT(J).GT.1.0D-6) THEN SINCLI=1.0/(ER*SINCLT(J)) END IF DO 100 K=1,KMAX DO 100 I=1,IMAX GU(I,J,K)=GU(I,J,K)*SINCLI GV(I,J,K)=GV(I,J,K)*SINCLI 100 CONTINUE C C...CONVERSION TO ROT & DIV L=0 DO 300 M=1,MEND1 NMAX=MIN(NEND1,JEND1+1-M) DO 320 N=1,NMAX AN =N+M-2 FNN1=-AN*(AN+1.0)*ERSQIV *vdir loopcnt=200 DO 320 K=1,KMAX*2 QROT(K,1,L+N)=FNN1*QROT(K,1,L+N) QDIV(K,1,L+N)=FNN1*QDIV(K,1,L+N) 320 CONTINUE L=L+NMAX 300 CONTINUE C RETURN END SUBROUTINE W2GUV