Dear NCL,
I compute correlation coefficient between two variable and I would make a
significant test at 95% using ncl rtest fonction. I have problem to plot
by stipplgn where probt.ge.95. I use the following code and it give bad
result:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
dir="/data/observations/"
filsst_JAS="anom_sst_JAS.nc"
filpre_JAS="indice_pre_JAS.nc"
PLOT = True
pltType = "png"
pltDir = "/home/"
pltName = "correlation_data"
fsst_JAS = addfile(dir+filsst_JAS , "r")
fpre_JAS = addfile(dir+filpre_JAS , "r")
sst_JAS=fsst_JAS->sst(:,:,:)
pre_JAS=doubletofloat(fpre_JAS->pre(:))
rsst_JAS = escorc(pre_JAS,sst_JAS(latitude|:,longitude|:,time|:))
copy_VarCoords(sst_JAS(0,:,:), rsst_JAS)
rsst_JAS@long_name = " JAS Detrended and Filtred "
probt=100.*(1.-rtest(rsst_JAS,10,0))
;plot figures
wks = gsn_open_wks(pltType, pltDir+pltName)
gsn_define_colormap(wks, "ncl_default")
rescn = True
rescn@gsnDraw = False
rescn@gsnFrame = False
rescn@gsnSpreadColors = True
rescn@cnFillOn = True
rescn@cnLinesOn = False
rescn@cnLineLabelsOn = False
rescn@cnLevelSelectionMode = "ManualLevels"
rescn@cnMinLevelValF = -1
rescn@cnMaxLevelValF = 1
rescn@cnLevelSpacingF = 0.1
rescn@lbLabelBarOn = False
rescn@mpCenterLonF = 0.
rescn@mpFillOn = False
; rescn@mpProjection = "Robinson"
rescn@mpPerimOn = False
rescn@mpGridAndLimbOn = True
rescn@mpGridLatSpacingF = 90
rescn@mpGridLonSpacingF = 360.
rescn@mpGridLineColor = "transparent"
rescn@mpGridAndLimbOn = False
plotA=gsn_csm_contour_map(wks,rsst_JFM, rescn)
rescn@cnFillOn = False
plotB=gsn_csm_contour(wks,probt,rescn)
opt = True
opt@gsnShadeFillType = "pattern" ; pattern fill
opt@gsnShadeHigh = 2 ; use pattern #2
opt@gsnShadeLow = 2
plotB=gsn_contour_shade(plotB,100.,95.,opt)
overlay=(plotA,plotB)
draw(plotA)
frame(wks)
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Jan 24 10:55:11 2014
This archive was generated by hypermail 2.1.8 : Fri Feb 07 2014 - 16:39:11 MST