<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Thanks Sir Dennis for the suggestions given. It really has helped.<br><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Kwesi<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 17, 2017 at 7:30 PM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</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">The 'specx_anal' documentation clearly states that "Missing values are not
allowed. "<br>=================<br><h2><span style="font-weight:normal">Prototype</span></h2>
<pre>        function specx_anal (
                x [*] : numeric,
                iopt [1] : integer,
                jave [1] : integer,
                pct [1] : numeric
        )
        <a href="http://www.ncl.ucar.edu/Document/Functions/return_val.shtml" target="_blank">return_val</a> [1] : float or double
</pre>
<a name="m_792894312638667294_Arguments"></a>
<h2><span style="font-weight:normal">Arguments</span></h2>
<em>x</em>
<p class="m_792894312638667294gmail-indent">A one-dimensional array containing the data. Missing values are not
allowed. <br></p><p class="m_792894312638667294gmail-indent">==================</p><p class="m_792894312638667294gmail-indent">You could do</p><p class="m_792894312638667294gmail-indent"> aao@_FillValue = 0.0 ; change: _FillValue = 3.000000060858434e+33</p><p class="m_792894312638667294gmail-indent"> delete(aao@_FillValue) ; delete recognition of _FillValue <br></p><p class="m_792894312638667294gmail-indent">There will be no error messages returned bu specx_anal and you will get 'numbers'<br></p><p class="m_792894312638667294gmail-indent">***BUT***</p><p class="m_792894312638667294gmail-indent">they are *not* the correct numbers. These 0-values will affect the calculated spectrum.</p><p class="m_792894312638667294gmail-indent"><br></p><p class="m_792894312638667294gmail-indent">=================</p><p class="m_792894312638667294gmail-indent">You must ****intelligently**** fill the _FillValue locations. Any old numbers (eg: 0) will not accomplist this taks.</p><p class="m_792894312638667294gmail-indent"><br></p><p class="m_792894312638667294gmail-indent">++++++++++++++++++++++++++++++<wbr>++++++++++++++++++</p><p class="m_792894312638667294gmail-indent">Please become familiar with: <a href="https://climatedataguide.ucar.edu/" target="_blank">https://climatedataguide.ucar.<wbr>edu/</a></p><p class="m_792894312638667294gmail-indent">Search fo AAO (or, equivalently, SAM)</p><p class="m_792894312638667294gmail-indent"><a href="https://climatedataguide.ucar.edu/climate-data/overview-climate-indices" target="_blank">https://climatedataguide.ucar.<wbr>edu/climate-data/overview-<wbr>climate-indices</a><br></p><p class="m_792894312638667294gmail-indent"><a href="https://climatedataguide.ucar.edu/climate-data/marshall-southern-annular-mode-sam-index-station-based" target="_blank">https://climatedataguide.ucar.<wbr>edu/climate-data/marshall-<wbr>southern-annular-mode-sam-<wbr>index-station-based</a></p><p class="m_792894312638667294gmail-indent">The latter has "Get Data (External)" .... Click and get the data you want.</p><p class="m_792894312638667294gmail-indent"><br></p><p class="m_792894312638667294gmail-indent"><br></p><p class="m_792894312638667294gmail-indent"><br></p><p class="m_792894312638667294gmail-indent"><br></p><p class="m_792894312638667294gmail-indent"> <br></p><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Jan 17, 2017 at 3:52 AM, Kwesi Quagraine <span dir="ltr"><<a href="mailto:starskykwesi@gmail.com" target="_blank">starskykwesi@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Hello NCLers, I am currently trying to make a spectral analysis plot from a AAO indices (timeseries 1980-2016) netcdf file using the script (following spec_1 from ncl website) below and I get this error "fatal:specx_anal: 'x' cannot contain any missing values".<br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br>[1] I have tried setting aao@_FillValue = 0 but to no avail<br><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Any help will be much appreciated.<br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br><br>load "$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/gsn_code.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/gsn_csm.ncl" <br><br>diri = "/home/kwesi/Documents/Indices<wbr>/" <br><br>begin<br> <br> in =addfile(diri + "<a href="http://aao_anom.nc" target="_blank">aao_anom.nc</a>","r") <wbr> ; open netcdf file<br> aao = in->AAO <br> <br> printVarSummary(aao)<br><br> d = 1<br> sm = 7<br> pct = 0.10<br><br> spec = specx_anal(aao,d,sm,pct)<br><br> wks = gsn_open_wks("ps","spec") <wbr> ; Opens a ps file <br><br> res = True ; no plot mods desired<br> res@tiMainString = "AAO" ; title<br> res@tiXAxisString = "Frequency (cycles/month)" ; xaxis<br> res@tiYAxisString = "Variance" ; yaxis<br><br> plot=gsn_csm_xy(wks,spec@frq,s<wbr>pec@spcx,res) ; create plot <br>end<br><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">printVarSummary(aao) gives;<br clear="all"></div><div style="font-family:verdana,sans-serif;font-size:small" class="gmail_default">Variable: aao<br>Type: double<br>Total Size: 3552 bytes<br> 444 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [time | 444]<br>Coordinates: <br> time: [ 0.. 443]<br>Number Of Attributes: 4<br> long_name : Antarctic Oscillation Index<br> units : 1<br> _FillValue : 3.000000060858434e+33<br> missing_value : 3.000000060858434e+33<br></div><span class="m_792894312638667294HOEnZb"><font color="#888888"><br>-- <br><div class="m_792894312638667294m_-7291441856003378282gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><div><font color="#0000ff" face="trebuchet ms, sans-serif">Try not to become a man of success but rather a man of value-Albert Einstein</font></div><div><font color="#0000ff" face="trebuchet ms, sans-serif"><br></font></div><div><font color="#0000ff"><font face="trebuchet ms, sans-serif">University of Cape Coast|</font><span style="font-family:"trebuchet ms",sans-serif;font-size:12.8px">College of Agriculture and Natural Sciences|</span><span style="font-family:"trebuchet ms",sans-serif;font-size:12.8px">Department of Physics|</span></font></div><div><font color="#0000ff" face="trebuchet ms, sans-serif">Team Leader|Recycle Up! Ghana|Technology Without Borders|</font></div><div><font color="#0000ff"><font face="trebuchet ms, sans-serif">Other emails: </font><span style="font-family:"trebuchet ms",sans-serif;font-size:12.8px"><a href="mailto:kwesi.quagraine@ucc.edu.gh" target="_blank">kwesi.quagraine@ucc.ed<wbr>u.gh</a>|</span><span style="font-family:"trebuchet ms",sans-serif;font-size:12.8px"><a href="mailto:kwesi.quagraine@teog.de" target="_blank">kwesi.quagraine@teog.de</a>|</span></font></div><div><span style="font-family:"trebuchet ms",sans-serif;font-size:12.8px"><font color="#0000ff">Mobile: <a href="tel:+233%2026%20617%203582" value="+233266173582" target="_blank">+233266173582</a></font></span></div></div><div><font color="#0000ff" face="trebuchet ms, sans-serif">Skype: quagraine_cwasi</font></div><div><font color="#0000ff" face="trebuchet ms, sans-serif">Twitter: @Pkdilly</font></div><div><br></div></div></div></div></div></div></div></div>
</font></span></div>
<br></div></div>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">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/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><div><font face="trebuchet ms, sans-serif" color="#0000ff">Try not to become a man of success but rather a man of value-Albert Einstein</font></div><div><font face="trebuchet ms, sans-serif" color="#0000ff"><br></font></div><div><font color="#0000ff"><font face="trebuchet ms, sans-serif">University of Cape Coast|</font><span style="font-family:'trebuchet ms',sans-serif;font-size:12.8000001907349px">College of Agriculture and Natural Sciences|</span><span style="font-family:'trebuchet ms',sans-serif;font-size:12.8000001907349px">Department of Physics|</span></font></div><div><font face="trebuchet ms, sans-serif" color="#0000ff">Team Leader|Recycle Up! Ghana|Technology Without Borders|</font></div><div><font color="#0000ff"><font face="trebuchet ms, sans-serif">Other emails: </font><span style="font-family:'trebuchet ms',sans-serif;font-size:12.8px"><a href="mailto:kwesi.quagraine@ucc.edu.gh" target="_blank">kwesi.quagraine@ucc.edu.gh</a>|</span><span style="font-family:'trebuchet ms',sans-serif;font-size:12.8px"><a href="mailto:kwesi.quagraine@teog.de" target="_blank">kwesi.quagraine@teog.de</a>|</span></font></div><div><span style="font-family:'trebuchet ms',sans-serif;font-size:12.8px"><font color="#0000ff">Mobile: +233266173582</font></span></div></div><div><font face="trebuchet ms, sans-serif" color="#0000ff">Skype: quagraine_cwasi</font></div><div><font face="trebuchet ms, sans-serif" color="#0000ff">Twitter: @Pkdilly</font></div><div><br></div></div></div></div></div></div></div></div>
</div>