<div dir="ltr">Hi John,<div><br></div><div>I think you have a units problem.  According to the documentation (<a href="http://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_vert_interp.shtml">http://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_vert_interp.shtml</a>), the vertical coordinate type of &quot;ght_agl&quot; is in units of [km].  Try running your code again with height_levels = (/ 1.0, 2.0, 3.0, 4.0 /) and see if that fixes it.  I have no idea why they wanted the interp_levels argument in units of [km], but that&#39;s what the underlying Fortran routine expects.</div><div><br></div><div>If that doesn&#39;t help, I&#39;ll try to dig in a little further.</div><div><br></div><div>Hope this helps,</div><div><br></div><div>Bill</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 2, 2017 at 9:03 AM, Trostel, John M. <span dir="ltr">&lt;<a href="mailto:john.trostel@gtri.gatech.edu" target="_blank">john.trostel@gtri.gatech.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr" style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">I am trying to use the wrf utility &quot;wrf_user_vert_interp&quot; to interpolate some WRF output to heights AGL<br>
</p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</p>
<blockquote style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;margin:0px 0px 0px 40px;border:none;padding:0px">
<div>    u  = wrf_user_getvar(a,&quot;ua&quot;,-1)        ; u averaged to mass points</div>
<div>    v  = wrf_user_getvar(a,&quot;va&quot;,-1)        ; v averaged to mass points</div>
<div>    z  = wrf_user_getvar(a, &quot;z&quot;,-1)        ; grid point height</div>
<div>  printVarSummary(u)</div>
<div>  printVarSummary(v)</div>
<div><br>
</div>
<div>; The specific height levels that we want the data interpolated to.</div>
<div>; And interpolate to these levels</div>
<div>  height_levels = (/ 1000., 2000., 3000., 4000. /) ; height levels to plot - in meter</div>
<div>  nlevels       = dimsizes(height_levels)     ; number of height levels</div>
<div><br>
</div>
<div>  u_plane  = wrf_user_vert_interp( a,u,&quot;ght_agl&quot;,height_levels,<wbr>False)</div>
<div>  v_plane  = wrf_user_vert_interp( a,v,&quot;ght_agl&quot;,height_levels,<wbr>False)</div>
</blockquote>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">
<br>
When I try to plot the new wind vectors at these levels I get the error:<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">
&quot;warning:VectorPlotInitialize: no valid values in vector field; VectorPlot not possible&quot;<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">
and get an empty vector plot (the contour plot is fine).  Any clue why this happens?<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">
<br>
</div>
<blockquote style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;margin:0px 0px 0px 40px;border:none;padding:0px">
<div>do level = 0,nlevels-1                 ; LOOP OVER LEVELS</div>
<div><br>
</div>
<div>      height = height_levels(level)</div>
<div>      height = height*3.2084</div>
<div><br>
</div>
<div>    ; Add some level into to the plot</div>
<div>      res@PlotLevelID = height + &quot; ft&quot;<br>
</div>
<div><br>
</div>
<div>  opts = True                                  ; Set some Basic Plot options<br>
</div>
</blockquote>
<blockquote style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;margin:0px 0px 0px 40px;border:none;padding:0px">
<div><br>
</div>
<div>  ter = wrf_user_getvar(a,&quot;HGT_M&quot;,0)           ; Read the variable to memory</div>
<div>  ter_zoom = ter(y_start:y_end,x_start:x_<wbr>end)   ; need (:, for z-data</div>
<div><br>
</div>
<div>  ter_zoom = ter_zoom*3.2084</div>
<div><br>
</div>
<div>  ter_zoom@units = &quot;feet&quot;</div>
<div><br>
</div>
<div>  opts@cnFillOn = True                          ; Create a color fill plot</div>
<div>  opts@ContourParameters = (/ 0., 10000., 200. /) ; Set the levels</div>
<div><br>
</div>
<div>  contour_zoom = wrf_contour(a,wks,ter_zoom,<wbr>opts)</div>
<div>  delete(opts)</div>
<div><br>
</div>
<div>    ; Plotting options for Wind Vectors                 </div>
<div>      opts = res          </div>
<div>      opts@FieldTitle = &quot;Wind&quot;   ; overwrite Field Title</div>
<div>      opts@NumVectors = 50       ; wind barb density</div>
<div>      vector = wrf_vector(a,wks,u_plane(it,{<wbr>height_levels(level)},y_start:<wbr>y_end,x_start:x_end),v_plane(<wbr>it,{height_levels(level)},y_<wbr>start:y_end,x_start:x_end),<wbr>opts)</div>
<div>      delete(opts)</div>
<div><br>
</div>
<div><br>
</div>
<div>    ; MAKE PLOTS                                       </div>
<div>      plot = wrf_map_overlays(a,wks,(/<wbr>contour_zoom,vector/),pltres,<wbr>mpres)</div>
<div><br>
</div>
<div><br>
</div>
<div>    end do      ; END OF LEVEL LOOP</div>
</blockquote>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">
<br>
<br>
​<br>
</div>
<p><br>
</p>
<p><br>
</p>
<div id="m_6156552649197808351Signature">
<div name="divtagdefaultwrapper">
--
<div>John Trostel<br>
Director - Severe Storms Research Center<br>
Georgia Tech Research Institute<br>
Atlanta, GA 30332-0857</div>
</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>