; *********************************************** ; xy_17.ncl ; *********************************************** load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" ;************************************************ begin ;************************************************ ; read in data ;************************************************ f = addfile ("uv300.nc","r") u = f->U ; get u data ;************************************************ ; to plot multiple lines, you must put them into ; a mulidimensional array ;************************************************ data = new((/2,dimsizes(u&lat)/),float) data(0,:) = u(0,:,{82}) data(1,:) = u(0,:,{-69}) ;************************************************ ; plotting parameters ;************************************************ wks = gsn_open_wks ("ps","xy") ; open workstation res = True ; plot mods desired res@gsnDraw = False ; don't draw plot res@gsnFrame = False ; don't advance frame res@tiMainString = "Filled XY plot" ; add title res@xyDashPattern = 0 ; solid line for curves plot = gsn_csm_xy (wks,u&lat,data,res) ; create plot plot = fill_xy2(wks,plot,u&lat,data(0,:),data(1,:),"red","green") draw(plot) frame(wks) end