[Fwd: NCL question]

From: Heidi Cullen (hcullen AT XXXXXX)
Date: Mon Jul 29 2002 - 13:14:29 MDT


i'm trying to run the following straightforward script. it runs
completely through with no errors - but i get an empty map with no SST
anomalies (i'm trying to plot the Reynolds SST anomaly data from last
week).

here is the script. am i doing something onviously wrong with respect to
setting the graphics control "res@"

;******************************************************
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"
begin
;************************************************
; read the file
;************************************************
in = addfile("/tigris/dt/hcullen/NCL/data/reynolds_ssta.cdf","r")
vars = getfilevarnames(in)
print(vars)
nvars = dimsizes(vars)
ssta = in->ssta
T= in->T
lat = in->Y
lon = in->X
printVarSummary(ssta)
;************************************************
; assign variables and reorder lat and lon
;************************************************
ssta!0="T"
ssta!1="lat"
ssta!2="lon"
;************************************************
; create plot
;************************************************
wks = gsn_open_wks("X11","hotspots")
gsn_define_colormap(wks,"gui_default")

  res = True ; plot options desired
  res@mpGridAndLimbOn = False ; turn on lat/lon lines
  res@mpGridLatSpacingF = 30. ; spacing for lat lines
  res@mpGridLonSpacingF = 30. ; spacing for lon lines

  res@gsnSpreadColors = True
  res@cnFillOn = True ; turn on color fill
  res@cnInfoLabelOn = False ; turn off contour info
label
  res@cnLinesOn = False ; turn off contour lines
  res@cnLineLabelsOn = False ; turn off line labels

  res@gsnAddCyclic = False ; data already has cyclic
point
 
  res@mpOutlineOn = True ; turn on continental
outlines
  res@mpOutlineBoundarySets = "National" ; add country boundaries
  res@lbLabelBarOn = False ; No single label
bar

  res@cnLevelSelectionMode = "ManualLevels" ; manual contour levels
  res@cnMinLevelValF = -5.0 ; min level
  res@cnMaxLevelValF = 5.0 ; max level
  res@cnLevelSpacingF = 0.1 ; interval
  
printVarSummary(ssta)
plot = gsn_csm_contour_map_ce(wks,ssta(0,:,:), res)
end

-- 
Heidi M. Cullen
Environmental & Societal Impacts Group 
National Center for Atmospheric Research
P. O. Box 3000
Boulder, Colorado 80307-3000 USA

For Overnight, send to: 3450 Mitchell Lane Boulder, Colorado 80301 Phone:303.497.8132 - Fax:303.497.8125 - email:hcullen AT ucar.edu _______________________________________________ ncl-talk mailing list ncl-talk AT ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Mon Jul 29 2002 - 14:59:43 MDT