WXP
Resource Reference

Resource: name_conv

Resource name_conv
Overview This sets which name convention file to use.
Command Line -nc=name_conv
Environment Variable wxpnameconv
Possible Values
Default Value name.cnv or name_conv file

The name convention file defines how most data files are accessed by WXP. The name convention file allows the user to specify any naming convention plus parameters about the file like data format, size, age, etc.

This is a critical file as WXP will 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.cnv" in the file_path directory. WXP ships with a name convention setup of "ymdh_t.f". This means the files have two digit year, month, day and hour followed by the data type and format. For example a converted surface data file would be:

13101512_sao.wxp

with "sao" dictating the file contain surface airways observations and "wxp" showing that it is a WXP formated file.

Naming Convention File

The file name convention file ties the file tags 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 WXP ingestor into the data directories would have a tag of sfc_dat. Upper air data would be upa_dat. In general all ingested 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 resrc:file_path resource
%D resrc:data_path resource
%C resrc:con_path resource
%G resrc:grid_path resource
%R resrc:raw_path resource
%I resrc:image_path resource
%W resrc: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=/data/nwstg/data) 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 November 2013