[ncl-talk] 95% confidence interval
Kunal Bali
kunal.bali9 at gmail.com
Sat Feb 2 10:13:52 MST 2019
Dear NCL users,
for computing 95% CI, I used the following code.
In that, I am trying to first calculate the 95% CI and then overlay (with
pattern/shading fill) with the other plot. But I am not getting the 95%
area over the high correlation area. So, could you please let me know
whether I am using the correct code or not.
The result is also attached herewith.
;**********************************************
;Calculating significance
;**********************************************
prob_Dec=rtest(ccr,24,0)
sig_Dec =100*(1-prob_Dec)
printVarSummary(sig_Dec)
copy_VarAtts(ts2, sig_Dec)
copy_VarCoords_1(ts1,sig_Dec)
sig_Dec = mask(sig_Dec, sig_Dec.ge.100,False)
sig_Dec = mask(sig_Dec, sig_Dec.lt.90,False)
res2=True
res2 at gsnLeftString = ""
res2 at gsnRightString = ""
res2 at gsnDraw = False ; Do not draw plot
res2 at gsnFrame = False ; Do not advance frome
;res2 at cnMonoFillColor = False
res2 at cnLinesOn = False ; turn off contour lines
res2 at lbLabelBarOn = False ; turn off
label bar
res2 at cnFillColor = "black"
res2 at cnLevelSelectionMode = "ManualLevels" ; manually specify contour
levels
res2 at cnMinLevelValF = 90 ; min level
res2 at cnMaxLevelValF = 100 ; max level
res2 at cnLevelSpacingF = 1 ; contour interval
res2 at gsnSpreadColors = False
plotB=gsn_csm_contour(wks,sig_Dec, res2) ; contours are at 90,100
opt = True
opt at gsnShadeFillType = "pattern" ; pattern fill
opt at gsnShadeHigh =16 ; use pattern #2
opt at gsnShadeFillDotSizeF = 2
plotc=gsn_contour_shade(plotB,-999.,90.,opt)
pmres = True
pmres at gsMarkerColor = "white" ;-- marker color
pmres at gsMarkerSizeF = 50 ;-- set size of marker
pmres at gsLineThicknessF = 46. ;-- marker line thickness
pmres at gsMarkerIndex = 1
pmres at gsFillColor = "white"
SUMMARY:
Variable: ts1
Type: float
Total Size: 389486592 bytes
97371648 values
Number of Dimensions: 3
Dimensions and sizes: [lat | 2112] x [lon | 1921] x [time | 24]
Coordinates:
lat: [5.0078125..37.9921875]
lon: [ 68.. 98]
time: [9465090..9465113]
Number Of Attributes: 8
vmin : -1e+15
vmax : 1e+15
fmissing_value : 1e+15
missing_value : 1e+15
_FillValue : 1e+15
units : kg m-3
Variable: ts2
Type: float
Total Size: 389486592 bytes
97371648 values
Number of Dimensions: 3
Dimensions and sizes: [lat | 2112] x [lon | 1921] x [time | 24]
Coordinates:
lat: [5.0078125..37.9921875]
lon: [ 68.. 98]
time: [9466530..9466553]
Number Of Attributes: 8
vmin : -1e+15
vmax : 1e+15
fmissing_value : 1e+15
missing_value : 1e+15
_FillValue : 1e+15
units : m
Variable: ccr
Type: float
Total Size: 16228608 bytes
4057152 values
Number of Dimensions: 2
Dimensions and sizes: [2112] x [1921]
Coordinates:
Number Of Attributes: 1
_FillValue : 1e+15
(0) min=-0.996108 max=0.325499
Variable: sig_Dec
Type: float
Total Size: 16228608 bytes
4057152 values
Number of Dimensions: 2
Dimensions and sizes: [2112] x [1921]
Coordinates:
---
Kunal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190202/3f1ffb8d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plot.png
Type: image/png
Size: 123047 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190202/3f1ffb8d/attachment.png>
More information about the ncl-talk
mailing list