Re: Single color panel plots output

From: Ibo Ze <ibo85_at_nyahnyahspammersnyahnyah>
Date: Thu Apr 29 2010 - 09:45:58 MDT

Hi Mary,

You are right. I think am missing something in first few lines of script. The following output i got for x1 and c using print:

Variable: filename
Type: string
Total Size: 8 bytes
            1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
(0) 6104_pksec_05.nc

Variable: filename
Type: string
Total Size: 8 bytes
            1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
(0) 6104_pksec_06.nc

Variable: filename
Type: string
Total Size: 8 bytes
            1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
(0) 6104_pksec_07.nc
(0) 0
(0) 62.79183
(0) 0.1176416
(0) 1.319832
(0) -0.3797857
(0) 0.529642

Variable: c
Type: float
Total Size: 124800 bytes
            31200 values
Number of Dimensions: 2
Dimensions and sizes: [lat | 120] x [lon | 260]
Coordinates:
            lat: [7.125..36.875]
            lon: [60.125..124.875]
Number Of Attributes: 1
  _FillValue : -999

________________________________
From: Mary Haley <haley@ucar.edu>
To: Ibo Ze <ibo85@ymail.com>
Cc: Ncl Talk <ncl-talk@ucar.edu>
Sent: Thu, April 29, 2010 7:18:20 AM
Subject: Re: Single color panel plots output

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 09:52:55 2010

This archive was generated by hypermail 2.1.8 : Mon May 03 2010 - 14:51:26 MDT