[ncl-talk] sub: Significant test & stipple

dale zuri dalezuri at gmail.com
Tue Oct 1 16:15:47 MDT 2019


Dear NCL user,

I don't see any error messages, but there are no stipples on the map. Could
someone help correct the logic?

 *plot2   = gsn_contour_shade(plot2,0.05,30, opt) *

I would appreciate any help and suggestion. Printed below the part of the
ncl code. 

Thank you
Dale


*NCL program: *
;;;;corr;;;
dfcor=escorc_n(zAvg,zAvgTime1,(/0/),(/0/))
printVarSummary(dfcor)
printMinMax(dfcor,0)
dfcor!0 = "lat_0"
dfcor!1 = "lon_0"
dfcor&lat_0= zAvg&lat_0
dfcor&lon_0= zAvg&lon_0
x1d=ndtooned(diffAvg)
;x1d=ndtooned(dfcor)
n    = dimsizes(x1d)                ; n=11
df   = n-2
siglvl=0.05
 pr     = rtest(x1d, n, 0)
printVarSummary(pr)
 x4d     = onedtond(pr,(/26,76/))
printVarSummary(x4d)
;x4d = where(x4d.lt.siglvl, 1, x4d)
;printMinMax(x4d,0)
;print(x4d)
; if (pr.lt.siglvl) then
;      print("significant at the "+siglvl+" significance level")
; else
;      print("NOT significant at the "+siglvl+" significance level")
; end if
;dfcorr!0 = "lat_0"
;dfcorr!1 = "lon_0"
;dfcorr&lat_0= g&lat_0
;dfcorr&lon_0= g&lon_0
x4d!0 = "lat_0"
x4d!1 = "lon_0"
x4d&lat_0= zAvg&lat_0
x4d&lon_0= zAvg&lon_0
;printVarSummary(x4d)
;printVarSummary(dfcorr)


;=====================================================================
;Second plot resources and overlay onto first
;=====================================================================
  res2 = True                            ; res2 probability plots
  res2 at gsnDraw             = False       ; Do not draw plot
  res2 at gsnFrame            = False       ; Do not advance frome

;  res2 at cnLevelSelectionMode = "ExplicitLevels"       ; set explicit cnlev
;  res2 at cnLevels   = (/99./)              ; only have 1 contour level
  res2 at cnInfoLabelOn       = False
  res2 at cnLinesOn           = False       ; do not draw contour lines
  res2 at cnLineLabelsOn      = False       ; do not draw contour labels
  res2 at cnConstFEnableFill =True
res2 at cnConstFLabelOn  = False
  res2 at cnFillScaleF        = 0.6         ; add extra density

  res2 at gsnRightString      = ""          ; Turn off subtitles
  res2 at gsnLeftString       = ""

;========================================================================
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 >= 95%  contour

  overlay (plot, plot2)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191001/5558cca2/attachment.html>


More information about the ncl-talk mailing list