Name Convention File
The file name convention file links the file tags to the actual file names. The name convention specifies how date and data type are to be formatted into the filename, making it easier for programs to find data files that are current or at a specific time.
FORMAT
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 filename [headerfilename]
Where:
- tag -- The file name tag that is used in the in_file and out_file resource.
- filename -- The name convention for the data file name.
- headerfilename -- The name convention for the header file name (optional).
File Name Tags
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 ingestor would have a tag of sfc_dat which is input to the surface conversion program. The input and output tags for surface data are:
sfc_dat -> sacvt
-> sfc_cvt, sfc_cvt_wxp (WXP format), sfc_cvt_cdf (netCDF
format).
sfc_cvt -> sfcwx -> sfc_raw
(raw output), sfc_grd (grid output), sfc_grd_wxp (WXP
grid output), sfc_grd_cdf (netCDF grid output)
File Name Conventions
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 the formatting of the printf function. 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 |
To handle multiple hour/minute files, a number can be added to the wildcard. A %6h represents a data file created once every 6 hours or a 6 hour compilation file. A %5n specifies that a data file is created once every 5 minutes.
EXAMPLES
Here are some examples:
sfc_dat %D/%y%m%d%h_sao.wmo
sfc_cvt_cdf %C/%y%m%d%h_sao.ncsfc_cvt %C/%y%m%d%h_sao.wxp sfc_raw %R/%y%m%d%h-%v_sao.raw
sfc_grd_cdf %G/%y%m%d%h-%v_sao.nc sfc_grd %G/%y%m%d%h-%v_sao.grd
Not all of these need to be set for each type. In general only the "sfc_dat" and "sfc_cvt" need to be set.
Name Convention String | Sample Filename |
%D/%y%m%d%h.sao |
/home/wxp/data/97092714.sao |
%C/%12h%m%d%y.uac |
/home/wxp/convert/12092797.uac |
%G/%y%m%d%12h_%f_%l_%v.grd |
/home/wxp/grid/97092712_h24_500_temp.grd |
To get more information on the use of name conventions, check out the name convention section of the Users Guide.
SEE ALSO
Last updated August 11, 1998