spectral energy from 2D FFT

From: Bjoern Maronga <maronga_at_nyahnyahspammersnyahnyah>
Date: Thu Feb 11 2010 - 11:52:35 MST

I have problems carrying out proper spectra from a discrete two-dimensional
field A (e.g. vertical velocity). Unfortunately, NCL does not support the
function ezfft2f yet. So I was trying to use fft2df for a 2D-FFT. Following
literature (e.g. Stull), the variance of my field A should be equal to the
sum of square of the norm of the Fourier transform F_A:

variance(A) = sum from i=1 to N-1 of | F_A(i) |^2
where | F_A(i) |^2 = (F_Arealpart(i)^2 + F_Aimag.part(i)^2

for a 1D series. I tried to use this to check whether the FFT is working
properly. But I am confused. The equation should adapted to 2D be:

variance(A) = sum from i=1 to N-1 sum from j=1 to N-1 of | F_A(i,j) |^2
where | F_A(i,j) |^2 = (F_Arealpart(i,j)^2 + F_Aimag.part(i,j)^2

But the results are quite different (0.265 and 0.48). The function fft2df
transforms the array A(M x N) to an array of size (M x N/2+1). Now I'm not
sure, how to sum up to get correct variances. I tried summing up the full
array as well as only (N/2+1,N/2+1) and cared for the mean values in i=0 and
j=0.

Furthermore I want to calculate the variance (energy) spectrum from the
Fourier transform F_A and plot variance against wave number, in consideration
of the grid spacing of 100m in the original data.

I haven't found any useful information about how to handle the FFT result of a
2D field and how to carry out the desired spectrum.

Has anybody a solution or hints?

Best regards,
Bjoern Maronga
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Feb 11 11:52:45 2010

This archive was generated by hypermail 2.1.8 : Thu Feb 18 2010 - 10:33:29 MST