<div dir="ltr"><div><div><div><div><div><div>[1]<br></div>As noted in the documentation:<br> "The units are variance/(unit frequency interval)."<br></div> **not** <br> "variance"<br><br>[2]<br></div>Look at the data ... literally<br> plot = gsn_csm_y(wks,rain,False) ; see attachment<br><br></div>Basically, the annual cycle of rain. <br><br></div>What is it you expect from a time series like this? The lag-1 day auto correlation is 0.96. A ***very red** process. <br><br></div>Assuming this is a climatology, I did a [four)info] on the data, The 1st harmonic has amplitude 7.3 with the phase max at day 220 and it explains 82% of the variance. The 2nd harmonic has amplitude 2.3; phase day 32; 8% of the variance.<br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 6, 2017 at 1:57 AM, 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">Hi All,<div><br></div><div>I'm trying to perform spectral analysis using the specx_anal function in ncl.</div><div>I'm getting a variance around 1000 near the zero mark.I dont know if I'm missing a step prior to performing the spectral analysis. I would like to ask for any suggestions on how can I improve this.</div><div><br></div><div><br></div><div>Attached are the data set and script.</div><div><br></div><div><div>load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_code.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_csm.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/contributed.<wbr>ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/shea_util.ncl"</div><div><br></div><div>begin</div><div>filename = "type1_clim.csv"</div><div>lines = asciiread(filename,-1,"string"<wbr>)</div><div>data = lines(1:)</div><div>rain = tofloat(str_get_field(data,10,<wbr>","))</div><div><br></div><div>d = 1</div><div>sm = 12</div><div>pct = 0.10</div><div><br></div><div>spec= specx_anal(rain,d,sm,pct)</div><div>printVarSummary(spec)</div><div><br></div><div>wks = gsn_open_wks("png","test_<wbr>fldmean") ; Opens a ps file</div><div>res = True </div><div>res@tiMainString = "Type1_Spectrum" ; title</div><div>f = spec@frq</div><div>res@tiXAxisString = "Frequency (cycles/day)" ; xaxis</div><div>res@tiYAxisString = "Variance" ; yaxis</div><div><br></div><div>splt = specx_ci(spec, 0.05, 0.95)</div><div><br></div><div>res@xyLineColors = (/"foreground","green","blue",<wbr>"red"/)</div><div>plot = gsn_csm_xy(wks,f,splt,res) ; create plot</div><div>end</div></div><div><br></div><div>I'll appreciate any help.</div><div><br></div><div>Many thanks,</div><div><br></div><div>Lyndz</div><div><br></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>