[ncl-talk] sub: significant test
dale zuri
dalezuri at gmail.com
Sat Mar 7 10:40:41 MST 2020
Hi,
Thanks for the clarification. The regions of 95% significant must be
stippled. I am not sure below steps are doing what I wanted do.
printVarSummary(x4d)
x4d = where(x4d.lt.siglvl, 1, x4d)
printMinMax(x4d,0)
;overlay plot::::::
opt = True ; set up parameters for
pattern fill
opt at gsnShadeFillType = "pattern" ; specify pattern fill
opt at gsnShadeLow = 17 ; stipple pattern
; opt at gsnShadeDotSizeF = 3 ; make dots larger
plot2 = gsn_csm_contour(wks,x4d,res2)
plot2 = gsn_contour_shade(plot2,0.05,30, opt) ; stipple all
areas >= 99% contour
Thanks
On Sat, Mar 7, 2020 at 6:11 AM Dennis Shea <shea at ucar.edu> wrote:
> According to the documentation?
> ===
> *r* : *Scalar or array of any dimensionality* containing the linear
> correlation coefficients (-1 <= *r* <= +1)
>
> *Nr :* *Array of the same dimensionality as r or else a scalar*. Contains
> the number of observations used to determine the coefficients. If *Nr* is
> a scalar and *r* is an array of any dimension, then the scalar *Nr* value
> will be used for all tests. *Nr* must be at least three but should be at
> least eight.
> *============*
> You can enter the following interactively:
>
> nlat = 5
> mlon = 7
> r = random_uniform(-1,1,(/nlat,mlon/))
> printMinMax(r,0)
> n = 20
> pr = rtest(r, n 0)
> print(pr)
> ;----------------------
> N = round( random_uniform(10,30,(/nlat,mlon/)), 3)
> PR = rtest(r, N, 0)
> print(PR)
>
> On Fri, Mar 6, 2020 at 5:19 PM dale zuri <dalezuri at gmail.com> wrote:
>
>> Hi,
>> Yes. It contains a two-dimensional array (26 x 76) correlation
>> coefficients.
>>
>> Thanks for your response.
>>
>> On Fri, Mar 6, 2020 at 2:58 PM Dennis Shea <shea at ucar.edu> wrote:
>>
>>> I am not sure what you are doing.
>>> You should provide more information.
>>>
>>> Does 'dfcor' contain a correlation?
>>> printVarSummary(dfcor)
>>> printMinMax(dfcor,0)
>>>
>>> Why did you make it a one-dimensional array?
>>>
>>>
>>>
>>>
>>> On Fri, Mar 6, 2020 at 2:51 PM dale zuri via ncl-talk <ncl-talk at ucar.edu>
>>> wrote:
>>>
>>>> Hi Ncl user,
>>>> I have been trying to test the significance of an array using the
>>>> following steps. I don't see any stripes on the figure. I am not sure where
>>>> I'm going wrong. I don't get any warning message. I would appreciate any
>>>> comments.
>>>>
>>>> Thanks
>>>>
>>>> ;TTest:;;;;;
>>>>
>>>> x1d=ndtooned(dfcor)
>>>>
>>>> n = dimsizes(x1d) ; n=11
>>>>
>>>> df = n-2
>>>>
>>>> siglvl=0.05
>>>>
>>>> ppr = rtest(x1d, n, 0)
>>>>
>>>> printVarSummary(ppr)
>>>>
>>>> x4d = onedtond(ppr,(/26,76/))
>>>>
>>>> printVarSummary(x4d)
>>>>
>>>> x4d = where(x4d.lt.siglvl, 1, x4d)
>>>>
>>>> printMinMax(x4d,0)
>>>>
>>>> ;overlay plot::::::
>>>>
>>>> opt = True ; set up parameters
>>>> for pattern fill
>>>>
>>>> opt at gsnShadeFillType = "pattern" ; specify pattern
>>>> fill
>>>>
>>>> opt at gsnShadeLow = 17 ; stipple pattern
>>>>
>>>> ; opt at gsnShadeDotSizeF = 3 ; make dots
>>>> larger
>>>>
>>>> plot2 = gsn_csm_contour(wks,x4d,res2)
>>>>
>>>>
>>>> plot2 = gsn_contour_shade(plot2,0.05,30, opt) ; stipple all
>>>> areas >= 99% contour
>>>>
>>>>
>>>> overlay (plot, plot2)
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> ncl-talk at ucar.edu
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200307/bbf7db89/attachment.html>
More information about the ncl-talk
mailing list