# [ncl-talk] About 'fft2df' function and wave numbers

Yong-jie Huang huangyj at mail.iap.ac.cn
Sat Aug 1 10:25:22 MDT 2015

```
Dear all,

These days, I used the 'fft2df' function to calculate the spectra of a two-dimensional physical space [f(ny,nx)]. Then I got a (ny * nx/2+1) shaped array [F(ny,nx/2+1)]. However, how to get the wave numbers corresponding to the spectral-spatial array F? Is zonal wave number k = i/nx, meridional wave number l = j/ny, and total wave number K = sqrt(k^2+l^2),(j=0,1,...,ny-1; i=0,1,...,nx/2)?
And I also wonder why return array from 'fft2df' is a (ny * nx/2+1) shape. Why not (ny/2+1 * nx/2+1) shape? Because from (ny/2+2) onwards, all meridional wave numbers will be larger than Nyquist frequency (= 2*sampling rate) and therefore have to be cut off.
Could someone can answer my doubts above? Thank you very much!

Yours sincerely,
Yong-Jie Huang

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150802/1b31bed3/attachment.html
```