Hi,
I ran escorc and rtest and set 89 as siglv to shade. But it shaded ocean area
alongwith it. Probably escorc correlated with ocean missing values and that
showed up in shaded area as well because of following error:
warning:escorc: Non-fatal conditions encountered in series or xstd equals zero.
Possibly, all values of a series are constant.
warning:escorc: Most likely, one or more series consisted of all constant values
Is there any workaround to avoid getting missing values greater than 89 over
ocean area in plot?
Thanks,
Ibo
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"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
begin
f1 = addfile("a1.nc","r")
x1 = f1->pre
Nr = dimsizes(x1)
f2 = addfile("a2.nc","r")
x2 = f2->pre(lat|:,lon|:,time|:)
x2!0 = "lat"
x2!1 = "lon"
x2&lat@units = "degrees_north"
x2&lon@units = "degrees_east"
c = escorc(x1,x2)
copy_VarCoords(x2,c)
sig = 100.*(1. - rtest(c,Nr,0))
printVarSummary(sig)
sig1 = doubletoint(sig)
wks = gsn_open_wks("x11","test.sig") ; ps or x11 to save or
visualize
gsn_define_colormap(wks,"BlueDarkRed18")
res = True ; No plot options
set.
res@gsnDraw = False
res@gsnFrame = False
res@cnFillOn = True
res@cnInfoLabelOn = False
res@cnLevelSelectionMode = "ExplicitLevels" ; manually set cn
levels
res@cnMinLevelValF = -1 ; min level
res@cnMaxLevelValF = 1 ; max level
res@cnLevels =
(/"-1.0","-0.9","-0.8","-0.7","-0.6","-0.5","-0.4","-0.3","-0.2",\
"0.0","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1.0"/)
res@gsnAddCyclic = False
res@gsnSpreadColors = True
res@cnLinesOn = False
res@cnLineLabelsOn = False
res1= True
res1@gsnFrame = False
res1@gsnDraw = False
res1@cnLinesOn = False
res1@cnInfoLabelOn = False
res1@cnLineColor = "black"
res1@cnLineThicknessF = 1.5
res1@cnLineLabelsOn = False
plot = gsn_csm_contour_map_ce(wks,c(:,:),res)
shade = gsn_csm_contour(wks,sig1,res1)
shade = ShadeGtContour(shade,89.,0)
overlay(plot,shade)
draw(plot)
frame(wks)
end
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Jan 9 07:56:23 2011
This archive was generated by hypermail 2.1.8 : Thu Jan 13 2011 - 09:24:21 MST