2 I(MEND1,NEND1,JEND1,MNWAV,IMAX,JMAX,JMAXHF,KMAX,IPNM,PNM,QDAT,
6 DIMENSION QDAT(2,KMAX,MNWAV) ,PNM (MNWAV,JMAXHF)
7 DIMENSION GDAT(IMAX,JMAX,KMAX),GWRK(IMAX,2)
8 DIMENSION GDATW(KMAX,IMAX,2)
9 DIMENSION QDATW(KMAX,3,MNWAV)
12 CALL RESET(GDAT,IMAX*JMAX*KMAX)
14 ! Rearrange QDAT data so that we can collapse the inner loop
15 ! over 2 chunks of length KMAX.
20 QDATW(K,1,L)=QDAT(1,K,L)
21 QDATW(K,2,L)=QDAT(2,K,L)
27 CALL RESET(GDATW,KMAX*IMAX*2)
32 IF (JM .EQ. JP) JPC=JMC
35 NMAX=MIN(JEND1+1-M,NEND1)
39 GDATW(K,2*M-1,JMC)=GDATW(K,2*M-1,JMC)+QDATW(K,1,L+N)*PNM(L+N,J)
40 C-COLL GDATW(K,2*M ,JMC)=GDATW(K,2*M ,JMC)+QDATW(K,2,L+N)*PNM(L+N,J)
45 GDATW(K,2*M-1,JPC)=GDATW(K,2*M-1,JPC)+QDATW(K,1,L+N)*PNM(L+N,J)
46 C-COLL GDATW(K,2*M ,JPC)=GDATW(K,2*M ,JPC)+QDATW(K,2,L+N)*PNM(L+N,J)
55 GDAT(M,JM,K)=GDATW(K,M,JMC)
56 GDAT(M,JP,K)=GDATW(K,M,JPC)
60 IF(MOD(JMAX,2).EQ.1.AND.J.EQ.JMAXHF) GO TO 100
64 GWRKM1=GDAT(M,JM,K)+GDAT(M,JP,K)
65 GWRKM2=GDAT(M,JM,K)-GDAT(M,JP,K)
67 GWRKM1=GDAT(M,JP,K)+GDAT(M,JM,K)
68 GWRKM2=GDAT(M,JP,K)-GDAT(M,JM,K)