subroutine kyspace(kxa1,kxa4) c c Transform a variable from y space into ky space. c implicit none include 'itg.par' include 'itg.cmn' integer l,m,n,index,imode complex kxa1(nzz,mz*lz) complex kxa4(mzz/2,nzz*lz) complex kxa2(mzz/2,nzz*lz) 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)*ldb kxa4(m,imode)=0.0 enddo enddo endif c call scfftm(isign,malias,ldb*nalias,scale, & kxa4,mzz,kxa2,mzz/2,tabley,worky,0) c c get ky=0 (m=1) component: c do n=1,nalias do l=1,ldb imode=l+(n-1)*ldb kxa1(n,l)=kxa2(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 do l=1,ldb imode=l+(n-1)*ldb index=l+(m-1)*ldb kxa1(n,index)=kxa2(m,imode)*2. enddo enddo enddo c return end