<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body 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 "wrf_user_vert_interp" 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,"ua",-1) ; u averaged to mass points</div>
<div> v = wrf_user_getvar(a,"va",-1) ; v averaged to mass points</div>
<div> z = wrf_user_getvar(a, "z",-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,"ght_agl",height_levels,False)</div>
<div> v_plane = wrf_user_vert_interp( a,v,"ght_agl",height_levels,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;">
"warning:VectorPlotInitialize: no valid values in vector field; VectorPlot not possible"<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 + " ft"<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,"HGT_M",0) ; Read the variable to memory</div>
<div> ter_zoom = ter(y_start:y_end,x_start:x_end) ; need (:, for z-data</div>
<div><br>
</div>
<div> ter_zoom = ter_zoom*3.2084</div>
<div><br>
</div>
<div> ter_zoom@units = "feet"</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,opts)</div>
<div> delete(opts)</div>
<div><br>
</div>
<div> ; Plotting options for Wind Vectors </div>
<div> opts = res </div>
<div> opts@FieldTitle = "Wind" ; overwrite Field Title</div>
<div> opts@NumVectors = 50 ; wind barb density</div>
<div> vector = wrf_vector(a,wks,u_plane(it,{height_levels(level)},y_start:y_end,x_start:x_end),v_plane(it,{height_levels(level)},y_start:y_end,x_start:x_end),opts)</div>
<div> delete(opts)</div>
<div><br>
</div>
<div><br>
</div>
<div> ; MAKE PLOTS </div>
<div> plot = wrf_map_overlays(a,wks,(/contour_zoom,vector/),pltres,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="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
--
<div>John Trostel<br>
Director - Severe Storms Research Center<br>
Georgia Tech Research Institute<br>
Atlanta, GA 30332-0857</div>
</div>
</div>
</body>
</html>