load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" begin diri = "$NCARG_ROOT/lib/ncarg/data/cdf/" tf = addfile(diri+"Tstorm.cdf","r") ; Open netCDF file. t = (tf->t(0,:,:) - 273.15)*9.0/5.0 +32.0 ; 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_ex02") ; 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@tiMainString = "January 1996 Snow Storm" ; Main title plot = gsn_csm_contour_map(wks,t,res) end