[ncl-talk] Technical question

Buzan, Jonathan jbuzan at purdue.edu
Thu Feb 21 10:47:21 MST 2019


Hello NCL-Talk,

I am running into an error that I am trying to tease apart.

I made my own stat_dispersion script to analyze a climatology in 1% increments.
Ex.
mastervar(95,j,k) = work(  min((/nwork-1, nwork*95/100-1   /)) ) ; 95%
mastervar(96,j,k) = work(  min((/nwork-1, nwork*96/100-1   /)) ) ; 96%

Which is based upon stat_dispersion from contributed.ncl:
       statx(25) = work( min((/nwork-1, (nwork*19)/20-1    /)) ) ; upper 95%
       statx(26) = work( min((/nwork-1, (nwork*99)/100-1   /)) ) ; upper 99.%

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).

[cid:B849549E-3AA0-4633-B0F3-6544A86B6EDF at unibe.ch]


My dataset is 20 years at 4x daily, so 29200 time steps, and a 1% swath should = 292 values.

However, my error comes in when I am trying to take a 1% swath of data from a time series:
one_percent = where(Variable.ge.ninetyfifth.and.Variable.lt.ninetysixth, Variable, value)

When I check different grid cells, I have different numbers of values: 672, 584, 294, etc.
I am not sure what I am doing wrong, perhaps someone might have an insight?

-Jonathan







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190221/617c5c13/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2019-02-21 at 6.37.57 PM.png
Type: image/png
Size: 39985 bytes
Desc: Screen Shot 2019-02-21 at 6.37.57 PM.png
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190221/617c5c13/attachment-0001.png>


More information about the ncl-talk mailing list