WXP version 5
User's Guide

Vector Plotting

Vector plotting uses two grid fields to accommodate the X and Y components of the vector. For the most part, this is the U and V wind component grids. To visualize the vector grids, there are the following plot types:

Plot Type Description
vect Plot wind vectors
barb Plot wind barbs
strm or stream Plot streamlines

Vector Plots

Vectors start at the grid location and point in the direction the wind is blowing to. The length of the vector is dependent on its speed. All vectors are scaled so that the largest wind vector is equal to one grid spacing.

When looping wind vector plots, it should be noted that since the wind vectors are scaled to the highest wind speed, the vector lengths for the same wind speed could change from one frame to the next. Use the con_base resource to lock a specific length to a specific speed. The contour base value sets a wind vector of that speed to one grid spacing, thus locking in a length to speed relationship. Remember to pick a value close to the maximum speed or the vectors may be too large or too small.

The plot_scale resource will the vectors if they are too small to read or if the grid spacing is too small as is the case with most of the model data.  If this is the case, it is recommended not to plot all wind vectors.  The wv_skip=xskip[,yskip] plot parameter force the plotting to skip every skip vectors. Then it might be necessary to set the plot scale to the skip factor in order to make the vectors more readable. A sample is:

   sfccalc -cu=la -re=mw -va=vect -de=d

Vector Bar

To label the wind vector plot, a vector bar can be plotted. By default, only the maximum speed is displayed in the lower right corner of the plot. A vector bar is an arrow representing the largest arrow/vector on the plot along with its value. This can be enabled with the "vbar" plot parameter.

Wind Barbs

Wind barbs start at the grid location and point in the direction the wind is blowing from. This uses a standard wind barb where a full barb represents 10 for whatever parameter is being displayed. A sample is:

   sfccalc -cu=la -re=mw -va=wind[knt] -pl=barb -de=d

Streamlines

Streamlines show the full continuous flow of the vector field that is often used to display winds. The streamline algorithm starts a streamline out of the center of each grid box. The streamline continues until it reaches a maximum length, reaches a grid box with too many streamlines already in it or when the streamline makes more than a 90 degree turn in either direction.

The length of the streamline is set so that it is roughly the length from one end of the domain to the other. The maximum length can be controlled by the plot_scale parameter. The number of  streamlines within a grid box is controlled by the con_base resource. The streamline algorithm automatically doubles the grid for this computation. The default is one streamline per grid box but this is roughly 2 since the grid is doubled. Setting the contour base to 2 would double the number of streamlines on the plot.

In order to thin out the streamlines, the wv_skip plot parameter can be invoked. Setting this to 2 would start streamlines out of every other grid box. Since model grids are so dense, it is recommended to set the vector skip parameter to make the streamlines more readable.

The arrows on the streamlines can become rather small to view on large plot domains. There is a streamline scale factor plot parameter "strm_sc=scale" which is used to determine the distance between arrows and the size of the arrows.

A sample is:

   sfccalc -cu=la -re=mw -va=wind[knt] -pl=stream -de=d

U, V Component Computation

There are two methods for computing U and V wind components. The first method is the compute U as the easterly component of the wind and V as the northerly. This is the default for WXP if the U and V components are individually computed using the uwnd and vwnd variable specification. The second method is compute U and V relative to the grid where U is the component to the right on the grid and V is towards the top of the grid. This can be specified with either the uwndg or vwndg variable specification. A composite vector variable called wind is available in most applications, which are the grid relative winds.

The default for the vector plotting module is to use grid relative winds but this can be forced with the uvgrid plot parameter. If the U and V grids are east/west relative, use the uvew plot parameter to make sure the vectors are properly aligned to the domain.

Plot Attributes

Plotting attributes affect how the vectors will be plotted. The types of attributes available include color, style, and width.

Resources

The color, line width, text size and scale factor can be set with the following resources:

Variable Specification

Other attributes can be changed when specifying the variable or in the variable file.  When specifying a variable, the following syntax is used:

[time:level]varname[[units[:attributes...]]]

The time and level parameters are the same as can be specified with the time and level resources. These are often specified with these resources and therefore are optional. The units and attributes are surrounded with brackets "[  ]".

Units

The input data will have a specific set of units that can be modified by specifying the units within the brackets.  For example, to change the temperature to Celsius:

   -va=wind[knt]

The list of available unit conversions is in the units.lup file (See the units conversion section of the Users Guide).  

Attributes

The attributes are listed after the units.  Multiple attributes can be specified separated by colons ":".  For example, to plot temperature in C, using blue line contours:

   -va=wind[knt:vect:co=blue]

Here is a list of available attributes to specify:

Attribute Description
type The type of plot: vect, barb, stream
mx=max Specifies the maximum value in the contour plot. All values greater than this value will not be plotted.
mn=min Specifies the minimum value in the contour plot.  All values less than this value will not be plotted.
co=color Specifies the color.  This is the color name from the color table.  If this is the first attribute, the "co=" may be omitted.
wi=width Specifies the width of lines.  This includes lines used in text and markers. The default value is 1.0.
st=style Specifies the style of lines.  Possible values are:
  • sol - solid lines (number 1)
  • dsh - dashed lines (number 2)
  • lsdsh - long short dashed lines (number 3)
  • llsdsh - long, long, short dashed lines (number 4)
  • dot - dotted lines (number 5)
  • # - a number corresponding to the above styles
sc=scale Specifies the scale factor. This will scale vectors and barbs and scales the maximum length of streamlines. The default value is 1.0.
ss=scale Specifies the streamline scale factor. Used to determine the distance between arrows and the size of the arrows. The default is 1.0.
cb=base Specifies the contour base which is used to determine how many streamlines go through a given grid box. The default value is 1.0.
in=intrvl Specifies a contour interval that is used to color vectors, barbs and streamlines.
sk=skip Specifies the wind vector skip factor. The default is 1.
vbar Specifies to plot the vector bar

Color based on Value

The color of the vectors, barbs and streamlines can be changed based on value of the speed.  This uses the same mechanism that the color fill contours use. If a contour interval (con_interval resource) is specified, the data will be colored and an optional color bar can be displayed. The minimum for the color fill attributes is 0.

   sfcwx -cu=la -re=mw -va=strm[knt] -in=2 -pp=bar


Last updated June 1, 1998