Re: Single color panel plots output

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu Apr 29 2010 - 06:18:20 MDT

Hi,

A single color color plot may happen if you have a data field that is
all equal to one value.

Look at your "c" array. What do the values look like?

print(min(c))
print(max(c))

You may want to do the same for x1 and x2, to make sure what you read
off the files is correct.

--Mary

On Apr 29, 2010, at 1:42 AM, Ibo Ze wrote:

> Hi,
>
> I am doing cross-correlation and getting single color output panel
> plots. The immediate cause is not apparent to me. Can anyone please
> help to rectify this. Thanks.
> Script is as follows:
>
> 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"
> do i =5,7
> filename = "6104_pksec_"+sprinti("%0.2i",i)+".nc"
> print(filename)
> f1 = addfile(filename,"r")
> end do
>
> f1 = addfile("6104_pksec_05.nc","r")
> f2 = addfile("6104_pk_june_avg.nc","r")
> x1 = f1->a(lat|:,lon|:,time|:)
> x2 = f2->a
> x1!0="lat"
> x1!1="lon"
> x1&lat@units="degrees_north"
> x1&lon@units="degrees_east"
> c = escorc(x2,x1)
> copy_VarCoords(x1,c)
> printVarSummary(c)
>
> wks = gsn_open_wks ("x11","pksec_pk_06_panel") ; open ps file
> plot = new(3,graphic)
> gsn_define_colormap(wks,"BlWhRe")
> res = True
> resP = True
> res@gsnDraw = False ; Don't draw plots
> res@gsnFrame = False ; Don't advance frames
> res@cnFillOn = True
> res@cnLinesOn = False
>
> res@mpOutlineBoundarySets = "AllBoundaries"
> res@mpDataBaseVersion = "MediumRes"
> res@mpDataSetName = "Earth..3"
> res@mpOutlineOn = True
> res@mpFillOn = False
> res@mpMaxLatF = 37
> res@mpMinLatF = 7
> res@mpMaxLonF = 125
> res@mpMinLonF = 60
>
> res@cnLevelSelectionMode = "ManualLevels" ; manually set cn
> levels
> res@cnMinLevelValF = -1. ; min level
> res@cnMaxLevelValF = 1. ; max level
> res@cnLevelSpacingF = .25 ; contour
> level spacing
> res@tiMainFontHeightF = 0.03
> res@gsnAddCyclic = False
> do i=0,2
> plot(i) = gsn_csm_contour_map_ce(wks,c,res)
> end do
>
> pres = True ; Set panel resources
> pres@gsmMaximize = True ; Maximize plots in
> panel
> pres@gsnPanelLabelBar = True ; Turn on panel
> labelbal
> pres@pmLabelBarWidthF = 0.8 ; Change labelbar
> width
>
> gsn_panel(wks,plot,(/3,1/),pres)
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Apr 29 06:19:05 2010

This archive was generated by hypermail 2.1.8 : Thu Apr 29 2010 - 08:05:27 MDT