begin f = addfile("$NCARG_ROOT/lib/ncarg/data/cdf/uv300.nc","r") u = f->U(1,:,:) v = f->V(1,:,:) speed = u ; Sneaky way to copy metadata speed = sqrt(u^2+v^2) wks = gsn_open_wks("png","overlay1d") ;---Resource list to hold common resources. res = True res@gsnDraw = False ; don't draw res@gsnFrame = False ; don't advance frame res@gsnMaximize = True mpres = res res@gsnAddCyclic = True res@gsnRightString = "" ; turn off right string res@gsnLeftString = "" ; turn off left string cnres = res vcres = res cnres@cnFillOn = True ; turn on color fill cnres@cnLinesOn = False ; turn off contour lines cnres@cnFillPalette = "gui_default" ; change color table cnres@pmLabelBarOrthogonalPosF = 0.05 ; move down away from plot cnres@lbLabelFontHeightF = 0.01 vcres@vcGlyphStyle = "CurlyVector" ; curly vectors vcres@vcRefMagnitudeF = 20 ; define vector ref mag vcres@vcRefLengthF = 0.045 ; define length of vec ref vcres@vcRefAnnoOrthogonalPosF = -.535 ; move ref vector into plot map = gsn_csm_map(wks,mpres) contours = gsn_csm_contour(wks,speed,cnres) vectors = gsn_csm_vector(wks,u,v,vcres) ;---Overlay vectors and contours on map overlay(map,contours) overlay(map,vectors) ;---Drawing the map will draw contours and vectors too. draw(map) frame(wks) end