<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hello NCL-Talk,
<div class=""><br class="">
</div>
<div class="">I am running into an error that I am trying to tease apart.</div>
<div class=""><br class="">
</div>
<div class="">I made my own stat_dispersion script to analyze a climatology in 1% increments.</div>
<div class="">Ex.</div>
<div class="">mastervar(95,j,k) = work( min((/nwork-1, nwork*95/100-1 /)) ) ; 95%</div>
<div class="">mastervar(96,j,k) = work( min((/nwork-1, nwork*96/100-1 /)) ) ; 96%</div>
<div class=""><br class="">
</div>
<div class="">Which is based upon stat_dispersion from contributed.ncl:</div>
<div class="">
<div class=""> statx(25) = work( min((/nwork-1, (nwork*19)/20-1 /)) ) ; upper 95%</div>
<div class=""> statx(26) = work( min((/nwork-1, (nwork*99)/100-1 /)) ) ; upper 99.%</div>
</div>
<div class=""><br class="">
</div>
<div class="">And when I run the script, I end up with something expected, a smooth function from lowest to highest (the last 4 points are results from dim_stat4). </div>
<div class=""><br class="">
</div>
<div class=""><img apple-inline="yes" id="AF5D90C9-4509-47F2-B199-B748B4B96D42" width="646" height="263" src="cid:B849549E-3AA0-4633-B0F3-6544A86B6EDF@unibe.ch" class=""></div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">My dataset is 20 years at 4x daily, so 29200 time steps, and a 1% swath should = 292 values.</div>
<div class=""><br class="">
</div>
<div class="">However, my error comes in when I am trying to take a 1% swath of data from a time series:</div>
<div class="">one_percent = where(Variable.ge.ninetyfifth.and.Variable.lt.ninetysixth, Variable, value)</div>
<div class=""><br class="">
</div>
<div class="">When I check different grid cells, I have different numbers of values: 672, 584, 294, etc.</div>
<div class="">I am not sure what I am doing wrong, perhaps someone might have an insight?</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>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
</body>
</html>