subroutine kyspacee(aky,ay) c c Transform a variable from y space (ay) into ky space (aky) keeping c only the dealiased part. The transform is done in place, so ay c is overwritten with its full transform. c implicit none include 'itg.par' include 'itg.cmn' integer l,m,n,index,imode complex aky(nzz,mz*kz) complex ay(mzz/2,nzz*kz) c c See comments on real-to-complex ffts in yspace.f c real scale integer isign scale=1./float(malias) isign=-1 c c Radial boundary conditions c if (iperiod.eq.0) then do n=1,nalias do m=1,malias imode=1+(n-1)*kd ay(m,imode)=0.0 enddo enddo endif c call scfftm(isign,malias,kd*nalias,scale, & ay,mzz,ay,mzz/2,tabley,worky,0) c c get ky=0 (m=1) component: c do n=1,nalias cfpp$ select (vector) do l=1,kd imode=l+(n-1)*kd aky(n,l)=ay(1,imode) enddo enddo c c get ky>0 components (factor of 2 for sin/cos vs. complex conventions). c do n=1,nalias do m=2,md cfpp$ select (vector) do l=1,kd imode=l+(n-1)*kd index=l+(m-1)*kd aky(n,index)=ay(m,imode)*2. enddo enddo enddo c return end