<div dir="ltr">Hi All,<div><br></div><div>I&#39;m trying to perform spectral analysis using the specx_anal function in ncl.</div><div>I&#39;m getting a variance around 1000 near the zero mark.I dont know if I&#39;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 &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;</div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot;</div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl&quot;</div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl&quot;</div><div><br></div><div>begin</div><div>filename = &quot;type1_clim.csv&quot;</div><div>lines    = asciiread(filename,-1,&quot;string&quot;)</div><div>data     = lines(1:)</div><div>rain    = tofloat(str_get_field(data,10,&quot;,&quot;))</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(&quot;png&quot;,&quot;test_fldmean&quot;)             ; Opens a ps file</div><div>res = True                                     </div><div>res@tiMainString = &quot;Type1_Spectrum&quot;                     ; title</div><div>f = spec@frq</div><div>res@tiXAxisString = &quot;Frequency (cycles/day)&quot;  ; xaxis</div><div>res@tiYAxisString = &quot;Variance&quot;                       ; yaxis</div><div><br></div><div>splt = specx_ci(spec, 0.05, 0.95)</div><div><br></div><div>res@xyLineColors        = (/&quot;foreground&quot;,&quot;green&quot;,&quot;blue&quot;,&quot;red&quot;/)</div><div>plot = gsn_csm_xy(wks,f,splt,res)     ; create plot</div><div>end</div></div><div><br></div><div>I&#39;ll appreciate any help.</div><div><br></div><div>Many thanks,</div><div><br></div><div>Lyndz</div><div><br></div></div>