;================================================ ; lb_8.ncl ;================================================ ; Concepts illustrated: ; - Keeping labelbar labels from overlapping ; - Changing the contour level spacing ;================================================ 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 ;************************************************ ; open netCDF file and read in data ;************************************************ in = addfile("atmos.nc","r") v = in->V ;************************************************ ; create plot ;************************************************ wks = gsn_open_wks("ps","lb") ; open a ncgm file gsn_define_colormap(wks, "wgne15") res = True ; plot mods desired res@cnFillOn = True ; turn on color res@lbLabelAutoStride = True ; automatically choose best stride ; NO LONGER NEEDED IN V6.1.0 res@cnLevelSpacingF = 1 ; set finer contour spacing plot = gsn_csm_contour_map_ce(wks,v(0,3,:,:),res) ; create the plot end