<div dir="ltr"><div><div><div>The underlying fortran code uses FFTs at each latitude. It assumes the data are global (cyclic in longitude). I am not sure you can modify the code to do what you want. <br><br></div><div>If you work on non-global data, what does 'wave number' mean?<br></div><div><br>Here is a f77 code snippet:<br><br>==============================<wbr>==========================<br>c-----------------------------<wbr>------------------------------<wbr>---------<br>c---------------COMPUTING SPACE-TIME SPECTRUM for EE1----------------<br> <br> DO T = 1, NT<br> DO N = 1, NL<br>c CEEa(n) contains the grid values around a latitude circle<br> CEEA(N) = EE1(N,T)<br> END DO<br> CALL CFFTF (NL, CEEA, WSAVE1)<br> DO N = 1, NL<br>c Normalize<br> EE1(N,T) = CEEA(N)/DBLE(NL)<br> END DO<br> END DO<br> <br>c Now the array EE(n,t) contains the Fourier coefficients (in planetary<br>c wavenumber space) for each time.<br> <br> DO N = 1, NL<br> DO T = 1, NT<br>c CEEb(t) contains a time-series of the coefficients for a single<br>c planetary zonal wavenumber<br> CEEB(T) = EE1(N,T)<br> END DO<br> CALL CFFTF (NT, CEEB, WSAVE2)<br> DO T = 1, NT<br>C Normalize<br> EE1(N,T) = CEEB(T)/DBLE(NT)<br> END DO<br> END DO<br> <br>c Now the array EE1(n,t) contains the space-time spectrum.<br>==============================<wbr>======================<br><span style="font-size:12.8px"></span><div><div><div><div><div><div><br></div><div>I do not think you can isolate a region for space-time spectra.<br><br><br></div></div></div></div></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 17, 2017 at 7:53 AM, Adithyan Velloor <span dir="ltr"><<a href="mailto:adtynvellooor@gmail.com" target="_blank">adtynvellooor@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear NCL users,<div><br></div><div>I am trying to plot the wheeler killadi spectrum (wave number spectrum) for a specific region (Indian Ocean basin from 40-140 degree East). The in built script for the spectrum is for the entire longitude 0 to 360.</div><div><br></div><div>Someone please tell me a way to take a specific longitude region to get the spectrum correctly.. Below is the script to get the wheeler kiladis spectra if I consider the entire longitudional belt. Kindly suggest the necessary changes to be made in the script to modify it for my purpose.</div><div><br></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">load "$NCARG_ROOT/lib/ncarg/</span><span style="font-size:12.8px">nclscri<wbr>pts/csm/gsn_code.ncl"</span><br style="font-size:12.8px"><span style="font-size:12.8px">load "$NCARG_ROOT/lib/ncarg/</span><span style="font-size:12.8px">nclscri<wbr>pts/csm/gsn_csm.ncl"</span><br style="font-size:12.8px"><span style="font-size:12.8px">load "$NCARG_ROOT/lib/ncarg/</span><span style="font-size:12.8px">nclscri<wbr>pts/csm/contributed.</span><span style="font-size:12.8px">ncl"</span><br style="font-size:12.8px"><span style="font-size:12.8px">load "$NCARG_ROOT/lib/ncarg/</span><span style="font-size:12.8px">nclscri<wbr>pts/csm/diagnostics_</span><span style="font-size:12.8px">cam.ncl"</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px"> case = "wheeler"</span><br style="font-size:12.8px"><span style="font-size:12.8px"> diro = "./"</span><br style="font-size:12.8px"><span style="font-size:12.8px"> latN = 15</span><br style="font-size:12.8px"><span style="font-size:12.8px"> latS = -latN</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px"> nDayWin = 96</span><br style="font-size:12.8px"><span style="font-size:12.8px"> nDaySkip = 1</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px"> opt = True</span><br style="font-size:12.8px"><span style="font-size:12.8px"> opt@debug= True</span><br style="font-size:12.8px"><span style="font-size:12.8px"> opt@pltType = "eps"</span><br style="font-size:12.8px"><span style="font-size:12.8px"> opt@cnLinesOn = False ; turn off contour lines</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px"> spd = 1</span><br style="font-size:12.8px"><span style="font-size:12.8px"> var = "olr_fav"</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px"> setfileoption("nc", "FileStructure", "Advanced")</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px"> f = addfile("<a href="http://olr.nc" target="_blank">olr.nc</a>"</span><span style="font-size:12.8px">, "r")</span><br style="font-size:12.8px"><span style="font-size:12.8px"> olr_fav = f->olr(0:14457,{latS:latN},0:</span><span style="font-size:12.8px">1<wbr>41)</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">;function ismissing (olr_fix)</span><br style="font-size:12.8px"><span style="font-size:12.8px"> return_val [dimsizes(olr_fix)] : logical</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px"> ;set_default_fillvalue("<wbr>float"</span><span style="font-size:12.8px">, 1.e20)</span><br style="font-size:12.8px"><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px"> wkSpaceTime (olr_fav, diro, case, var \</span><br style="font-size:12.8px"><span style="font-size:12.8px"> ,latN, spd, nDayWin, nDaySkip, opt )</span><br></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Thanks</span></div></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>