Enter a ZIP code to get a forecast:
Setup Location

WRN Logo

WXP

Sections

NAME

wxp - The WXP shell

SYNOPSIS

wxp [parameters] [command]

PARAMETERS

Command Line Resource Default Description
-h help No Lists basic help information.
-df=filename default .wxpdef Sets the name of the resource file.
-na=name name wxp Specifies the name used in resource file parsing.
-ba batch No Run program in batch mode
-me=level message out2 Specifies level of messages to be displayed.
-pa=parameter parameter none Specifies additional parameters.
command command none
User prompt
Specifies a command to run.

DESCRIPTION

The WXP shell provides a simple interactive environment for access to the various WXP programs via a set of nested menus. The shell initializes several parameters including the initial environment and menu setup. It then runs any commands listed on the command line. Command line commands are run and then the shell exits. Otherwise, the shell will prompt the user for the programs to run by listing a menu of commands or submenus. The shell prompt lists the current menu level name as part of its prompt. For example, the initial prompt will read "WXP-main>":

   WXP: The Weather Processor - version 5.0-X11
     Copyright: Purdue Research Foundation
        Purdue University, 1989-1996

       Main Menu 

    1: Parsing Programs
    2: Plotting Programs
    3: Contouring Programs
    4: Meteorological Calculations
   ---------------------------
    0: Return to previous menu
   -1: Exit WXP shell

   WXP-main> 

If the user selects the plotting submenu by hitting "2", the following menu and prompt will appear:

    Plot Data Menu

    1: Plot Surface Data
    2: Plot Surface Meteograms
    3: Plot Upper Air Data
    4: Plot Soundings
    5: Plot ETA Model Soundings
    6: Plot MDR Radar Data
    7: Plot NOWRad Data
    8: Plot Lightning Data
    9: Plot MOS Data
   10: Plot MOS Meteograms
   11: Plot Maps
   ---------------------------
    0: Return to previous menu
   -1: Exit WXP shell

   WXP-plot> 

A list of menu items will be displayed after every user command unless the user turns the menu listing off with the "menu off" command. By making a selection from the submenus, a WXP program will be run.  For example, selecting "1" will print "Running: sfcwx" and then run the program:

   Running: sfcwx
         SURFACE DATA PLOTTING (Ver 5.0-X11)

   List of available files:
   /usr/local/data/convert/96110800.cvt  /usr/local/data/convert/96110801.cvt
   ...
   /usr/local/data/convert/96111120.cvt  /usr/local/data/convert/96111121.cvt
   /usr/local/data/convert/96111122.cvt  /usr/local/data/convert/96111123.cvt

   Enter the surface filename:

The WXP program will have a set of menus that the user can select from. These menu prompts will not start with "WXP-". If the user exists the program, control is return to the WXP shell and a shell prompt will display. You can run other programs or change menus. By convention, the menu item "0" goes back one menu level and "-1" exits the shell.

The user can supply command line parameters to the WXP programs by listing them after the menu item number. For example, "1 -cu -me=out4".  In other words, the shell converts the "1" to the string "sfcwx" and anything else specified is passed along to "sfcwx".  For example:

   1 -cu=la -re=mw -va=all -de=d

At any time, you can run any existing command on the system. In other words, the WXP shell behaves like a simplified shell like C-shell.  For example, you can run "ls -las" or invoke editors such as "vi" directly from the WXP shell.  The shell first checks to see if the command you entered starts with a number (hence a menu selection) or is one of the internal shell commands like "set".  If it isn't one of these, it attempts to run the command as listed. The shell also allows the user to set environment variables and to run simple shell scripts.

SHELL COMMANDS

The following provides a short list of WXP shell commands that can be used to help the user manipulate various program parameters.

back Goes up one menu level
case Lists all available cases
case name Enables a specific case. Parameters are listed in the case.lup file.
exit or quit Exits the WXP shell.
help This command displays a brief explanation of each WXP shell command.
menu This command prints the currently selected menu.
menu on Turns on the automatic listing of the menu choices. When menu listing is on, the current menu will be printed after every command completes execution.
menu off Turns off the automatic listing of menus. When menu listing is off, the current menu will be printed only if the "menu" command is executed. The shell prompt lists the current menu name in order for the user to easily determine what menu has been selected.
set var value This shell command sets the value of an environment variable where var is the name of the variable to be set and value is the new value for that variable. If the variable does not exist, it will be created and its value set to value.
set or show This command lists the current settings of established environment variables. This will list the variable name followed by an equal sign and then list the value for that variable. For example:

wxpfile=/atms/bin

where wxpfile is the name of the environment variable and its value is /atms/bin.
uncase Unsets case study, resets the shell to using default data.
unset variable
This command removes an environment variable where variable is the name of the variable to be deleted.
nn The menus and programs may be selected by typing in the appropriate item number nn listed in the selected menu at the prompt. The menu item 0 always returns to the previous menu level. The menu item -1 exits the WXP shell directly from any submenu.
command [arg ...] When entering the name of a non-WXP shell command, the shell will execute the program command if that program's executable file is found in the search path defined by the "PATH" environment variable. The program will use any command line arguments arg... listed after the command. If the program is a WXP program, the selected menu will change to reflect the location of that program within the WXP submenus when the program exits.

Case Studies

The WXP shell has a case study interface which sets up resources (via environment variables) specific for each case study.  You can list the case studies by running the "case" command:

   *** Tornadoes ***
   in_torn         - Indiana Tornados on (2 Jun 1990)
   laf_torn        - Lafayette Tornado on (26 Apr 1994)
   ill_torn        - Lafayette Tornado on (9 May 1995)
   ...

There is a header line which can be used to organize the case studies.  The name listed (such as "in_torn" is used with the case command to set the appropriate case.  Once the case has been selected, the WXP prompt will change showing the case:

   WXP-main> case 90_snow
   Running Case: Cyclone Occlusion over Midwest (3 Dec 1990)

       Main Menu
   ...

   WXP-main[90_snow]> 

From this point forward, when you run WXP programs, they will point to data in the case study directory rather than the real-time data directory.

To go back to using real-time data, use the "uncase" command.  The prompt will go back to normal reflecting the change.

FILES

SEE ALSO


For further information about WXP, email technical-support@weather.unisys.com
Last updated by Dan Vietor on Aug 31, 1997