Data Plotting
The data plotting uses latitude and longitude values to locate data on a map using a specific projection. The data can either be a floating point value or a character string. When plotted, the data is reformatted based on specific formatting information.
Station Filtering
When plotting data, often the number of stations is more than can be plotted and still be readable. Therefore, a filtering mechanism must be employed.
Station priorities:
Eeach station in the city database is prioritized. The highest priority (0) represents the largest cities such as Chicago O'Hare and Los Angeles International. An effort has been made to keep these stations evenly spaced to provide the best plots. Priority 2, 3 and 4 stations fill in the gaps between the stations of higher priority. Priority 5 stations are near other reporting stations and priority 6 are within large cities such as Chicago' s Midway airport.
Priority | Description | Station Spacing | Domain Size |
---|---|---|---|
0 | Major cities | ~1000 km/10 deg | >100 |
1 | Major cities | ~500 km/5 deg | >50 |
2 | Major cities | ~250 km/2.5 deg | >25 |
3 | Smaller cities | ~125 km/1.25 deg | >12.5 |
4 | Small cities/towns | ~60 km/.6 deg | >6.25 |
5 | Stations nearby other higher priority stations | ~30 km/.3 deg | >3 |
6 | Stations within cities with higher priority station | ~10 km/.1 deg | <3 |
7 | Stations too close to other stations to plot | < 10km/< .1 deg | |
9 | Retired stations |
If the station does not exist in the station database, its location cannot be determined and therefore will not be plotted. The exceptions to this are ships and buoys where location is given as part of the report. In this case, the station is given a default priority of 4. To change this, use the loc_pr=prior plot parameter.
Automated priorities
For plotting, only the highest priority stations get plotted depending on the size of the domain. As the domain size decreases, the program will automatically include more stations, lowering the priority. The domain size is computed from the plot domain as:
domain_size = (ny-1)*dy
The priority associated with the computed domain size is listed in the table above.
Relative priorities
You can specify a relative priority that is based on the automatic priority computed from the domain size. By using "+" or "-" on the priority, it will modify the automated priority either higher or lower, respectively. For example, the domain size is computed at 15. The automatic priority is 3. If the station priority is "+1", the new automatic priority will be 4. Now if the plot size changes, the priority will always be one more than the computed automatic priority.
Station Data Plotting
The data used to plot is based on information that is observed or derived from observed data. In most cases this is a numeric value which is formatted into a string for plotting. For example, temperature is a numeric value. The data is plotted centered on the station.
In other cases, the data is already a string and is plotted using some plotting method such as using symbols. An example of text data is cloud cover that is a value such as "C" or "O" for clear or overcast. In these cases, there are special plot types to plot cloud cover symbols based on this data.
Plot Types
There are several plot types available to handle these types of data.
Plot Type | Description |
---|---|
data | The raw data value. ;If the value is text, it plots as is. If not, plots as number with format |
value | The numeric value with format |
plot | A plot of data (statlog only) |
int | Plot the numeric value as an integer |
text | The text value plotted as is. |
mark | Plot a marker such as a plus "+" at each station. The marker type is dependent on the data. Possible values are: dot, pnt, ., plus, +, star, *, crcl, circle, o, x, sqr, square, #, tri, triangle, ^, itri, itriangle, v |
cloud | Plot the data as a cloud cover symbol |
wbarb | Plot the data as a wind barb |
cbarb | Plot the data as a wind barb leaving room for a cloud cover symbol |
dbarb | Plot the data as a wind barb with a dot at the station location |
vbarb | Plot the data as a wind vector |
wx | Plot the data as a weather symbol. Symbol files can be specified for special symbols |
Plot Attributes
Plotting attributes affect how the data will be plotted. The types of attributes available include color, size, font, and location.
Resources
The color, line width, text size and scale factor can be set with the following resources:
- color_data - for general data plotting
- format - for specific formatting
- con_interval - for coloring plotted data
- con_base - for setting range and base color value
- parameter - for extra plotting parameters
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 listing the new units within the brackets. For example, to change the temperature to Celsius:
-va=temp[C]
The list of available unit conversions is in the units.lup file (See the units conversion section of the Users Guide).
The attributes are listed after the units. Multiple attributes can be specified separated by colons ":". For example, to plot temperature in C, upper right, in blue with one decimal place:
-va=temp[C,ur,co=blue,%.1f]
Here is a list of available attributes to specify:
Attribute | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
type | The type of plot: data, value, int, text, mark, cloud, wbarb, cbarb, dbarb, vbarb, wx | ||||||||||||||||||||||||
tx=text | Plot this text at each station location. | ||||||||||||||||||||||||
mk=type | Plot this type of marker at each station location. Possible values for type are: dot, pnt, ., plus, +, star, *, crcl, circle, o, x, sqr, square, #, tri, triangle, ^, itri, itriangle, v | ||||||||||||||||||||||||
%format | Specifies the printed format of the data. This is a full C format such as "%7.2f". The default is "%.0f" or zero decimal places. | ||||||||||||||||||||||||
fm=format | Specifies the printed format of the data but text can be added as well as the format. For example, "fm=%7.2fC". The default is "%.0f" or zero decimal places. | ||||||||||||||||||||||||
ul, uc, ur, tl, tc, tr, cl, cc, cr, bl, bc, br, ll, lc, lr | Specifies the plotting offset (select one)
Default is "cc". |
||||||||||||||||||||||||
xy=x:y | Specifies the absolute plotting offset. The X and Y values are multiplied by .012. | ||||||||||||||||||||||||
sz=size | Specifies the size of a data plot (statlog only) | ||||||||||||||||||||||||
mx=max | Specifies the maximum value in the plot. All values greater than this value will not be plotted. | ||||||||||||||||||||||||
mn=min | Specifies the minimum value in the plot. All values less than this value will not be plotted. | ||||||||||||||||||||||||
sf=file | Specifies the symbol file to use in interpretting the data. The string data is passed to the symbol plotting routine and this file is used to plot the actual symbol. | ||||||||||||||||||||||||
sk=skip | Specifies a plotting skip factor. If not all values are to be plotted, this skip factor can be specified to only plot every skip values. | ||||||||||||||||||||||||
rs=resource | Specifies to use the listed resource to obtain color/attribute values. This is useful if you want to change attributes on the command line. | ||||||||||||||||||||||||
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:
|
||||||||||||||||||||||||
fo=font | Specifies the font number. See the font_list resource. | ||||||||||||||||||||||||
fi=fill fp=fill |
Specifies the fill pattern. Possible values are:
|
||||||||||||||||||||||||
sc=scale | Specifies the scale factor. Most drawn data is scaled by this parameter. The default value is 1.0. | ||||||||||||||||||||||||
hi=height | This is the height of text and the size of markers. The default value is 1.0. | ||||||||||||||||||||||||
te=expan | Specifies the text expansion factor. This controls how wide text is plotted. An expansion factor greater than 1 results in fat text. A value less than 1 results in thin text. The default value is 1.0. | ||||||||||||||||||||||||
ta=HV | Specifies the text alignment in the horizontal (H)
and
the vertical (V). Possible values for H are:
Possible value for V are:
|
Color based on Value
The color of the plotted data can be changed based on value of the variable. 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 default minimum for the color fill attributes is 0 but this can be changed using the con_base resource.
sfcwx -cu=la -re=mw
-va=temp -in=3 -cb=30
-pp=bar:30:80
A color bar can be displayed but the range on the color bar has to be specified.
Plotting Symbols
WXP uses a variety of symbols to plot information (see below). Cloud
cover and wind
barbs/vectors are generated directly by WXP. Wind barbs and
vectors are adjusted to
true north on the projection. In other words, a wind barb representing
a north wind would
point towards the north on the projection and not towards the top of
the plot. Other
symbols such weather symbols are plotted based on a symbol file.
For
example,
weather symbols are in the wx.smb file.
Saving Raw Files
By default, plotting programs do not save raw data to file. In order to save to a raw file, you must explicitly specify the output with the out_file resource. For example:
-of=raw[:filename]
specifies to create ASCII raw files. The output filename is dependent on the particular raw name tag. For example, surface data uses the sfc_raw tag and the name convention is looked up in the name convention file:
sfc_raw %R/%v_%m%d%h.raw
with the output going into the directory pointed to by the raw_path resource. Often, the raw filename will contain the name of the variable (%v), level (%l) and forecast time (%f) in order to distinguish between raw files. It is recommended to include these parameters in the name convention.
If desired, the output filename can be specified with the out_file resource:
-of=sfcwx.raw
The filename is first used as a file name tag and if not found in the name convention file, used as a filename with the raw_path resource value prepended to the filename.
If the output is standard output, the "std" keyword can be used:
-of=std
If this is to be piped to another program, it is recommended to set the message level to "none" so that only the raw data displays. In most of these cases, the program is generating data for another program and thus does not need to plot the data. In these cases, it is recommended to turn off plotting with "-pl=none".
Last updated June 13, 2020