[ncl-talk] stat_despersion

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Tue Jun 29 10:01:13 MDT 2021


Ali, you do not need to make new code to find the 10th and 90th percentile
values.  Just use stat_dispersion directly, and take only the output values
that you need.  The function is designed to be used in this way.  There is
no significant performance impact from ignoring all the other result values.

You can easily make a spatial map of 10th or 90th percentile values.  Just
call stat_dispersion inside a double loop over X and Y dimensions.


On Tue, Jun 29, 2021 at 9:23 AM Buzan, Jonathan via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Hello,
>
> I’ve used that function a bunch. If you only want 10th and 90th
> percentile, you’ll want to use:
>
> qsort
> Which will sort your data within a single grid cell from lowest to highest.
>
> And then grab the specific lines of code for 10th and 90th percentiles
> from the stat_dispersion function in:
> $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl
>
> If you look at the function, you’ll see that it uses qsort, then goes step
> by step through calculating all the different applications.
>
> Cheers,
> -Jonathan
>
> On Jun 29, 2021, at 5:14 PM, ali mughal via ncl-talk <
> ncl-talk at mailman.ucar.edu> wrote:
>
> Dear NCL community
>
> In the following ncl function
>
>
> http://www.ncl.ucar.edu/Document/Functions/Contributed/stat_dispersion.shtml
>
> Is it possible to use 10th and 90th percentile values only ?
>
> Also can these values be used to develop a spatial map?
>
> For example if I want to find the 10th and  90th percentile of air
> temperature within the urban grid cells only.
>
> Can anyone share an example script or point me to any web resource will be
> appreciated.
>
> Thanks in advance
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210629/ecf0a431/attachment.html>


More information about the ncl-talk mailing list