load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" begin ; ; Note that "t" on this file has no attributes like "long_name" ; or "units". Add units attributes to the coordinate arrays and ; see what happens to plot. ; tf = addfile("Tstorm.cdf","r") ; Open netCDF file. T = tf->t(0,:,:) ; Read in temperature data. T&lon@units = "degrees_east" T&lat@units = "degrees_north" ; printVarSummary(T) wks = gsn_open_wks("ps","contour1c") ; Open a PS file called "contour1c.ps" gsn_define_colormap(wks,"rainbow") ; Change color map res = True ; Variable to hold plot options res@cnFillOn = True ; Turn on contour fill. res@lbOrientation = "Vertical" ; Move labelbar to side. res@tiMainString = "gsnSpreadColors=False (default)" ; Main title plot = gsn_csm_contour(wks,T,res) ; Call the gsn_csm function for ; drawing the contours. end