<div dir="ltr"><div><div><div> ntim = 73<br> nlat = 73<br> mlon = 144<br><br> y = random_uniform(0,100,(/ntim,nlat,mlon/))<br> y!0 = "time"<br> y!1 = "lat"<br> y!2 = "lon"<br><br> printVarSummary(y) ; [time | 73] x [lat | 73] x [lon | 144]<br> print("==========")<br><br> Y = y(lat|:,lon|:,time|:) ; convenience<br> printVarSummary(Y)<br> cf = ezfftf (Y) ; ==> cf(2,nlat,mlon,ntim/2)<br> printVarSummary(cf) ; [2] x [73] x [144] x [36]<br><br> ;print(cf@xbar)<br><br> do n=0,nlat*mlon-1<br> cf@xbar(n) = 0.0 ; reconstruct with harmonics only<br> end do<br><br> cf(:,:,:, 0:4 ) = 0.0 ; set non-desired harmonics to 0.0<br> cf(:,:,:, 6:16) = 0.0<br> cf(:,:,:,18: ) = 0.0<br><br> YY = ezfftb(cf,cf@xbar)<br> copy_VarMeta(Y, YY)<br> YY@info = "Only harmonics 5 and 18 retained: means removed"<br> printVarSummary(YY) ; (lat,lon,time)<br><br><br></div>You can apply to your file.<br></div>Also, *you* cn determine how to write the file out.<br><br></div>Method 1 at<br><a href="http://www.ncl.ucar.edu/Applications/o-netcdf.shtml">http://www.ncl.ucar.edu/Applications/o-netcdf.shtml</a><br><div><div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 2, 2017 at 7:41 PM, Lyndon Mark Olaguera <span dir="ltr"><<a href="mailto:olagueralyndonmark429@gmail.com" target="_blank">olagueralyndonmark429@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"><div><span style="font-size:12.8px">Dear All,</span><br></div><div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I would like to perform fourier analysis to a pentad (nonoverlapping five day average) time series(t=1 to t=73). I would like to get the sum of the 5th and 18th harmonics and output as a separate netcdf file. Is this possible to do in ncl?I am new in ncl. Ill appreciate if anyone can point me to the right functions that I can use here.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Here is the link to the file that I'm working with.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><span style="font-size:small"><a href="https://drive.google.com/file/d/0B9faET7Bc2o8cWpmRE1yNldNVE9SQ1JNNF9XdXJPVUdqbUc0/view?usp=sharing" target="_blank">https://drive.google.com/file/<wbr>d/<wbr>0B9faET7Bc2o8cWpmRE1yNldNVE9SQ<wbr>1JNNF9XdXJPVUdqbUc0/view?usp=<wbr>sharing</a></span><br></div></div><div><div class="m_-8382382044128338985gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><br></div><div><div style="font-size:12.8px">Many thanks in advance,</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Lyndz</div></div></div></div></div></div></div></div></div></div></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>