; =============================================== ; plot vectors EP flux ; =============================================== 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" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl" ;--------------------------------- begin ;---read in--- ncdfin=addfile("test_vector_EP_flux.nc","r") xT20=ncdfin->xT20 zT20=ncdfin->zT20 delete(ncdfin) ;================================================== ; plot stuff ;----------------- plots1=new( 1,"graphic") wks = gsn_open_wks ("ps", "test_vector_EP_flux" ) gsn_define_colormap(wks,"ncl_default") res = True res@gsnDraw = False ; Don't draw the plot or advance the res@gsnFrame = False ; Don't advance frame ;--vector stuff--- res@vcMinDistanceF = 0.03 ;res@vcRefMagnitudeF = 1. ; res@vcRefLengthF = 0.03 ; define length of vec ref res@tiMainString= "vector EP Flux" plots1 = gsn_csm_vector (wks, xT20(lev|:,lat|:),zT20(lev|:,lat|:), res ) getvalues plots1 ; "vcRefLengthF" : ref_len "vcRefMagnitudeF" : ref_mag "vcMinDistanceF" : ref_dist end getvalues print("ref len is " + ref_len) print("ref mag is " + ref_mag) print("ref dist is " + ref_dist) pres = True pres@gsnPaperOrientation = "portrait" gsn_panel(wks,plots1,(/1,1/),pres) end