load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" begin fu = addfile("$NCARG_ROOT/lib/ncarg/data/cdf/Ustorm.cdf","r") fv = addfile("$NCARG_ROOT/lib/ncarg/data/cdf/Vstorm.cdf","r") itime = 0 u = fu->u(itime,:,:) ; Select first timestep. v = fv->v(itime,:,:) wks = gsn_open_wks("x11","vector_ex05") res = True ; Plot options desired. res@gsnMaximize = True ; Maximize plot in frame. cmap = read_colormap_fuil("rainbow") res@vcLevelColors = cmap(16:,:) res@vcMonoLineArrowColor = False ; Turn on color vectors. res@vcRefMagnitudeF = 20 ; Define reference magnitude. res@vcRefLengthF = 0.045 ; Define length of vector reference. res@vcLineArrowThicknessF = 2. ; Double the thickness. res@vcRefAnnoOrthogonalPosF = -0.179 ; Move reference annotation up res@vcRefAnnoParallelPosF = 0.19 ; and over to left. res@vcLevelSelectionMode = "ExplicitLevels" ; Explicitly set res@vcLevels = ispan(2,28,2) ; vector levels. res@lbOrientation = "Vertical" ; Move labelbar to side. res@tiMainString = fu->reftime + " + " + fu->timestep(itime) plot = gsn_csm_vector(wks,u,v,res) end