<div dir="ltr">Hi,<div><br></div><div>I am in the midst of creating a suite of operational weather plots for the ATEC project I am working on.  We are replacing RIP plots with NCL plots, since NCL is much more versatile.  I need the scripts to be as flexible as possible, since there are a wide variety of plots.  Therefore, I am drawing each layer of a plot and overlaying them.  For example, in the plot I am trying to create, there is a map, shaded contour plot, solid contour lines, dashed contour lines, and wind barbs.  It all plots perfectly, except for the wind barbs are missing.  I have tried to use numerous examples on the NCL website as templates, and then adapting them, but none of them will draw the wind barbs either.  I am trying to avoid using plotting functions that plot scalars and vectors within the same function, so the plotting system can be as flexible as possible.</div><div><br></div><div>Here is my script.  The input file is on my website, here: <a href="http://joeandfrede.com/ncl/wrfout_d01_2017-09-23_12_00_00.RTC_P+FCST">http://joeandfrede.com/ncl/wrfout_d01_2017-09-23_12_00_00.RTC_P+FCST</a>.  Could someone tell me what I am missing or doing wrong?  Thanks on my part, and the whole ATEC project.</div><div><br></div><div>Joe</div><div><br></div><div><div>; This script is used to test ideas for plotting in NCL</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"</div><div>begin</div><div> PlotType = "png"</div><div> in_file = "wrfout_d01_2017-09-23_12:00:00.RTC_P+FCST"</div><div> ncdf_in = addfile(in_file+".nc","r")</div><div> times  = wrf_user_list_times(ncdf_in)  ; get times in the file</div><div> ntimes = dimsizes(times)         ; number of times in the file</div><div> T2    = wrf_user_getvar(ncdf_in,"T2",0)</div><div> rh2   = wrf_user_getvar(ncdf_in,"rh2",0)</div><div> XLAT  = wrf_user_getvar(ncdf_in,"XLAT",0)</div><div> XLONG = wrf_user_getvar(ncdf_in,"XLONG",0)</div><div> U10   = wrf_user_getvar(ncdf_in,"U10",0)</div><div> V10   = wrf_user_getvar(ncdf_in,"V10",0)</div><div> slp   = wrf_user_getvar(ncdf_in,"slp",0)</div><div> dims       = dimsizes(XLAT)</div><div> nlat       = dims(0)</div><div> nlon       = dims(1)</div><div><br></div><div>; Create plot</div><div> PlotName = "T2_RH2_WND10_v2"</div><div> wks = gsn_open_wks(PlotType,PlotName)</div><div> gsn_define_colormap(wks,"BlAqGrYeOrReVi200")</div><div><br></div><div> res_sha = True</div><div> res_sha@cnFillOn = True</div><div> res_sha@gsnDraw    = False</div><div> res_sha@gsnFrame   = False</div><div> res_sha@gsnSpreadColors = True</div><div> res_sha@cnInfoLabelOn = False</div><div> res_sha@sfXArray  = XLONG</div><div> res_sha@sfYArray  = XLAT</div><div><br></div><div> res_con = True</div><div> res_con@cnLineColor = "NavyBlue"</div><div> res_con@cnLineThicknessF = 3</div><div> res_con@gsnDraw    = False</div><div> res_con@gsnFrame   = False</div><div> res_con@cnInfoLabelOn = False</div><div> res_con@gsnLeftStringOrthogonalPosF = 0.05</div><div> res_con@gsnRightStringOrthogonalPosF = 0.05</div><div> res_con@sfXArray  = XLONG</div><div> res_con@sfYArray  = XLAT</div><div><br></div><div> res_dash = True</div><div> res_dash@cnLineColor = "red4"</div><div> res_dash@cnLineThicknessF = 3</div><div> res_dash@gsnContourPosLineDashPattern = 1</div><div> res_dash@gsnDraw    = False</div><div> res_dash@gsnFrame   = False</div><div> res_dash@cnInfoLabelOn = False</div><div> res_dash@gsnLeftStringOrthogonalPosF = 0.1</div><div> res_dash@gsnRightStringOrthogonalPosF = 0.1</div><div> res_dash@sfXArray  = XLONG</div><div> res_dash@sfYArray  = XLAT</div><div><br></div><div> res_vec = True</div><div> res_vec@gsnDraw    = False</div><div> res_vec@gsnFrame   = False</div><div> res_vec@vcGlyphStyle    = "WindBarb"</div><div> res_vec@vcMinDistanceF  = 0.02</div><div> res_vec@vcRefLengthF  = 0.02</div><div> res_vec@gsnLeftStringOrthogonalPosF = 0.15</div><div> res_vec@gsnRightStringOrthogonalPosF = 0.15</div><div> res_vec@vcRefAnnoOn      = False</div><div> res_vec@vcMinFracLengthF = 0.2</div><div> ;res_vec@vcVectorDrawOrder        = "Postdraw"</div><div> ;res_vec@sfXArray  = XLONG</div><div> ;res_vec@sfYArray  = XLAT</div><div><br></div><div> res_map = True</div><div> res_map@gsnDraw    = False</div><div> res_map@gsnFrame   = False</div><div> res_map@mpLimitMode         = "Corners"             ; corner method of zoom</div><div> res_map@mpLeftCornerLatF    = XLAT(0,0)            ; left corner</div><div> res_map@mpLeftCornerLonF    = XLONG(0,0)            ; left corner</div><div> res_map@mpRightCornerLatF   = XLAT(nlat-1,nlon-1)  ; right corner</div><div> res_map@mpRightCornerLonF   = XLONG(nlat-1,nlon-1)  ; right corner</div><div> res_map@mpProjection        = "LambertConformal"    ; choose projection</div><div> res_map@mpLambertParallel1F = ncdf_in@TRUELAT1</div><div> res_map@mpLambertParallel2F = ncdf_in@TRUELAT2</div><div> res_map@mpLambertMeridianF  = ncdf_in@STAND_LON</div><div> res_map@tfDoNDCOverlay      = True                  ; native grid, no transform</div><div> ;res_map@mpOutlineDrawOrder     = "Predraw"</div><div> ;res_map@mpFillDrawOrder        = "Predraw"</div><div> res_map@mpFillOn            = False</div><div><br></div><div> plot_sha = gsn_csm_contour(wks,T2,res_sha)</div><div> plot_con = gsn_csm_contour(wks,rh2,res_con)</div><div> plot_dash = gsn_csm_contour(wks,slp,res_dash)</div><div> plot_vec = gsn_csm_vector(wks,U10,V10,res_vec)</div><div> plot_map = gsn_csm_map(wks,res_map)</div><div>  ;res_map = res_vec</div><div>  ;plot_map = gsn_csm_vector_map(wks,U10,V10,res_map)</div><div><br></div><div> overlay(plot_map,plot_sha)</div><div> overlay(plot_map,plot_con)</div><div> overlay(plot_map,plot_dash)</div><div> overlay(plot_map,plot_vec)</div><div><br></div><div> draw(plot_map)</div><div> frame(wks)</div><div><br></div><div> print("Created plot: "+PlotName+"."+PlotType)</div></div></div>