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