<div dir="ltr"><div><div><div>====<br>6.3.0<br><br><a href="http://www.ncl.ucar.edu/current_release.shtml">http://www.ncl.ucar.edu/current_release.shtml</a><br></div>Under 'Bugs Fixed'<br><br><p>
</p><a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/stat_dispersion.shtml"><strong>stat_dispersion</strong></a> - The
second returned element returned was the sample variance and not the
sample standard deviation as is documented. In 6.3.0, the sample
standard deviation will be returned.
<br><br>=====<br><br></div>%> ncl -V<br>6.3.0<br><br> a = (/-20.46505, -4.795454, -1.454606,-2.677286, -1.868608, -0.4972475, 1.18715, -1.657706, -3.428875, -2.766053, -1.689298, -0.3371645, -0.640966, -0.7326741/)<br><br> opt = True<br> opt@PrintStat = True<br> stata = stat_dispersion(a, opt )<br><br><br>Copyright (C) 1995-2015 - All Rights Reserved<br> University Corporation for Atmospheric Research<br> NCAR Command Language Version 6.3.0 <====================<br> The use of this software is governed by a License Agreement.<br> See <a href="http://www.ncl.ucar.edu/">http://www.ncl.ucar.edu/</a> for more details.<br>(0) <br>(0) ===> Robust Dispersion Statistics <===<br>(0) [0] Mean=-2.98742<br>(0) [1] StdDev=5.24311 <=====<br>(0) [2] Min=-20.465<br>(0) [3] LowDec=-20.465<br></div>[SNIP]<br><br><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 24, 2015 at 2:25 PM, jbuzan <span dir="ltr"><<a href="mailto:jbuzan@purdue.edu" target="_blank">jbuzan@purdue.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">I don’t know if this has been fixed in 6.3.0, but there was a change in stat_dispersion and the standard deviation is no longer calculated. it is the variance.<div><br></div><div>you can change:</div><div>$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl</div><div>(I renamed the file)</div><div><br></div><div>and commented out:</div><div> ; statx(1) = moment(1) ; std. deviation<br><br></div><div>and replaced with:</div><div> statx(1) = stddev(x) ; std. deviation<br><br></div><div><br></div><div>-Jonathan</div><div><br></div><div><br></div><div><br><div><blockquote type="cite"><div><div class="h5"><div>On Apr 24, 2015, at 4:20 PM, Rainer Luptowitz <<a href="mailto:rlupt001@ucr.edu" target="_blank">rlupt001@ucr.edu</a>> wrote:</div><br></div></div><div><div><div class="h5"><div dir="ltr">Hi ncl-talk,<div><br></div><div>Is the standard deviation computed in the "stats_dispersion" function actually a variance?</div><div><br></div><div>I test this and it appears to be variance instead of stats_dispersion as seen in with sample "a" below.</div><div><br></div><div><br></div><div><div>Variable: a </div><div>Type: float</div><div>Total Size: 56 bytes</div><div> 14 values</div><div>Number of Dimensions: 1</div><div>Dimensions and sizes:<span style="white-space:pre-wrap">        </span>[ncl_join | 14] ; I had joined 8 files trends with "addfiles" function</div><div>Coordinates:</div><div>Number Of Attributes: 0</div></div><div><div>(0)<span style="white-space:pre-wrap">        </span>-20.46505</div><div>(1)<span style="white-space:pre-wrap">        </span>-4.795454</div><div>(2)<span style="white-space:pre-wrap">        </span>-1.454606</div><div>(3)<span style="white-space:pre-wrap">        </span>-2.677286</div><div>(4)<span style="white-space:pre-wrap">        </span>-1.868608</div><div>(5)<span style="white-space:pre-wrap">        </span>-0.4972475</div><div>(6)<span style="white-space:pre-wrap">        </span>1.18715</div><div>(7)<span style="white-space:pre-wrap">        </span>-1.657706</div><div>(8)<span style="white-space:pre-wrap">        </span>-3.428875</div><div>(9)<span style="white-space:pre-wrap">        </span>-2.766053</div><div>(10)<span style="white-space:pre-wrap">        </span>-1.689298</div><div>(11)<span style="white-space:pre-wrap">        </span>-0.3371645</div><div>(12)<span style="white-space:pre-wrap">        </span>-0.640966</div><div>(13)<span style="white-space:pre-wrap">        </span>-0.7326741</div><div><br></div><div>; ncl code compare variance to standard deviation</div><div><br></div><div>; the above data was placed into an array named "a"</div><div><div>a = (/-20.46505, -4.795454, -1.454606,-2.677286, -1.868608, -0.4972475, 1.18715, -1.657706, -3.428875, -2.766053, -1.689298, -0.3371645, -0.640966, -0.7326741/)</div><div><br></div><div><br></div><div>; Input</div><div>Var_a = variance(a) ; calc variance</div><div>print(Var_a)</div><div>StdDev_a = stddev(a) ; calc standard deviation</div><div>print(StdDev_a)</div></div><div><div>opt = True</div><div>opt@PrintStat = True</div><div>Stats_a = stat_dispersion(a,opt)</div></div><div><br></div><div><br></div><div>; Output</div><div>; from individually calculating Variance<br></div><div><div>Variable: Var_a</div><div>Type: float</div><div>Total Size: 4 bytes</div><div> 1 values</div><div>Number of Dimensions: 1</div><div>Dimensions and sizes:<span style="white-space:pre-wrap">        </span>[1]</div><div>Coordinates:</div><div>(0)<span style="white-space:pre-wrap">        </span>27.49021</div><div><br></div><div>; from individually calculating Standard Deviation</div><div>Variable: StdDev_a</div><div>Type: float</div><div>Total Size: 4 bytes</div><div> 1 values</div><div>Number of Dimensions: 1</div><div>Dimensions and sizes:<span style="white-space:pre-wrap">        </span>[1]</div><div>Coordinates:</div><div>(0)<span style="white-space:pre-wrap">        </span>5.243111</div></div><div><br></div><div>; from Stats_Dispersion function.</div><div>(0)</div><div>(0)<span style="white-space:pre-wrap">        </span> ===> Robust Dispersion Statistics <===</div><div>(0)<span style="white-space:pre-wrap">        </span> [0] Mean=-2.98742</div><div>(0)<span style="white-space:pre-wrap">        </span> [1] StdDev=27.4902 ; this appears to be variance since</div><div>(0)<span style="white-space:pre-wrap">        </span> [2] Min=-20.4651</div><div>(0)<span style="white-space:pre-wrap">        </span> [3] LowDec=-20.4651</div><div>(0)<span style="white-space:pre-wrap">        </span> [4] LowOct=-20.4651</div><div>(0)<span style="white-space:pre-wrap">        </span> [5] LowSex=-4.79545</div><div>(0)<span style="white-space:pre-wrap">        </span> [6] LowQuartile=-3.42888</div><div>(0)<span style="white-space:pre-wrap">        </span> [7] LowTri=-2.76605</div><div>(0)<span style="white-space:pre-wrap">        </span> [8] Median=-1.6735</div><div>(0)<span style="white-space:pre-wrap">        </span> [9] HighTri=-1.45461</div><div>(0)<span style="white-space:pre-wrap">        </span> [10] HighQuartile=-0.732674</div><div>(0)<span style="white-space:pre-wrap">        </span> [11] HighSex=-0.640966</div><div>(0)<span style="white-space:pre-wrap">        </span> [12] HighOct=-0.497248</div><div>(0)<span style="white-space:pre-wrap">        </span> [13] HighDec=-0.497248</div><div>(0)<span style="white-space:pre-wrap">        </span> [14] Max=1.18715</div><div>(0)<span style="white-space:pre-wrap">        </span> [15] Range=21.6522</div><div>(0)<span style="white-space:pre-wrap">        </span> [16] Dispersion=0.787633</div><div>(0)<span style="white-space:pre-wrap">        </span> [17] RMS Anomaly=5.05239</div><div>(0)<span style="white-space:pre-wrap">        </span> [18] # Total=14</div><div>(0)<span style="white-space:pre-wrap">        </span> [19] # Used=14</div><div>(0)<span style="white-space:pre-wrap">        </span> [20] # Missing=0</div><div>(0)<span style="white-space:pre-wrap">        </span> [21] % Missing=0</div><div>(0)<span style="white-space:pre-wrap">        </span> [22] Lower 0.1%=9.96921e+36</div><div>(0)<span style="white-space:pre-wrap">        </span> [23] Lower 1.0%=9.96921e+36</div><div>(0)<span style="white-space:pre-wrap">        </span> [24] Lower 5.0%=9.96921e+36</div><div>(0)<span style="white-space:pre-wrap">        </span> [25] Upper 5.0%=9.96921e+36</div><div>(0)<span style="white-space:pre-wrap">        </span> [26] Upper 1.0%=9.96921e+36</div><div>(0)<span style="white-space:pre-wrap">        </span> [27] Upper 0.1%=9.96921e+36</div><div>(0)<span style="white-space:pre-wrap">        </span> [28] Skewness=-2.57898</div><div>(0)<span style="white-space:pre-wrap">        </span> [29] Kurtosis=5.86411</div></div><div><br></div><div><br></div><div>What do you think?</div><div><br></div><div>Thank you for time and assistance,<br></div><div><br></div><div><div><div><div><div dir="ltr"><div><div dir="ltr"><font color="#0000ff"><i>Rainer Luptowitz</i></font><div><font color="#0000ff"><i>Grad Student </i></font><div><font color="#0000ff"><i>Dept Earth Sciences</i></font></div><div><font color="#0000ff"><i>UC Riverside</i></font></div><div><a href="mailto:rlupt001@ucr.edu" target="_blank"><font color="#0000ff"><i>rlupt001@ucr.edu</i></font></a></div><div><br></div></div></div></div></div></div></div>
</div></div></div></div></div>
_______________________________________________<br>ncl-talk mailing list<br>List instructions, subscriber options, unsubscribe:<br><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br></div></blockquote></div><br></div></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>