Each WXP program has a default set of actions. But in general, these actions won't be what the user wants. To control and tailor the output, a set of resources are available. These resources can be set in the following ways:
- Program defaults - a default setting within the program.
- Default resource file - a file, generally named "wxp.cfg", that stores a set of local defaults for each resource.
- Environment variables - each resource can be set through a environment variable. A typical environment variable starts with "wxp" and then the resource name, for example "wxpdefault".
- Command line - each resource can be set on the command line. In most cases, this is a key plus the value.; The default resource uses "-df" so it can be specified either as "-df=filename" or with a space "-df filename". The full resource name can also be used as in "-default=filename".
The programs set up a list of resources it will use. To obtain that list, the user can display online help with the "-h" option. Here is the output from "sfcplot -h":
sfcplot: This program plots surface data sfcplot syntax (version:6.65-LINUX-X11) sfcplot [options...] Keyed options... -df file... Resource/defaults file name -na name Program name -h Print help -me level Message level -fp path File path -dp path Data path ... -cocl color Contour label color -cofl color Contour label color for fill plots -cofm color Map color for fill plots -cofg color Grid color for fill plots -de device Device type and params -ge geometry Window geometry -ti title Window title -ic Specify window icon mode -bg color Background color -iv Inverse colors -lo logo Logo overlay Positional options... filenames... Filenames
The help first lists the name of the program and a brief description. The second line gives the version of WXP (6.0), the binary type (for Linux workstations) and the graphics type (X11 is X windows). The following lines briefly explain the keyed and position parameters to the program to be invoked on the command line. For simplicity, only the command line syntax is given but each key is unique to a resource. So "-df" is the "default" resource. To get more information on these, consult the program and resource reference.
The programs use the resources to derive the final product. These resources define the location of data, naming conventions, the computation to be performed and the look and feel of the output.
The input to the programs is generally some specific type of meteorological data. WXP doesn't group all data into a generic type and provide a single program to access it. WXP realizes that some data types require special treatment and as a result, programs have been developed around the data such as for surface data, upper air data and model grid-point data.
The output of the program can be other data files as with decoders, textual as with parsers or graphical as with the plotting programs. The graphical output can either be to a window such as with X windows, or a Postscript or HPGL file for printing, or an image file such as GIF or PNG.
WXP programs attempt to provide a consistent interface for setting up the programs, interacting with the programs, and finally the output of the programs.
Last updated January 2021