subroutine kxspacec(akx,ax) c c Transform a variable from x space (ax) into kx space (akx) keeping c only the dealiased part. The transform is done in place, so ax c is overwritten with its full transform. c implicit none include 'itg.par' include 'itg.cmn' complex akx(lz,mz,nz) complex ax(nzz,mz*lz) real scale,work(4*lz*mz*nzz) integer isign,nwork,ntablex integer l,m,n,index,imode nwork=4*lz*mz*nzz scale=1./float(nalias) ntablex=100+2*nzz isign=-1 call xmcfft(isign,nalias,md*ldb,scale,ax,1,nzz,ax,1,nzz, & tablex,ntablex,work,nwork) c do n=1,nddp do m=1,md do l=1,ldb imode=l+(m-1)*ldb akx(l,m,n)=ax(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 akx(l,m,n-nadd)=ax(n,imode) enddo enddo enddo c return end