WXP version 5
Resource Reference

Resource: name_conv

Resource name_conv
Command Line -nc=name_conv
Environment Variable wxpnameconv
Default Value name_conv file

The name convention file defines how most data files are accessed by WXP.  The name convention file essentially allows the user to specify any naming convention. 

This is a critical file as WXP may not work properly without this file existing and set up properly. This resource specifies the name of this file.  By default, it expects a file named "name_conv" in the file_path directory.   This file has a standard set of naming conventions using the ymdh_t naming convention. WXP comes with some preset name convention files to roughly match the name convention setup of older versions of WXP:

Often, this sample is copied into the "name_conv" file but you can list the specific name convention if you system uses more than one.

Naming Convention File

The file name convention file ties the file paths to the actual data files. The name convention also tags data files for date and data type, making it easier for WXP programs to find data files that are current or for any specific time.

Each line in the data file contains a specific file name convention for a particular type of data. The line contains a name convention tag followed by the name convention string.

tag convention_string

The tag is important as most WXP programs use specific tags to find specific name conventions. The tag itself has two parts: a data type followed by a file type. For example, surface data saved by the LDM into the LDM data tree would have a tag of sfc_dat. Upper air data would be upa_dat. In general all LDM data has the _dat suffix. All surface data has a sfc prefix.

Tag Prefix Data Type
sfc Surface Data
syn Synoptic Data
upa Upper Air Data
rad MDR Radar Data
mos MOS Data
sat Satellite Data
grib Model GRIB Data
Tag Suffix File Type
dat LDM Ingested Data
cvt WXP Decoded Data
raw WXP Raw Files
grd WXP Grid Files
par WXP Parsed Files

The name convention string is generally a combination of the file path and a name convention based on date and file type. The string uses a wildcard substitution system much like shell scripts use variable substitution. Anything not part of a wildcard is taken literally. Here is a list of the wildcards:

Wildcards Description

PATHS

%F file_path resource
%D data_path resource
%C con_path resource
%G grid_path resource
%R raw_path resource
%I image_path resource
%W watch_path resource

DATE

%Y Current year (1900-)
%y Current year (00-99)
%B Current month (JAN-DEC)
%b Current month (jan-dec)
%m Current month (01-12)
%j Current julian day (0-365)
%d Current day (01-31)
%h Current hour (00-23)
%n Current minute (00-59)

PRESET VALUES

%r region
%l vertical level
%f forecast time
%v variable
%x model
%p program name
%i loop/frame index
%e tag extension

Most WXP program will read in one file type and create another as output. For example, the surface decoder reads in a file with the sfc_dat convention and produces a decoded file with the sfc_cvt convention. These tags can be changed with the in_file and out_file resources.

The following is a sample of the name convention file::

     sfc_dat         %D/%y%m%d%h_sao.wmo
     sfc_cvt         %C/%y%m%d%h_sao.wxp
     sfc_raw         %R/%v_%m%d%h_sfc.raw
     sfc_grd         %G/%v_%m%d%h_sfc.grd

     rad_dat         %D/%y%m%d%h_rad.wmo
     rad_cvt         %C/%y%m%d%h_rad.wxp
     
     upa_dat         %D/%y%m%d%h_upa.wmo
     upa_cvt         %C/%y%m%d%h_upa.wxp
     upa_raw         %R/%l_%v_%m%d%h_upa.raw
     upa_grd         %G/%l_%v_%m%d%h_upa.grd
     
     mos_dat         %D/%y%m%d%h_mod.wmo
     mos_raw         %R/%f_%v_%m%d%h_mod.raw
     mos_grd         %G/%f_%v_%m%d%h_mod.grd
     
     frt_dat         %D/%y%m%d%h_frt.wmo
     wws_raw         %W/%y%m%d%h_wws.wmo

As you can see, the surface SAO files will be located in the data_path directory (%D=/home/wxp/ddplus) and with a name convention of year, month, day, hour and a type extension of sao.wmo.

The user may also specify the frequency of files. For example, you could specify %5n which says the data comes in every 5 minutes. This makes determining the current file much easier. With the name convention syntax, you should be able to handle most if not every combination of file names. You can change name convention files by changing the name_conv resource if needed.


Last updated July 30, 1998