The WXP shell program initally provided a simple text menu interface to WXP. This program is NOT needed in order to run WXP and today is often not used. However, it is a good starting point to using WXP.
NOTE: WXP is a highly tailorable software platform so some of the prompts and menus may not appear exactly as they are shown in the tutorials or in the User's Guide.
In order to run the WXP shell. run:
% wxp
When invoked, a menu will be printed and a prompt will appear:
WXP: The Weather Processor - version 5.0-X11
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> _
The menu is layered into several submenus. The submenus will invoke individual WXP programs. The WXP shell prompt will denote you are in the shell and not within a program.
From the main menu, submenus can be selected which in turn allow the user to access individual WXP programs. The submenus break the WXP programs down into programs that parse text data or produce graphical plots. Here is a list of the logical groups of WXP programs:
To enter any of the submenus, you just type the number listed in front of the menu item. For example, if you want to plot data, you enter:
WXP-main> 2
At any point in the menus, 0 will back you up one menu level and -1 will exit the WXP shell.
Now, let's walk through three examples, one to parse data, a second to plot data and a third to contour the data. After that, you are encouraged to spend some time wandering through the menus.
At the main menu, type 1 for Parsing programs:
WXP-main> 1
The following submenu is displayed:
Parse Data Menu
1: Parse Surface Data
2: Parse Series of Surface Data
3: Parse Upper Air Data
4: Parse MOS Air Data
5: Parse Forecasts
6: Parse Text Data
---------------------------
0: Return to previous menu
-1: Exit WXP shell
WXP-parse>
The new prompt will you which submenu your are in. In this case, the parse submenu. Now lets parse surface data:
WXP-parse> 1
At this point, you will transfer from the shell to the WXP program to parse surface data (sa_parse).
Running: sa_parse -if=cvt
HOURLY FILE SURFACE OBSERVATION PARSER (Ver 5.0-X11)
List of available files:
/noaaport/nwstg/convert/01061800_sao.wxp
/noaaport/nwstg/convert/01061801_sao.wxp
...
/noaaport/nwstg/convert/01062020_sao.wxp
/noaaport/nwstg/convert/01062021_sao.wxp
/noaaport/nwstg/convert/01062022_sao.wxp
Enter the surface filename:
Each WXP program will prompt you for information. The first piece of information required by most WXP programs is a data file to parse, plot or contour. Depending on the system setup, there may be several days worth of data online so you'll see the list scroll by on the screen.
There are several ways in which you can enter the filename:
Enter the surface filename: 01062022
The program will then prompt you for a specific station to search for:
Enter the station:
At this point, you want to enter a station identifier (4 letter) to parse for:
Enter the station: KPHL
This will cause the program to search through the data file you specified for the station you requested.
ID TIME T TD RH DIR SPD GST ALT SLP VIS CIL COV WX MAX MIN PR6 PR24 SC KPHL 2154 88 70 55 220 9 008 184 10 50 FEW
Once the data has been parsed, the program will exit and return to the WXP shell and display the parse menu again.
Parse Data Menu
1: Parse Surface Data
2: Parse Series of Surface Data
3: Parse Upper Air Data
4: Parse MOS Air Data
5: Parse Forecasts
6: Parse Text Data
---------------------------
0: Return to previous menu
-1: Exit WXP shell
WXP-parse> _
Now, to return to the main menu, type 0:
WXP-parse> 0
Now, let's type 2, the Plotting programs option:
WXP-main> 2
We are now in the plotting submenu:
Plot Data Menu
1: Plot Surface Data
2: Plot Surface Meteograms
3: Plot Upper Air Data
4: Plot Soundings
5: Plot MDR Radar Data
6: Plot NOWRad Data
7: Plot Lightning Data
8: Plot MOS Data
9: Plot MOS Meteograms
10: Plot Maps
---------------------------
0: Return to previous menu
-1: Exit WXP shell
WXP-plot>
Lets plot surface data so select 1 from the menu to plot surface data:
WXP-plot> 1
This will now run the WXP program to plot surface data (sfcwx).
Running: sfcwx
SURFACE DATA PLOTTING (Ver 5.0-X11)
List of available files:
/noaaport/nwstg/convert/01061800_sao.wxp
/noaaport/nwstg/convert/01061801_sao.wxp
...
/noaaport/nwstg/convert/01062020_sao.wxp
/noaaport/nwstg/convert/01062021_sao.wxp
/noaaport/nwstg/convert/01062022_sao.wxp
Enter the surface filename:
This starts out looking alot like the surface data parsing program. Most of WXP is done this way to provide a consistent interface into the data.
You can enter the filename exactly the same way you did in the previous example:
Enter the surface filename: 01062022
Now for data plotting, you are not looking at data for a particular station but you want to plot data for many stations. It would be impossible to plot all the stations in the US or the world, so it is desirable to view data over small regions. The next menu prompts you to enter a region:
Region Menu
1: Contiguous US --------------------
2: New England 10: Western Canada
3: Atlantic 11: Eastern Canada
4: Southeastern 12: Northern Canada
5: Midwestern 13: North America
6: Southern Plains 14: Indiana
7: Northwestern 15: Lafayette
8: Southwestern
0: Return to previous menu -1: Exit program
Enter the region:
There are several ways to enter a region but we will concentrate on what is listed on the region menu. For this example we will pick the Atlantic region:
Enter the region: 3
The next item to pick is the actual parameter (WXP calls it variables) to plot. A variable menu will be displayed:
Variable Menu
1: All Data 12: Cloud Ceiling
2: Temperature 13: Cloud Cover
3: Dewpoint 14: Pressure Tendency
4: Wind Direction 15: 24 Hr Precip
5: Wind Speed 16: 24 Hr Maximum Temp
6: Wind Gust 17: 24 Hr Minimum Temp
7: Wind Barb 18: Snow Depth
8: Sea Level Pressure 19: Wind Chill Temp
9: Altimeter Setting 20: Heat Index
10: Present Weather 21: Relative Humidity
11: Visibility 22: Equiv Potential Temp
0: Return to previous menu -1: Exit program
Enter the variable:
There are more variables that can be plotted but this is a simple list of the most common variables. Lets select a temperature plot.
Enter the variable: 2
The program will now prompt you for either display or postscript hardcopy. If you have a postscript printer setup on your system, you could now print the map. For the most part, you will be wanting to view the data on your screen. For this you want to select display (d).
Display (D) or Postscript (P): d
At this point, a window will pop up on your display and the data will plot. In most cases a map will draw in red, then the data in green and finally a white box will draw around the plot and then labels will print above the plot. The text labels include the variable and its units in the upper left and the time of the data in the upper right.
Here is a sample output:
The output of the the surface data plotting program. The plot is Temperature.
Once the plot is finished, the program waits for you to exit the plot. WXP in this mode will not allow you to generate more than one plot at a time. In order to try out another variable, you must exit the plot. To do this, move the cursor into the WXP window and hit the Enter key on your keyboard. Once this is accomplished, the plot will clear, the window will disappear and variable menu will reappear.
You can plot another variable using the same technique listed above or return to the region menu with 0 or exit the program with -1. In WXP, you always use 0 to back up one level and -1 to exit out of the program. If you exit the surface plotting program, you will return to the Plotting data menu.
In order to contour, return to the main menu type 0:
WXP-plot> 0
Now, let's type 3, the Contouring programs option:
WXP-main> 3
We are now in the plotting submenu:
Contour Data Menu
1: Contour Surface Data
2: Contour Upper Air Data
3: Contour MOS Data
4: Contour ETA Model
5: Contour NGM Model
6: Contour AVN Model
7: Contour MRF Model
8: Contour PreExisting Grids
---------------------------
0: Return to previous menu
-1: Exit WXP shell
WXP-contour> _
Lets contour surface data so select 1 from the menu:
WXP-contour> 1
This will now run the WXP program to contour surface data (sfccalc).
Running: sfccalc
SURFACE DATA CONTOURING (Ver 5.0-X11)
List of available files:
/noaaport/nwstg/convert/01061800_sao.wxp
/noaaport/nwstg/convert/01061801_sao.wxp
...
/noaaport/nwstg/convert/01062020_sao.wxp
/noaaport/nwstg/convert/01062021_sao.wxp
/noaaport/nwstg/convert/01062022_sao.wxp
Enter the surface filename:
Again, this starts out looking alot like the surface data parsing and plotting programs for consistency.
You can enter the filename exactly the same way you did in the previous example:
Enter the surface filename: 01062022
Now for data contouring, you also (like in plotting) have to select a region to contour. This is a bit more relevant since the data must be fit to a grid before they can be contoured. The grid is also defined by the region. The menu now prompts you to enter a region:
Region Menu
1: Contiguous US --------------------
2: New England 10: Western Canada
3: Atlantic 11: Eastern Canada
4: Southeastern 12: Northern Canada
5: Midwestern 13: North America
6: Southern Plains 14: Indiana
7: Northwestern 15: Lafayette
8: Southwestern
0: Return to previous menu -1: Exit program
Enter the region:
For this example we will again pick the Atlantic region:
Enter the region: 3
The next item to pick is the actual parameter (WXP calls it variables) to plot. A variable menu will be displayed:
Variable Menu
1: Temperature 11: 24 Hr Minimum Temp
2: Dewpoint 12: Snow Depth
3: Wind Speed 13: Wind Chill Temp
4: Wind Gust 14: Heat Index
5: Wind vectors 15: Relative Humidity
6: Sea Level Pressure 16: Equiv Potential Temp
7: Altimeter Setting 17: Convergence
8: Pressure Tendency 18: Moisture Convergence
9: 24 Hr Precip 19: Temperature Advection
10: 24 Hr Maximum Temp 20: Moisture Advection
0: Return to previous menu -1: Exit program
Enter the variable:
There are more variables that can be plotted but this is a simple list of the most common variables. Lets select a temperature plot.
Enter the variable: 1
The program will now prompt you for either display or postscript hardcopy.
For this example, you want to select display (d).
Display (D) or Postscript (P): d
At this point, a window will pop up on your display and the data will be read in and fit to a grid:
Reading the city database file... Date: 2200Z 20 JUN 01 Reading in data from converted file... Fitting to grid... Contouring data for Surface Temperature (F) Maximum value: 90.351807 Minimum value: 67.567680 Enter the contour interval:
Since we are contouring data, a contour interval must be specified. The contour interval specifies which values are to be contoured. In most cases, the contours fall on even multiples of the contour interval. In other words, if the contour interval is 6, a contour will represent all the points on the grid where the values are equal to 0. Another contour at 6, another at 12 and so on. To make a decent guess at an appropriate contour interval, the maximum and minumum values of the grid are display:
At this point, you can either pick a decent contour interval or enter 0 in which the program will select one for you. You can figure out a decent interval by looking at the range of the data (approximately 33 in this case) and picking a number which is around 1/10th of the range. So we will pick 3.
Enter the contour interval: 3
Next we must select a type of plot. WXP offers several different types but the primary types are color fill and line contours.
Color fill (C) or Line (L) contours:
Line contours are just the lines at each contour value. Fill contours fill in each area between contour lines with a different color. So one color will represent all values in the grid between 0 and 3. The next color will represent all values between 3 and 6 and so on. Fill contours don't print well on black and white laser printers so it is often recommended to use line contours when printing. So we will enter C for color fill:
Color fill (C) or Line (L) contours: C
Now the contouring will procede in the window that opened earlier.
Here is a sample output:
The output of the the surface data contouring program. The plot is Temperature.
The contours will be filled with a rainbow like color pattern. The coldest (lowest) values will be in a purple or magenta. The colors will go through blue, cyan (a blue-green), green, yellow and then red for the warmest values.
NOTE: If you select a contour interval that is too small, the color fill colors will be reused. In other words, the colors will go through magenta to red and then back to magenta again. Sometimes this can be confusing so it is preferable to use larger contour intervals.
Once the contouring is finished, the contours are labeled (roughly every other contour line), the local maxima and minima are labelled and the map is drawn in black. Finally, as with the plotting programs, a white box appears around the plot and plot labels are printed. The text labels include the variable and its units (upper left), the valid date (upper right), the selected contour interval (lower left) and the mimimum (LO:) and maxmium (HI:) of the grid.
Once the plot is finished, the program waits for you to exit the plot. To clear the plot and return to select another variable, hit the Enter key on your keyboard. Once this is accomplished, the plot will clear, the window will disappear and variable menu will reappear.
You can plot another variable using the same technique listed above or return to the region menu with 0 or exit the program with -1. If you exit the surface contouring program, you will return to the Contouring data menu.
To exit the WXP shell, you can type -1 or exit from a WXP shell prompt.
You can play around with the WXP menus to look at other display possibilities. A list of commands that can be entered from the WXP shell prompt can be found in the discussion of the WXP shell in the Program Reference section.
The next tutorial looks at using WXP programs from the command line, and starts to explore the relationship of how programs use resources for customization.
For further information about WXP, email technical-support@weather.unisys.com
Last updated by Dan Vietor on June 20, 2001