<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi all,<div class="">I'm trying to perform a spectral analysis of surface fluxes (mainly sensible heat) in order to identify spatial scales of surface heterogeneity [Baidya Roy et al., 2003]. In order to test the method I'm first using idealized simulations where the heterogeneity is prescribed with one dry and one wet patch aligned in the x-dimension with very different fluxes. What I'd expect to find in this case is a peak at the scale of ~100km, which is the size of the patch.&nbsp;</div><div class=""><br class=""></div><div class="">I've been trying to use the fft2df function, but the documentation is pretty limited, so that's why I'm asking here. The idea is to go from sensible heat flux, shfl_s(time, lat, lon), to the Fourier transform F(lhfl_s)(time, k_lat, k_lon) and then somehow collapse the 2-D DFT into a one-dimensional by averaging. Since the idealized domain is limited but with periodic boundary conditions I don't think that tapering would be necessary.&nbsp;</div><div class=""><br class=""></div><div class="">So I first apply&nbsp;</div><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" class="">&nbsp; coef:=fft2df(shfl_s(:,:))</font></div><div class=""><div class=""><font face="Menlo" class="">&nbsp; coefmod:=sqrt(coef(0,:,:)^2+coef(1,:,:)^2)</font></div></div><div class=""><div class=""><font face="Menlo" class="">&nbsp; spectrum=dim_avg_n_Wrap(coefmod, 0)</font></div></div><div class=""><br class=""></div><div class="">I believe that fft2df is returning the real and imaginary part of the Fourier transform, so that I have to compute the absolute value and then an average to get rid of the y-coordinate, which is useless given the heterogeneity gradient in my case is everywhere parallel to the x-axis. Is the procedure correct?</div><div class="">I get a spectrum which is something like that (don't mind the x-axis...), but I would have expected something different...</div><div class=""><br class=""></div><div class=""><img apple-inline="yes" id="8E67ECF6-3AD4-41D5-88F6-FC5A49E2FC06" height="770" width="779" apple-width="yes" apple-height="yes" src="cid:4C3AB0B5-477B-46B6-9E51-42DCFEFA9E7E@mpimet.mpg.de" class=""></div><div class=""><br class=""></div><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline">Guido Cioni</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://guidocioni.altervista" class="">http://guidocioni.altervista</a>.org</div>

</div>
<br class=""></div></body></html>