[ncl-talk] After using wrf_user_vert_interp - warning:VectorPlotInitialize: no valid values in vector field; VectorPlot not possible

Bill Ladwig ladwig at ucar.edu
Tue May 2 10:06:27 MDT 2017


Hi John,

I think you have a units problem.  According to the documentation (
http://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_vert_interp.shtml),
the vertical coordinate type of "ght_agl" 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's what the underlying Fortran routine expects.

If that doesn't help, I'll try to dig in a little further.

Hope this helps,

Bill

On Tue, May 2, 2017 at 9:03 AM, Trostel, John M. <
john.trostel at gtri.gatech.edu> wrote:

> I am trying to use the wrf utility "wrf_user_vert_interp" to interpolate
> some WRF output to heights AGL
>
>
>     u  = wrf_user_getvar(a,"ua",-1)        ; u averaged to mass points
>     v  = wrf_user_getvar(a,"va",-1)        ; v averaged to mass points
>     z  = wrf_user_getvar(a, "z",-1)        ; grid point height
>   printVarSummary(u)
>   printVarSummary(v)
>
> ; The specific height levels that we want the data interpolated to.
> ; And interpolate to these levels
>   height_levels = (/ 1000., 2000., 3000., 4000. /) ; height levels to plot
> - in meter
>   nlevels       = dimsizes(height_levels)     ; number of height levels
>
>   u_plane  = wrf_user_vert_interp( a,u,"ght_agl",height_levels,False)
>   v_plane  = wrf_user_vert_interp( a,v,"ght_agl",height_levels,False)
>
>
> When I try to plot the new wind vectors at these levels I get the error:
>
> "warning:VectorPlotInitialize: no valid values in vector field; VectorPlot
> not possible"
>
> and get an empty vector plot (the contour plot is fine).  Any clue why
> this happens?
>
> do level = 0,nlevels-1                 ; LOOP OVER LEVELS
>
>       height = height_levels(level)
>       height = height*3.2084
>
>     ; Add some level into to the plot
>       res at PlotLevelID = height + " ft"
>
>   opts = True                                  ; Set some Basic Plot
> options
>
>
>   ter = wrf_user_getvar(a,"HGT_M",0)           ; Read the variable to
> memory
>   ter_zoom = ter(y_start:y_end,x_start:x_end)   ; need (:, for z-data
>
>   ter_zoom = ter_zoom*3.2084
>
>   ter_zoom at units = "feet"
>
>   opts at cnFillOn = True                          ; Create a color fill plot
>   opts at ContourParameters = (/ 0., 10000., 200. /) ; Set the levels
>
>   contour_zoom = wrf_contour(a,wks,ter_zoom,opts)
>   delete(opts)
>
>     ; Plotting options for Wind Vectors
>       opts = res
>       opts at FieldTitle = "Wind"   ; overwrite Field Title
>       opts at NumVectors = 50       ; wind barb density
>       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)
>       delete(opts)
>
>
>     ; MAKE PLOTS
>       plot = wrf_map_overlays(a,wks,(/contour_zoom,vector/),pltres,mpres)
>
>
>     end do      ; END OF LEVEL LOOP
>
>
>
>>
>
>
> --
> John Trostel
> Director - Severe Storms Research Center
> Georgia Tech Research Institute
> Atlanta, GA 30332-0857
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170502/8e228623/attachment.html 


More information about the ncl-talk mailing list