Enter a ZIP code to get a forecast:
Setup Location

WRN Logo

WXP Resources And The Wxp.res file

  1. What Are WXP Resources
  2. What Is The Wxp.res File?
  3. Wxp.res File Syntax
  4. Overall Tutorials Table Of Contents

1. What Are WXP Resources

Resources are option settings for WXP programs. Each WXP program is compiled with a set of default values for resources the program needs set to allow it to function. The default values can be changed by specifying new settings on the command line (if a WXP program is executed from a UNIX prompt), or by setting them in a resources file called Wxp.res.

2. What Is The Wxp.res File?

The Wxp.res file contains a list of resources used by WXP programs to allow them to function properly. When WXP is built and installed, a copy of a generic Wxp.res file is placed in the etc/ directory of the WXP account. This file effectively sets up site specific default values for resources.

The WXP account is an account set up for the WXP software. The local WXP administrator should set up this account and configure the Wxp.res file contained there. A backup copy of the Wxp.res file should be kept in case of loss or re-installation of WXP. The WXP administrator should make sure this site version of the Wxp.res file is edited to reflect the local implementation of the LDM data structure and WXP installation.

WXP programs find the Wxp.res file using the UDRESPATH environment variable defined in a user's login environment. Resources required by all the site users and site scripts can be appended to the Wxp.res file in the WXP account. A user can keep custom resources in their own Wxp.res file kept in their home directory. Ask the WXP administrator for the location of the site Wxp.res so you can set your UDRESPATH.



3. Wxp.res File Syntax

Let's now look at the Wxp.res file that comes with the distribution and is copied into the etc/ directory of the WXP home account during installation. Table 2 in the WXP Users Guide lists the WXP resources (table 2 is after section 3.4.) Program pages in the Program Reference show which resources are used by each program.

The header of the site-wide Wxp.res file in the etc/ directory contains some general information:

   #######################################################################
   #
   # Wxp.res MAIN RESOURCES FILE
   #
   # This is the main Wxp.res file and has global setups for WXP. WXP 
   # looks for Wxp.res files via the UDRESPATH variable set in your 
   # .cshrc file. The entry should look like:
   #
   #  setenv UDRESPATH ${HOME}:/usr/local/ldm/etc
   #
   # or
   #
   #  setenv UDRESPATH ${HOME}:/usr/local/wxp/etc
   #
   # dependent on whether WXP4.8 has been built in the LDM account or as a
   # separate user. The UDRESPATH is searched right to left. The first copy
   # of Wxp.res found (should be this one in the etc/ directory of the 
   # installation) is loaded. Further copies found as the path unfolds are
   # appended to or overwrite resouces (if the same resource name occurs).
   # Thus a user can change resources by putting a Wxp.res in their ${HOME}
   # directory.
   #
   # If you wish to run scripts from the distribution, you will need to 
   # append the append files from the various directories to this file.
   #
   # If you create your own scripts, be aware of names used already in this
   # resources file so conflicts do not arise.
   #
   ########################################################################
Following the header, there is a section for global resources. These resources are used by all programs for which the resource is an option. In the generic file, naming convention name_conv is defined.

   #
   # The following are global variables required. 
   #
   *name_conv: ymdh_t
The * indicates that all WXP programs that use the name_conv option will use this as the default. This default can be over-ruled, a point we will discuss later. The setting ymdh_t defines the file name format that WXP programs will use.

The next section defines paths to specific types of files. The first three are again general resources to be used by all WXP programs.

NOTE: the following paths in the Wxp.res file will need to be altered to reflect your site file structure.

   #######################################################################
   #
   # Some general path directions for wxp programs
   #
   *file_path: /usr/local/ldm/etc
   *con_path: /usr/local/ldm/data/decoded
   *grid_path: /usr/local/ldm/data/decoded
The resource file_path points to the location of the WXP database files, such as the city data base (city locations and call signs, etc.)

Resource con_path points to the location of converted files (converted by the WXP decoder programs such as sacvt)

Resource grid_path points to where grid files will be stored when created, or where they can be found if needed for a program such as contour.

The next set of paths in Wxp.res apply specifically to the programs that appear before the period. In each case, the program will look for its data files in the directory indicated.

   xsat.data_path: /usr/local/ldm/data/unidata/mcidas
looks in mcidas/ for satellite AREA files.

   convert.data_path: /usr/local/ldm/data/surface/sao
   sa_parse.data_path: /usr/local/ldm/data/surface/sao
   sacvt.data_path: /usr/local/ldm/data/surface/sao
look in sao/ for raw surface files ending in _sao.wmo ingested by the LDM.

   smcvt.data_path: /usr/local/ldm/data/surface/syn
looks in syn/ for raw synoptic files ending _syn.wmo ingested by the LDM.

   radcvt.data_path: /usr/local/ldm/data/surface/rad
looks in rad/ for raw radar files ending _rad.wmo ingested by the LDM.

   uacvt.data_path: /usr/local/ldm/data/upperair
looks in upperair/ for raw upper air files ending _upa.wmo ingested by the LDM.

   fouswx.data_path: /usr/local/ldm/data/forecasts/mod
   focalc.data_path: /usr/local/ldm/data/forecasts/mod
look in mod/ for raw mod files ending _mod.wmo ingested by the LDM.

   rad.data_path: /usr/local/ldm/data/severe
looks in severe/ for raw files ending _wws.wmo ingested by the LDM.

   sfcwx.data_path: /usr/local/ldm/data/surface/front
looks in front/ for raw files ending _frt.wmo ingested by the LDM.

   griblook.data_path: /usr/local/ldm/data/GRIB
   grbcalc.data_path: /usr/local/ldm/data/GRIB
looks in GRIB/ for NPS grid files.

Once the site Wxp.res file located in the WXP user account is set up with the site specific paths and the UDRESPATH environment variable is specified in each users account (for example, in their .cshrc file,) then a user can start to use WXP.