<div dir="ltr"><div> x(t) - data values as a function of time <br></div>    N - number of time steps<br><div><div>  <br>f      - frequency<br><div>df    - frequency interval , f-df/2 to f+df/2<br>A(f) - periodgram estimates (FFT); amplitudes at each frequency .<br></div><div>         FFTs have some normalization associated with them (eg: 1/N)<br>k     - wave number<br>A(k) = A(1/f)<br><br>Periodogram:  P(k) = A^2(k)/2<br><font size="2">Total_Power = SUM[ A^2(k) ]/2   <br></font>     <br></div><div>Power Spectral Density (PSD) : <br>                                     The density of power in the interval &#39;df&#39;<br><div style="font-size:19.1995px;font-family:sans-serif">                         <br></div><div><font size="2">===<br></font></div><div><font size="2">There is an undocumented function in &#39;shea_util.ncl.&#39; </font><font size="2"><font size="2">This does everything the builtin function &#39;specx_anal&#39; does. It illustrates the spectral analysis process step-by-step.<br><br></font>function SPECX_ANAL(X[*]:numeric, iopt[1]:integer, jave[1]:integer, pct[1]:numeric)<br><br>You can see the function via:<br><br></font></div><div><font size="2">%&gt; less </font>&quot;$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/shea_util&quot;<br><br></div><div>or, use an editor (say, vi) to extract the code and make a local function<br><br>   <font size="2">SPECX_ANAL -&gt; </font><font size="2">SPECX_UFUK<br><br></font></div><div><font size="2">You can then change whatever you want.<br></font></div><div><br>---<br><font size="2">I wrote a draft, then found the following and modified it a bit:</font><br><font size="2">   <a href="http://th-www.if.uj.edu.pl/zfs/gora/timeseries09/lecture02.pdf" target="_blank">http://th-www.if.uj.edu.pl/zfs<wbr>/gora/timeseries09/lecture02.<wbr>pdf</a></font><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 17, 2016 at 1:36 AM, Ufuk Utku Turuncoglu (BE) <span dir="ltr">&lt;<a href="mailto:u.utku.turuncoglu@be.itu.edu.tr" target="_blank">u.utku.turuncoglu@be.itu.edu.tr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I just wonder that is there any exampleNCL script to plot time series in<br>
PSD (Power Spectral Density) vs. Frequency? I know that there are some<br>
NCL functions such as specx_anal but it gives variance not PSD. FFT<br>
functions might be used but i am not sure. Any suggestion might help.<br>
<br>
Regards,<br>
<br>
--ufuk<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>
</blockquote></div><br></div>