Enter a ZIP code to get a forecast:
Setup Location

WRN Logo

File Name Conventions

The file name convention file ties the file tags to the actual data 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.

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]

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)

These name conventions are then set in the name convention file:

   sfc_dat       %D/%y%m%d%h_sao.wmo
   sfc_cvt_cdf   %C/%y%m%d%h_sao.nc
   sfc_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. Here is a list of the common file name tags:

Data Type Ingested Decoded Decoded
Grid Grid
Surface sfc_dat sfc_cvt sfc_cvt_cdf sfc_cvt_wxp sfc_grd sfc_grd_cdf sfc_grd_wxp sfc_raw
Synoptic syn_dat syn_cvt syn_cvt_cdf syn_cvt_wxp        
Upper Air upa_dat upa_cvt upa_cvt_cdf upa_cvt_wxp upa_grd upa_grd_cdf upa_cdf_wxp upa_raw
Radar (MDR) rad_dat rad_cvt rad_cvt_cdf rad_cvt_wxp        
MOS mos_dat       mos_grd mos_grd_cdf mos_grd_wxp mos_raw
MOS NGM* mos_ngm_dat              
MOS NGM UA* mos_ngmu_dat              
MOS ETA UA* mos_etau_dat              
MOS MRFX* mos_mrfx_dat              
Satellite VIS sat_vis              
Satellite IR sat_ir              
Satellite WV sat_wv              
Profiler prf_dat              
Fronts frt_dat              
Watches wat_dat              
Tropical trp_dat              
NLDN nldn              
GRIB** grib       grd_grd grd_cdf grd_wxp  

* The MOS tags are not set.  Only the strings "ngm", "ngm_ua", "eta_ua", "mrfx" need to appear in the tag for the program to recognize the type of file.
** The GRIB data is defined through a model lookup table.

File Name Convention String

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


%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


%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)


%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. Some samples based on date 14Z 29 Sep 1997:

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

File Name Extension

Most of the preset values are set by the program and can be used in the naming convention. The extension is used with the in_file and out_file resource to extend the name convention at runtime.  For example, a NIDS specification exists in the name convention file:

   nids-sfsu     %D/%h/%y%m%d%h%5n.%v_%i
   nids-denver   %D/%e/%h/%y%m%d%h%5n.FTG.wsi         
   nids          %D/nids/%Y%m%d%h%5n_%e 

When specifying the in_file resource, the tag can have an extension added to the tag:

   -in_file nids_bref1

Everything after the last underscore "_" is considered the extension.  When this type of tag is specified, the name convention file is search for this tag or the "nids" tag and will use whatever it finds first.  If it finds the "nids" tag, it will use the string "bref1" as the extension and replace the "%e" wildcard with this string.  This allows for generic tags that can be used for more than one file type.  The resulting filename would be:


If more than one tag starts with "nids" the first match will always be used.  This means that a generic tag such as "nids" should always be placed after more specific tags such as "nids-sfsu".

Header Files

For some file types, header files are generated by the WXP ingestor.  The name convention file needs to specify the name convention of these files as well.  As with the bulletin file syntax, the name convention syntax is to append the header file naming convention onto the end of the line.  For example:

#  Raw text data for parsing
all_dat       %D/%y%m%d%h.wmo       %D/%y%m%d%h.hdr
for_dat       %D/%y%m%d%6h_for.wmo  %D/%y%m%d%6h_for.hdr
sev_dat       %D/%y%m%d%6h_sev.wmo  %D/%y%m%d%6h_sev.hdr
sum_dat       %D/%y%m%d%6h_sum.wmo  %D/%y%m%d%6h_sum.hdr
cli_dat       %D/%y%m%d%6h_cli.wmo  %D/%y%m%d%6h_cli.hdr
#  GRIB data
grib_eta      %D/%y%m%d%12h_eta.grb    %D/%y%m%d%12h_eta.hdr
grib_ngm      %D/%y%m%d%12h_ngm.grb    %D/%y%m%d%12h_ngm.hdr
grib_ruc      %D/%y%m%d%3h_ruc.grb     %D/%y%m%d%3h_ruc.hdr     

If the header file convention is omitted, WXP will not use the header file.  It is recommended that the header file be used in all cases.

in_file and out_file Resources

These resources can be used to specify the tags and the resulting file name conventions used in the program.  Each program has default tags compiled into the program but they can be overridden on the command line:

   -if=sfc_dat -of=sfc_cvt

Additional wildcard characters can also be specified.  Any lowercase letter other than those listed above can be used.  These wildcards are appended to the tag and separated with colons ":".  The syntax is wilcard=value:


The wildcards of v and r are replaced in the name convention with their values.

   sfc_grd   %G/%h%d_%v%r.grd



If the filename string does not match a file name tag, it is used as a file name convention string:


or specific files (without wildcard characters)


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