<div dir="ltr"><div><div><div><div>An alternative (not tested)<br><a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/generate_sample_indices.shtml" target="_blank">http://www.ncl.ucar.edu/<wbr>Document/Functions/<wbr>Contributed/generate_sample_<wbr>indices.shtml</a><br><a href="http://www.ncl.ucar.edu/Applications/bootstrap.shtml" target="_blank">http://www.ncl.ucar.edu/<wbr>Applications/bootstrap.shtml</a><br><br>=====<br>Let q(ntim,nlat,mlon);<br> <br></div><div> nDimTime = 0<br></div> dimq = dimsizes(q)<br></div> NTIM = dimq(nDimTime) ; all times<br></div> nlat = dimq(1)<br></div> mlon = dimq(2)<br><div><div><div><div><pre> nBoot = 5000 ; user set<br> method = 1 ; sample with replacement<br><br></pre><pre> nSubTime = 7 ; subset nSubTime < NTIM<br></pre><pre> do nb=0,nBoot-1<br> IW = <a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/generate_sample_indices.shtml" target="_blank"><b>generate_sample_indices</b></a>(NTIM,<wbr>method))<br> trendBoot(nb) = <b>dtrend_n</b>(q(IW,:,:),False,<wbr>nDimTime) ; total length<br>or<br> iw = IW(0:nSubTime-1) ; ntim random subsamples<br> trendBoot(nb) = <b>dtrend_n</b>(q(iw,:,:),False,<wbr>nDimTime) <br> end do<br><br> ii = dim_pqsort_n(trendBOOT, 2, nDimTime) ; bootstrap trends in ascending order <br></pre><pre> ; at every grid point<br></pre><pre> qBootLow = trendBoot(round(0.025*(nBoot-1),3),:,:) ; index for sorted array ; 2.5% lower confidence bound
qBootMed = trendBoot(round(0.500*(nBoot-1),3),:,:) ; 50.0% median of bootstrapped estimates
qBootHi = trendBoot(round(0.975*(nBoot-1),3),:,:) ; 97.5% upper confidence bound
</pre>
                                        
                                        <p> </p></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 20, 2016 at 11:09 AM, 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"><div><div>As noted in the documentation: "The series must be at least 10 values." <br><br></div>I think that 5 < n < 10 necessitates a table-lookup which is currently not available from within NCL.<br><br></div>Sorry<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Dec 20, 2016 at 9:55 AM, Aaron Spring <span dir="ltr"><<a href="mailto:aaron.spring@mpimet.mpg.de" target="_blank">aaron.spring@mpimet.mpg.de</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 bgcolor="#FFFFFF" text="#000000">
<p>I try to detect 5- to 10-year trends. I would like to use the
Mann-Kendall test. This is included in NCL6.3.0. <br>
</p>
<p>Unfortunately, I always get probability = 0 and trend = 0 if I
use less than 10 data points for the test. Is there maybe a
cut-off in the implementation?<br>
</p>
<p>The description of the trend_manken links to <a class="m_4431328896390422879m_8372278309271302247moz-txt-link-freetext" href="http://vsp.pnnl.gov/help/Vsample/Design_Trend_Mann_Kendall.htm" target="_blank"></a><a class="m_4431328896390422879m_8372278309271302247moz-txt-link-freetext" href="http://vsp.pnnl.gov/help/Vsample/Design_Trend_Mann_Kendall.htm" target="_blank">http://vsp.pnnl.gov/help/Vsamp<wbr>le/Design_Trend_Mann_Kendall.<wbr>htm</a>.
There it links to Gilberts 1987 book. <a class="m_4431328896390422879m_8372278309271302247moz-txt-link-freetext" href="http://www.osti.gov/scitech/servlets/purl/7037501/" target="_blank"></a><a class="m_4431328896390422879m_8372278309271302247moz-txt-link-freetext" href="http://www.osti.gov/scitech/servlets/purl/7037501/" target="_blank">http://www.osti.gov/scitech/se<wbr>rvlets/purl/7037501/</a>
p. 272 Table A18 shows probability tables for 5<n<10.</p>
<p>Has anyone faced the same problem or maybe already implemented
that?</p>
<p>Unfortunately, at my work station I cannot have a look into the
source code as I only see .a files.</p><span class="m_4431328896390422879HOEnZb"><font color="#888888">
<br>
<pre class="m_4431328896390422879m_8372278309271302247moz-signature" cols="72">--
Aaron Spring
Room 229
Max Planck Institute for Meteorology
Bundesstr. 53, 20146 Hamburg, Germany
<a class="m_4431328896390422879m_8372278309271302247moz-txt-link-freetext" href="mailto:aaron.spring@mpimet.mpg.de" target="_blank">mailto:aaron.spring@mpimet.mpg<wbr>.de</a></pre>
</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></div>