# [ncl-talk] Spatial plot of Mann-Kendall Trend test

Adam Phillips asphilli at ucar.edu
Mon Apr 15 09:54:28 MDT 2019

```Hi Brandon,
Your attachment did not come through, but based on your description it
sounds like you will need to create a 3rd array that you design using the
input from your first two arrays (where X = 0 and X = 1.) For example, the
following will create an array that contains values ranging from -3 to 3
corresponding to positive/negative trends and their significance. This
hopefully provides you with a starting point:
arr3 = arr(1,:,:)   ; create new array  using metadata from arr
arr3 = 0.
arr3 = where(arr(1,:,:).ge.0.and.arr(0,:,:).ge..90,1,arr3)
arr3 = where(arr(1,:,:).ge.0.and.arr(0,:,:).ge..95,2,arr3)
arr3 = where(arr(1,:,:).ge.0.and.arr(0,:,:).ge..99,3,arr3)
arr3 = where(arr(1,:,:).lt.0.and.arr(0,:,:).ge..90,-1,arr3)
arr3 = where(arr(1,:,:).lt.0.and.arr(0,:,:).ge..95,-2,arr3)
arr3 = where(arr(1,:,:).lt.0.and.arr(0,:,:).ge..99,-3,arr3)
Then you can go on to plot the arr3 array.
If you have further questions let ncl-talk know.
Adam

On Thu, Apr 11, 2019 at 3:16 PM Brandon Fisel <bjfisel at gmail.com> wrote:

> Hello,
>
> Looking through NCL contour examples, I have not come across an example of
> how I would like the results from trend_manken plotted.
>
> The data returned from trend_manken has dimensions [X], [I], [J], for X
> size = 2 (0 = probability, and 1 = trend), and I and J equal to the lat or
> long respectively. I would like to plot for X = 0 as a function of the sign
> at X = 1. Below is an example of the plot I would like to create.
>
> I would like to have a contour plot of the probabilities (>90%, >95%, and
> >99%) as a function of the sign of the trend. For example, a positive trend
> would have increasingly red contours for the 3 probability levels listed
> above; and, a negative trend would having increasingly red-to-white
> contours for the 3 probability levels.
>
> -------------------------------------------------------------
> Brandon
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

--
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190415/d2a12290/attachment.html>
```

More information about the ncl-talk mailing list