Enter a ZIP code to get a forecast:
Setup Location

WRN Logo

WXP Setup

Tutorial Notes

These tutorials are written for the Unix version of WXP. Even though most features in the Unix version are identical to the Windows version, there are some differences.   In some cases, DOS/Windows exceptions will be noted.  When scripts and shell commands are noted, they are for C-shell.  If you wish to use a login shell other than C-shell, you may have to convert some of the commands over to your particular shell type.  A good reference for this is Unix in a Nutshell by O'Reilly and Associates.  

To see what your login shell is, invoke the following command line from the shell prompt:

   printenv SHELL

The system will return the shell being used in the current login session. For example, if the current login session is using C-shell, the system will return:

   /bin/csh

Other shell types may be default, for example:

   /bin/bs  (Borne shell)
   /bin/ksh (Korn shell)
   /bin/tcsh (advanced C shell)
   /bin/bash (advanced Borne shell)  

If you have no specific reason for using a different shell from C-shell, we suggest setting your account to C-shell. Consult your system administrator for help in setting your account to default to C-shell.

There are a couple of environments these tutorials will be run in.  To distiguish which is being used, a % will be used for the C-shell prompt and WXP> will be used for the WXP shell prompt.


WXP Setup

The Unix version of WXP uses X-windows.  In order to display WXP plots, you need to start the X-windows system.  For most modern Unix systems, this is started by default.  Environments like CDE (Common Desktop Environment), OpenWindows (Sun's desktop), Gnome (comes with Linux) and KDE all start up X-windows when you log in.

For others you may have to run commands like xinit, openwin, or xwind.  You may want to consult your system administrator if you are unsuer how to use X-windows or of the command to start it up.

WXP Display

In order to tell WXP where to display the plots, the DISPLAY environment variable must be set.  In many cases, this is preset for you but you cannot assume that it is.  To make sure the DISPLAY environment variable is set, run:

   % printenv DISPLAY

You should get something like:

   unix:0

or

   wxp.company.com:0

If you get nothing, then DISPLAY is not set.  To set DISPLAY, run:

   % setenv DISPLAY unix:0

If you wish, you can put the full hostname in (like other.company.com) but this is only required if you want to display WXP plots on a machine other than the one you are currently logged into.  Again, if you have problems, consult your system adminitrator.

WXP Printing

If you wish to print WXP, you need to set up the wxpprint environment variable plus one other depending on the output type.  This may be setup for you.  To check the value, run:

   % printenv wxpprint

This should show a value like:

   hpgl

which specifies that the printed output will go to a HP laserjet type printer.   The other possibility is "ps" which is for postscript.   Then there are more variables that specify device parameters:

   wxphp_out=|lpr
   wxphp_param=lj,sz=10:7.5

The "wxphp_out" parameter specifies the device output so output will be piped to the line printer.   The second variable specifies parameters.  The "lj" parameter is used to properly rotate the output for a Laserjet printer.  The second specifies paper size at 10x7.5" to prevent truncation at the edges that laser printers tend to do.

Postscript output would look like:

   wxpps_print=|lpr
   wxpps_param=sz=10:7.5

NOTE: HPGL output is incomplete.  For example, there is no satellite or color output possible for HPGL.  You need to use the Postscript device for that type of output.  For some Unix systems such as Linux, the printer driver will automatically sense Postscript output and translate it to the appropriate output device. 

If these are not set, you should check with your system administrator to see what the correct setting is.

WXP Resources/Default Parameters

To make sure WXP knows where everything is, WXP uses a resource file.  When WXP is installed, a system wide resource file should be created.  This will be tailored by the system administrator to the type of data input WXP is using. 

You must make sure WXP can access this resource file by setting the wxpdefault environment variable.  This may be set up for your account.  To view the value, run:

   % printenv wxpdefault

This should show a value like:

   /home/wxp/etc

If this is not set, you need to set to the proper location.  The system administrator should know where this is.

Path to WXP Executables

In some cases, the WXP executable programs will be put into a location that your shell can find.  One common place is "/usr/local/bin".  In this case, you won't have to make any modifications.  To test, you can run the following command:

   % wxpdef .

and if this comes back "command not found", then you may need to add WXP to the path.  One way to do this is to add the location of the WXP executables the PATH environment variable:

   % setenv PATH /home/wxp/bin:$PATH

Of course, the actual location depends on where the system administrator put WXP.

Final Setup Check

Just check to see if the following environment variables are set:

  • DISPLAY
  • wxpdevice (plus wxphp_out/wxphp_param or wxpps_print/wxpps_param)
  • wxpdefault

NOTE TO SOLARIS USERS: You need to access the UCB libraries which are often not in the main library path. As a result, you may need to modify the following environment variable:

   setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/usr/ucblib

Where Setup Parameters Are Set??

In some cases, the system administrator will set these parameters up in the default shell setup script.  The location of these files are operating system dependent and only modifiable by the system administrator. 

In most cases, this will be left to the user's shell setup scripts.  So if they are not defined, they must be added so that they are setup for all future login sessions..   For C-shell, this will be either in your .login or .cshrc files in your home directory.


Test WXP

To test that WXP is working properly, run the following programs from a shell prompt:

   % wxpfile -if=sfc_dat -cu=la -ou=file,exist
   /noaaport/nwstg/data/00041021_sao.wmo exist

If the output is a correct filename with the word "exist" after it, then WXP can find the raw data. 

To test graphical output, run:

   % sfcwx -cu=la -re=us -va=all -de=d
         SURFACE DATA PLOTTING (Ver 5.014-LINUX-X11)

   Current filename: /noaaport/nwstg/convert/01062021_sao.wxp
   Reading the city database file...
   Date: 2100Z 20 JUN 01    

If a surface plot comes up on the screen, then WXP is working.   Hit return in the WXP window to close it out.


You are ready to run WXP

At this point, you should be ready to run WXP.  You can follow to the first tutorial , there are two ways to proceed depending on whether you will be installing WXP and setting up the data structures WXP requires, or whether that has been done and you simply want to display WXP products.


For further information about WXP, email technical-support@weather.unisys.com
Last updated by Dan Vietor on June 15, 2001