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","contour1d") ; Open a PS file called "contour1d.ps" gsn_define_colormap(wks,"rainbow") ; Change color map res = True ; Variable to hold plot options res@cnFillOn = True ; Contour fill on res@gsnSpreadColors = True ; Span full color map res@lbOrientation = "Vertical" ; Move labelbar to side res@tiMainString = "gsnSpreadColors=True" ; Main title plot = gsn_csm_contour(wks,T,res) ; Call the gsn_csm function for ; drawing the contours. end