<div dir="ltr"><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">Hi Grace,</font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace"><br></font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">We had a similar question a few days ago. See:</font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace"><a href="http://mailman.ucar.edu/pipermail/ncl-talk/2016-August/006681.html">http://mailman.ucar.edu/pipermail/ncl-talk/2016-August/006681.html</a><br></font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">You are setting vcRefMagnitudeF to 0.5 and vcRefLengthF to 10, which means</font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">all vectors of magnitude 10 will be drawn in length 0.5 NDC units, which is</font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">half of the plotting area. That&#39;s why your vectors are so large.</font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace"><br></font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">As I suggested in the previous email, you should start by commenting these</font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">two resources out initially, to let NCL pick the reference length and the</font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">magnitude vector.  You can then make a better decision about what size to</font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">use for the these two resources.</font></div><div class="gmail_default" style="font-size:small"><pre><font face="monospace, monospace">I usually start by only changing the vcRefLengthF resource to see how it
affects the plot. For example, try a value of 0.02. Depending on how the
vectors look, you may want to increase or decrease this value slightly.

If this still doesn&#39;t look good, then try changing the vcRefMagnitudeF value.
The reference annotation box on the plot will </font><span style="font-family:monospace,monospace">tell you what </span><span style="font-family:monospace,monospace">default NCL chose,
so you can use this value as a base for determining how </span><span style="font-family:monospace,monospace">much to change it.</span></pre><pre>--Mary</pre><pre><br></pre></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 1, 2016 at 8:05 PM, grace <span dir="ltr">&lt;<a href="mailto:313695096@qq.com" target="_blank">313695096@qq.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi:</div><div>  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" style="width:1148px;min-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"></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:[&quot;PlotManager.c&quot;:4210]<wbr>: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 &quot;$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_code.ncl&quot; </div><div>load &quot;$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_csm.ncl&quot; </div><div>load &quot;$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/wrf/WRFUserARW.ncl&quot;</div><div>load &quot;$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/contributed.<wbr>ncl&quot;</div><div>load &quot;$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/shea_util.ncl&quot;</div><div><br></div><div>begin</div><div>;</div><div>; The WRF ARW input file.  </div><div>; This needs to have a &quot;.nc&quot; appended, so just do it.</div><div>  a = addfile(&quot;/backup/hl/<wbr>wrfout201508/wrfout_d03_2015-<wbr>08-01_12:00:<a href="http://00.nc" target="_blank">00.nc</a>&quot;,&quot;r&quot;)     </div><div><br></div><div>    ij = wrf_user_ll_to_ij(a, 108.966667,34.433333,True)</div><div><br></div><div>    print(&quot;lon location is: &quot; +ij(0))</div><div><br></div><div>    print(&quot;lat location is: &quot; + ij(1))</div><div><span style="white-space:pre-wrap">        </span></div><div>; First get the variables we will need </div><div>u10_2=new((/31,24/),float,&quot;No_<wbr>FillValue&quot;)</div><div>v10_2=new((/31,24/),float,&quot;No_<wbr>FillValue&quot;)</div><div><br></div><div> </div><div> filename1=systemfunc(&quot;ls /backup/hl/wrfout201508/<wbr>wrfout_d03_2015-05*.nc&quot;)</div><div>         fin1=addfiles(filename1,&quot;r&quot;)</div><div>         do i=0,30</div><div>            </div><div>                 u10_1=fin1[i]-&gt;U10(0:23,ij(1)<wbr>-1, ij(0)-1)</div><div>                 v10_1=fin1[i]-&gt;V10(0:23,ij(1)<wbr>-1, ij(0)-1)</div><div>                 u10_2 (i,:)= u10_1  <span style="white-space:pre-wrap">        </span></div><div>                 v10_2 (i,:)= v10_1  <span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>end do   </div><div><span style="white-space:pre-wrap">                        </span>  u10=ndtooned(u10_2)</div><div><span style="white-space:pre-wrap">                        </span>  v10=ndtooned(v10_2)</div><div><br></div><div><span style="white-space:pre-wrap">                        </span>  u10_d=u10(0:724)</div><div><span style="white-space:pre-wrap">                        </span>  v10_d=v10(0:724)</div><div><span style="white-space:pre-wrap">                        </span>  printVarSummary(u10_d(0))</div><div><span style="white-space:pre-wrap">                        </span>  printVarSummary(v10_d(0))</div><div><br></div><div>;;;;;;;;;;;;;;;get obs data;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;;<span style="white-space:pre-wrap">        </span>   </div><div>  ascii_filename = &quot;/public/home/huanglei/txt_<wbr>obs/obs.txt&quot;</div><div>  seismic = asciiread(ascii_filename,(/<wbr>725,6/),&quot;float&quot;)</div><div>  seismic@_FillValue = -999</div><div>     wdir = seismic(:,4)</div><div>     wspd = seismic(:,5)</div><div>     tmp = (270.0-wdir)*0.01745329</div><div>     u_o = wspd*cos(tmp)</div><div>     v_o = wspd*sin(tmp)</div><div><br></div><div>;;;;;;;;;;;;;;;;;;;;;;;;;data for plot1;;;;;;;;;;;;;;;;a is model data ; b is obs data;;;;;;;;;;;;;;;;;;;;;;;</div><div> u10_new1a=new((/25,220/),<wbr>float)</div><div> u10_new1a=0  </div><div> u10_new1a(8,:)=u10_d(0:219)</div><div> v10_new1a=new((/25,220/),<wbr>float)</div><div> v10_new1a=0</div><div> v10_new1a(8,:)=v10_d(0:219)</div><div><br></div><div> u10_new1b=new((/25,220/),<wbr>float)</div><div> u10_new1b=0  </div><div> u10_new1b(8,:)=u_o(0:219) </div><div> v10_new1b=new((/25,220/),<wbr>float)</div><div> v10_new1b=0</div><div> v10_new1b(8,:)=v_o(0:219)</div><div><br></div><div><br></div><div><br></div><div>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;;;;;;;;;;;;</div><div>wks  = gsn_open_wks(&quot;pdf&quot;,&quot;gsn_<wbr>vector_panel&quot;)          ; open a Graphic wkStation</div><div>  res  = True                                      ; plot mods desired</div><div>  res@gsnFrame  = False</div><div>  res@gsnDraw   = False                          ; don&#39;t draw</div><div><br></div><div>  res@vcGlyphStyle     = &quot;LineArrow&quot;             ; turn on LineArrow</div><div>  res@gsnMaximize = True  </div><div>  res@vpHeightF   = 0.15</div><div>  res@vpWidthF    = 0.8</div><div> </div><div>  res@pmLegendWidthF         = 0.10                  ; Change width and</div><div>  res@pmLegendHeightF        = 0.10                  ; height of legend.</div><div>  res@tmYLOn             = False        ; Don&#39;t draw labels for left</div><div>  res@tmYLLabelsOn       = False        ;  Y axes</div><div>  res@tmYROn             = False        ; Don&#39;t draw labels for right</div><div>  res@tmYRLabelsOn       = False        ;  Y axes</div><div>  res@tmXBLabelFontHeightF = 0.01</div><div>  res@vcRefAnnoOrthogonalPosF = -0.258             ; move ref vector up</div><div>  res@vcRefMagnitudeF         = 0.5             ; define vector ref mag</div><div>  res@vcRefLengthF            = 0.025            ; define length of vec ref</div><div>  res@vcRefAnnoParallelPosF     = 0.999</div><div>  res@vcRefAnnoFontHeightF =0.005</div><div>  res@vcRefAnnoString2   =&quot; &quot;</div><div>  res@vpHeightF   = 0.15</div><div>  res@vpWidthF   = 0.8</div><div><br></div><div> ;res@tmYLLabelFontColor = line_col1    ;</div><div><br></div><div>;;;;;;;;;;;;;;;;;;;;add text TEST / OBS;;;;;;;</div><div>    res_text               = True</div><div>    res_text@txFontHeightF = 0.01</div><div>   </div><div>    m1 = &quot;TEST&quot;</div><div>    m2 = &quot;OBS&quot;</div><div><br></div><div> ;;;;;;;;;;;;;;;;;resources for plot(0);;;;;;;;;;;;;;</div><div><br></div><div>  res0a=res</div><div>  res0a@tmXBMode =&quot;Explicit&quot;  </div><div>  res0a@tmXBValues  =(/5,29,53,77,101,125,149,<wbr>173,197/)</div><div>  res0a@tmXBLabels = (/&quot;5/2&quot;,&quot;5/3&quot;,&quot; 5/4&quot;,&quot;5/5&quot;, &quot;5/6&quot;,&quot;5/7&quot;,&quot;5/8&quot;,&quot;5/9&quot;,&quot;5/10&quot;<wbr>/)</div><div><br></div><div>  res0a@vcMonoLineArrowColor = True</div><div>  res0a@vcLineArrowColor = &quot;black&quot;</div><div>  plotA = gsn_csm_vector(wks, u10_new1a, v10_new1a,res0a)</div><div><br></div><div>  res0b=res</div><div>  res0b@tmXBMode =&quot;Explicit&quot;  </div><div>  res0b@tmXBValues  =(/5,29,53,77,101,125,149,<wbr>173,197/)</div><div>  res0b@tmXBLabels = (/&quot;5/2&quot;,&quot;5/3&quot;,&quot; 5/4&quot;,&quot;5/5&quot;, &quot;5/6&quot;,&quot;5/7&quot;,&quot;5/8&quot;,&quot;5/9&quot;,&quot;5/10&quot;<wbr>/)</div><div><br></div><div>  res0b@vcMonoLineArrowColor = True</div><div>  res0b@vcLineArrowColor = &quot;red&quot;</div><div>  plotB = gsn_csm_vector(wks, u10_new1b, u10_new1b,res0b)</div><div>   </div><div>   overlay(plotA,plotB)                      ; result will be plotA</div><div>   plot = plotA                           ; now assign plotA to array</div><div><br></div><div> gsn_text(wks,plot(0),m1,190,<wbr>10,res_text)</div><div> gsn_text(wks,plot(0),m2,190,<wbr>35,res_text)</div><div><br></div><div> draw(plot)</div><div>;frame(wks)</div><div>end</div></div><div><br></div><div><span style="font-family:&#39;lucida Grande&#39;,Verdana,&#39;Microsoft YaHei&#39;;line-height:23.8px"> How can I slove the problem?</span></div><div></div><br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>