begin diri = "$NCARG_ROOT/lib/ncarg/data/cdf/" fili = "Tstorm.cdf" tf = addfile(diri+fili,"r") ; Open netCDF file. t = (tf->t(0,:,:) - 273.15)*9./5. +32. ; Read in temp, ; convert to C. ; ; Variable "t" does not have any coordinate information ; attached to it, so we need to do that here. ; lat = tf->lat ; Read lat/lon off file. lon = tf->lon lat@units = "degrees_north" ; Attach units attributes lon@units = "degrees_east" t!0 = "lat" ; Name rightmost (y) dimension t!1 = "lon" ; Name leftmost (x) dimension t&lat = lat ; Assign coordinate arrays t&lon = lon printVarSummary(t) wks = gsn_open_wks("x11","contourmap2_ex03") ; Open X11 window res = True ; Plot options desired. res@gsnMaximize = True ; Maximize plot in frame. res@gsnAddCyclic = False ; This is not global data. res@mpMinLatF = min(lat) ; Zoom in on map. res@mpMaxLatF = max(lat) res@mpMinLonF = min(lon) res@mpMaxLonF = max(lon) res@cnFillOn = True ; Turn on contour fill. res@cnLinesOn = False ; Turn off contour lines. res@cnFillPalette = "temp1" ; Set color map to use. res@cnLevelSelectionMode = "ManualLevels" ; Default is "AutomaticLevels" res@cnLevelSpacingF = 2.25 ; contour level spacing res@tiMainString = "January 1996 Snow Storm" ; Main title plot = gsn_csm_contour_map(wks,t,res) end