subroutine kxspacec(kxac,kxas,kxa1) c c Transform a variable from x space into kx space. c implicit none include 'itg.par' include 'itg.cmn' real kxac(lz,mz,nz,nspecz),kxas(lz,mz,nz,nspecz) integer l,m,n,ifail,nmodes,index,imode complex kxa(nzz,mz*lz),kxa1(nzz,mz*lz) real scale,work(4*lz*mz*nzz) integer isign,nwork,ntablex nwork=4*lz*mz*nzz c scale=1./sqrt(float(nalias)) scale=1./float(nalias) ntablex=100+2*nzz isign=1 c c For single-helicity run, skip this subroutine, (not implemented.) c call xmcfft(isign,nalias,md*ldb,scale,kxa1,1,nzz,kxa,1,nzz, & tablex,ntablex,work,nwork) c do n=1,nddp do m=1,md do l=1,ldb imode=l+(m-1)*ldb kxac(l,m,n,1)=real(kxa(n,imode)) kxas(l,m,n,1)=-aimag(kxa(n,imode)) enddo enddo enddo c do n=nadd+nddp+1,nalias do m=1,md do l=1,ldb imode=l+(m-1)*ldb kxac(l,m,n-nadd,1)=real(kxa(n,imode)) kxas(l,m,n-nadd,1)=-aimag(kxa(n,imode)) enddo enddo enddo c return end