Hi Ibo,
That warning message simply means that one or more data points had
timeseries that were most likely constant. For observational data or
data that has areas that are missing, there is little cause of concern
upon seeing that error message.
First, you need to make sure that you have the _FillValue attribute set
for your x1, x2, c, sig, and sig1 arrays. (To set a _FillValue attribute
for the c array: c@_FillValue = 1.e20)
Second, you are not setting the contour levels for your res1 resource
list. Thus, I am not sure where the shading is occurring, as
ShadeGtContour will pattern fill all areas greater than the _first
contour greater than the given value_. This is an important aspect of
ShadeGtContour. It will not color fill all areas greater than the given
value. Thus, if your contour levels are 70,85,95,99, and your input
argument is set to 89, then all areas greater than _95_ are pattern filled.
I would highly recommend setting res1@cnLevelSelectionMode =
"ExplicitLevels" and then setting res1@cnLevels = 89. You would then
want to set
shade = ShadeGtContour(shade,88.,0)
On a side note, it is highly recommended that you use
gsn_contour_shade, as ShadeGtContour has been deprecated.
Finally, if you simply want to mask out the ocean, you could use the
landsea_mask function:
http://www.ncl.ucar.edu/Document/Functions/Shea_util/landsea_mask.shtml
Good luck,
Adam
On 01/09/2011 07:56 AM, Ibo Ze wrote:
> 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
-- __________________________________________________ Adam Phillips asphilli@ucar.edu National Center for Atmospheric Research tel: (303) 497-1726 Climate and Global Dynamics Division fax: (303) 497-1333 P.O. Box 3000 Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli _______________________________________________ ncl-talk mailing list List instructions, subscriber options, unsubscribe: http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Mon Jan 10 11:56:40 2011
This archive was generated by hypermail 2.1.8 : Thu Jan 13 2011 - 09:24:21 MST