The ability to specify a specific parameter to plot is generally the last major item to determine. Variables can be those contained in the input files or a hybrid variable based on the simple variables. WXP provides a large range of functions to generate new variable types.
The simple variables are determined by input file type. The hybrid variables are determined through use of a variable file. This file can be used to create hybrid variables as well as specify plot information such as color, maps, and multi-panel plots. Variables can be aliased to other variables if needed. Each plotting program has an associated variable file.
There are several methods for specifying variables. The simplest is to specify one of the base variables for each program. For example:
This will plot temperature. To modify the units of a particular variable, just put the desired units after the variable name in brackets "":
This will convert the units to degrees F. The parameter information can be more extensive:
This will contour temperature in degrees C with a 2 degree interval.
To simplify the specification, provide the alias as listed in the var file.
temp Temperature 1 +temp [F]
In this case, you would specify "temp". This will plot the simple variable "temp". Simple variables are specified by a "+" prefix. From the var file, the default plot parameters are to plot the temperature in F (Fahrenheit).
To modify the units of a particular variable, just put the desired units after the variable name separated by a colon ":":
Enter the variable: temp:C
The plot parameter information can be more extensive:
Enter the variable: temp:C:cf:in=5
In addition to changing the units, the plot type is set to color fill with a contour interval of 5.
Hybrid variables can also by specified for the variable resource:
Enter the variable: conv(wind)
which will compute the convergence of the real winds. The value of wind is aliased in the var file to the U and V wind components specified as a vector quantity. You can generate vector quantities with some functions:
Enter the variable: grad(temp)
This will compute the gradient of temperature. Then by specifying a plot type of vectors, the vector field will be plotted.
Variables in GRIB files
The variables in a GRIB file are specified using a single number that is cross-referenced to a simple variable in the variable.lup lookup file. In this file, the numbers from 1-255 are reserved for GRIB parameters. Numbers above 255 are user configurable.
8 hght Height 11 temp Temperature
This file can be used to access GRIB products not normally in the Family of Services feed. In some cases, the simple variable can mean many different GRIB variables. A good example of this is pressure where there are 4 possible pressure values. In this case, the lookup file contains the possibilities separated by commas:
1,2,128,129,130 pres Pressure
This way, the value "pres" can be used to capture all of these possible GRIB pressure products.
To get a feel for what is needed to correctly specify a variable in a GRIB file, use the griblook program. By setting the message level to out3 a listing of the parameters is printed out:
448: 12 hour NAM valid 12Z MON 29 SEP 97-500 mb Abs vorticity (/s)
Model: ETA Time: 12hr Level: 500mb Variable: avort Units: /s
The specific time, level and variable name are listed. You can use these directly in programs like grbcalc.
For more information on the variables available, see variable.lup
Updated January 2021