<div>Hi:</div><div>&nbsp; All,I am trying to compare the wind data of wrfout with observations of one station,like the picture below,</div><div><img src="cid:9FEF6EE2@F1156864.51DEC857.jpg" filesize="115159" modifysize="94%" diffpixels="22px" scalingmode="zoom" style="width: 1148px; height: 182px;"></div><div>Here is my strategy:</div><div>First, I extracted the data and put them into two different arrys,draw two differert xy plot with same manual timelabels on X axis,but arrowline with different color.</div><div>Then I overlay them.</div><div>But the picture I drawed is like this:</div><div><img src="cid:8DC29D09@F1156864.51DEC857.jpg" filesize="202579"></div><div>The error massage is :</div><div><div>warning:TickMarkSetValues: tmXBLabels has fewer elements than tmXBValues; the labels will be ignored</div><div>warning:TickMarkSetValues: tmXTLabels has fewer elements than tmXTValues; the labels will be ignored</div><div>warning:["PlotManager.c":4210]:PlotManagerSetValues: Error setting TickMark values</div><div>fatal:VectorPlotDraw: VVECTR - VECTOR NDC LENGTH TOO GREAT</div><div>fatal:VectorPlotDraw: error drawing vectors</div><div>fatal:VectorPlotDraw: draw error</div><div>fatal:PlotManagerDraw: error in plot draw</div><div>fatal:_NhlPlotManagerDraw: Draw error</div></div><div><br></div><div>This is my script:</div><div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"&nbsp;</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"&nbsp;</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"</div><div><br></div><div>begin</div><div>;</div><div>; The WRF ARW input file. &nbsp;</div><div>; This needs to have a ".nc" appended, so just do it.</div><div>&nbsp; a = addfile("/backup/hl/wrfout201508/wrfout_d03_2015-08-01_12:00:00.nc","r") &nbsp; &nbsp;&nbsp;</div><div><br></div><div>&nbsp; &nbsp; ij = wrf_user_ll_to_ij(a, 108.966667,34.433333,True)</div><div><br></div><div>&nbsp; &nbsp; print("lon location is: " +ij(0))</div><div><br></div><div>&nbsp; &nbsp; print("lat location is: " + ij(1))</div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div>; First get the variables we will need&nbsp;</div><div>u10_2=new((/31,24/),float,"No_FillValue")</div><div>v10_2=new((/31,24/),float,"No_FillValue")</div><div><br></div><div>&nbsp;</div><div>&nbsp;filename1=systemfunc("ls /backup/hl/wrfout201508/wrfout_d03_2015-05*.nc")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fin1=addfiles(filename1,"r")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;do i=0,30</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;u10_1=fin1[i]-&gt;U10(0:23,ij(1)-1, ij(0)-1)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;v10_1=fin1[i]-&gt;V10(0:23,ij(1)-1, ij(0)-1)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;u10_2 (i,:)= u10_1 &nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;v10_2 (i,:)= v10_1 &nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>end do &nbsp;&nbsp;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span> &nbsp;u10=ndtooned(u10_2)</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span> &nbsp;v10=ndtooned(v10_2)</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span> &nbsp;u10_d=u10(0:724)</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span> &nbsp;v10_d=v10(0:724)</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span> &nbsp;printVarSummary(u10_d(0))</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span> &nbsp;printVarSummary(v10_d(0))</div><div><br></div><div>;;;;;;;;;;;;;;;get obs data;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<span class="Apple-tab-span" style="white-space:pre">        </span> &nbsp;&nbsp;</div><div>&nbsp; ascii_filename = "/public/home/huanglei/txt_obs/obs.txt"</div><div>&nbsp; seismic = asciiread(ascii_filename,(/725,6/),"float")</div><div>&nbsp; seismic@_FillValue = -999</div><div>&nbsp; &nbsp; &nbsp;wdir = seismic(:,4)</div><div>&nbsp; &nbsp; &nbsp;wspd = seismic(:,5)</div><div>&nbsp; &nbsp; &nbsp;tmp = (270.0-wdir)*0.01745329</div><div>&nbsp; &nbsp; &nbsp;u_o = wspd*cos(tmp)</div><div>&nbsp; &nbsp; &nbsp;v_o = wspd*sin(tmp)</div><div><br></div><div>;;;;;;;;;;;;;;;;;;;;;;;;;data for plot1;;;;;;;;;;;;;;;;a is model data ; b is obs data;;;;;;;;;;;;;;;;;;;;;;;</div><div>&nbsp;u10_new1a=new((/25,220/),float)</div><div>&nbsp;u10_new1a=0 &nbsp;</div><div>&nbsp;u10_new1a(8,:)=u10_d(0:219)</div><div>&nbsp;v10_new1a=new((/25,220/),float)</div><div>&nbsp;v10_new1a=0</div><div>&nbsp;v10_new1a(8,:)=v10_d(0:219)</div><div><br></div><div>&nbsp;u10_new1b=new((/25,220/),float)</div><div>&nbsp;u10_new1b=0 &nbsp;</div><div>&nbsp;u10_new1b(8,:)=u_o(0:219)&nbsp;</div><div>&nbsp;v10_new1b=new((/25,220/),float)</div><div>&nbsp;v10_new1b=0</div><div>&nbsp;v10_new1b(8,:)=v_o(0:219)</div><div><br></div><div><br></div><div><br></div><div>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</div><div>wks &nbsp;= gsn_open_wks("pdf","gsn_vector_panel") &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; open a Graphic wkStation</div><div>&nbsp; res &nbsp;= True &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; plot mods desired</div><div>&nbsp; res@gsnFrame &nbsp;= False</div><div>&nbsp; res@gsnDraw &nbsp; = False &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; don't draw</div><div><br></div><div>&nbsp; res@vcGlyphStyle &nbsp; &nbsp; = "LineArrow" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; turn on LineArrow</div><div>&nbsp; res@gsnMaximize = True &nbsp;</div><div>&nbsp; res@vpHeightF &nbsp; = 0.15</div><div>&nbsp; res@vpWidthF &nbsp; &nbsp;= 0.8</div><div>&nbsp;</div><div>&nbsp; res@pmLegendWidthF &nbsp; &nbsp; &nbsp; &nbsp; = 0.10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; Change width and</div><div>&nbsp; res@pmLegendHeightF &nbsp; &nbsp; &nbsp; &nbsp;= 0.10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; height of legend.</div><div>&nbsp; res@tmYLOn &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = False &nbsp; &nbsp; &nbsp; &nbsp;; Don't draw labels for left</div><div>&nbsp; res@tmYLLabelsOn &nbsp; &nbsp; &nbsp; = False &nbsp; &nbsp; &nbsp; &nbsp;; &nbsp;Y axes</div><div>&nbsp; res@tmYROn &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = False &nbsp; &nbsp; &nbsp; &nbsp;; Don't draw labels for right</div><div>&nbsp; res@tmYRLabelsOn &nbsp; &nbsp; &nbsp; = False &nbsp; &nbsp; &nbsp; &nbsp;; &nbsp;Y axes</div><div>&nbsp; res@tmXBLabelFontHeightF = 0.01</div><div>&nbsp; res@vcRefAnnoOrthogonalPosF = -0.258 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; move ref vector up</div><div>&nbsp; res@vcRefMagnitudeF &nbsp; &nbsp; &nbsp; &nbsp; = 0.5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; define vector ref mag</div><div>&nbsp; res@vcRefLengthF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 0.025 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; define length of vec ref</div><div>&nbsp; res@vcRefAnnoParallelPosF &nbsp; &nbsp; = 0.999</div><div>&nbsp; res@vcRefAnnoFontHeightF =0.005</div><div>&nbsp; res@vcRefAnnoString2 &nbsp; =" "</div><div>&nbsp; res@vpHeightF &nbsp; = 0.15</div><div>&nbsp; res@vpWidthF &nbsp; = 0.8</div><div><br></div><div>&nbsp;;res@tmYLLabelFontColor = line_col1 &nbsp; &nbsp;;</div><div><br></div><div>;;;;;;;;;;;;;;;;;;;;add text TEST / OBS;;;;;;;</div><div>&nbsp; &nbsp; res_text &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = True</div><div>&nbsp; &nbsp; res_text@txFontHeightF = 0.01</div><div>&nbsp; &nbsp;</div><div>&nbsp; &nbsp; m1 = "TEST"</div><div>&nbsp; &nbsp; m2 = "OBS"</div><div><br></div><div>&nbsp;;;;;;;;;;;;;;;;;;resources for plot(0);;;;;;;;;;;;;;</div><div><br></div><div>&nbsp; res0a=res</div><div>&nbsp; res0a@tmXBMode ="Explicit" &nbsp;</div><div>&nbsp; res0a@tmXBValues &nbsp;=(/5,29,53,77,101,125,149,173,197/)</div><div>&nbsp; res0a@tmXBLabels = (/"5/2","5/3"," 5/4","5/5", "5/6","5/7","5/8","5/9","5/10"/)</div><div><br></div><div>&nbsp; res0a@vcMonoLineArrowColor = True</div><div>&nbsp; res0a@vcLineArrowColor = "black"</div><div>&nbsp; plotA = gsn_csm_vector(wks, u10_new1a, v10_new1a,res0a)</div><div><br></div><div>&nbsp; res0b=res</div><div>&nbsp; res0b@tmXBMode ="Explicit" &nbsp;</div><div>&nbsp; res0b@tmXBValues &nbsp;=(/5,29,53,77,101,125,149,173,197/)</div><div>&nbsp; res0b@tmXBLabels = (/"5/2","5/3"," 5/4","5/5", "5/6","5/7","5/8","5/9","5/10"/)</div><div><br></div><div>&nbsp; res0b@vcMonoLineArrowColor = True</div><div>&nbsp; res0b@vcLineArrowColor = "red"</div><div>&nbsp; plotB = gsn_csm_vector(wks, u10_new1b, u10_new1b,res0b)</div><div>&nbsp; &nbsp;</div><div>&nbsp; &nbsp;overlay(plotA,plotB) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; result will be plotA</div><div>&nbsp; &nbsp;plot = plotA &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; now assign plotA to array</div><div><br></div><div>&nbsp;gsn_text(wks,plot(0),m1,190,10,res_text)</div><div>&nbsp;gsn_text(wks,plot(0),m2,190,35,res_text)</div><div><br></div><div>&nbsp;draw(plot)</div><div>;frame(wks)</div><div>end</div></div><div><br></div><div><span style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.8px;">&nbsp;How can I slove the problem?</span></div><div></div>