Databases
WXP uses several database files to locate data, draw maps, describe text fonts, etc. These are mostly ASCII files that may be changed, updated or even created by the user. These files are all located in the directory pointed to by the file_path resource.
The types of databases are denoted by the file name extension for each file:
Extension | Type | Resource |
.cty | city database files | city_file |
.map | map database files | map_file |
.bmap | binary map database files | map_file |
.mpl | map listing files | map_file |
.raw | raw file database files | |
.clr | color table files | color_table |
.cfl | color fill files | color_fill |
.enh | satellite enhancement files | color_fill (xsat only) |
.var | variable files | variable |
.reg | region file | plot_domain or region |
.lev | level menu files | |
.tim | time menu files | |
.menu | WXP menu file | |
.smb | symbol files | |
.lup | lookup files | |
.bul | bulletin files | bull_file |
.fnl | font list files | font_list |
.fnt | font files | font_list |
City Databases (.cty)
City database files are used to locate reporting stations. The data included are the name of the station, the location by country and state/province, the ID of the station (3 to 5 letters), the priority of the station, the latitude and longitude, elevation, and WMO numeric ID. A sample of this type of file is:
MIDLAND REGIONA TX US KMAF 1 31.95 -102.18 872 72265 KANSAS CITY INT MO US KMCI 1 39.32 -94.72 312 72446 MIAMI INTL AIRP FL US KMIA 1 25.82 -80.28 4 72202 MOBILE/BATES FI AL US KMOB 1 30.68 -88.25 67 72223 MINNEAPOLIS-ST MN US KMSP 1 44.88 -93.22 255 72658 OKLAHOMA CITY(A OK US KOKC 1 35.40 -97.60 397 72353 CHICAGO/O'HARE IL US KORD 1 41.98 -87.90 205 72530
These files are available for surface, upper air, radar, MOS and SHEF reporting stations. Some of these files are region specific such as for Europe and South America. The city database may be specified with the city_file resource.
Database | Type of Stations | Location |
sao.cty | Surface SAO/METAR | Global |
sao_all.cty | Surface SAO/METAR | Global+non-reporting |
upa.cty | Upper air | Global |
upa_all.cty | Upper air | Global+non-reporting |
syn.cty | Surface Synoptic | Global |
syn_all.cty | Surface Synoptic | Global+non-reporting |
rad.cty | NEXRAD Radar | United States |
mos.cty | Model Output | North America |
shef.cty | SHEF | United States |
Map Databases (.map, .bmap)
Map outline databases contain a list of latitude longitude points that delimit continental, political and other geographical outlines. These files are either in an ASCII or binary format. The binary format, even though not editable, draws 4-8 times faster than the ASCII files. A sample from the wxp.map file is.
24 49.00 45.55 -116.92 -124.75 371 48.15 -123.70 48.35 -124.75 47.90 -124.62 47.00 -124.18 46.28 -124.00 46.17 -123.15 46.08 -122.90 45.65 -122.77 45.55 -122.25 45.70 -121.80 45.65 -121.17 46.00 -119.00 46.00 -116.92 46.40 -117.00 49.00 -117.65 49.00 -120.00 49.00 -122.75 48.60 -122.42 48.00 -122.20 47.30 -122.30 47.35 -122.55 47.80 -122.50 48.12 -122.77 48.15 -123.70 14 46.28 42.00 -116.50 -124.55 602 46.00 -116.92 45.60 -116.50 44.48 -117.20 44.30 -117.20 44.15 -116.90 43.80 -117.00 42.00 -117.00 42.00 -120.00 42.00 -122.00 42.00 -124.20 42.83 -124.55 44.00 -124.15 45.00 -124.00 46.28 -124.00 19 49.00 42.00 -111.05 -117.00 903 49.00 -117.00 49.00 -116.05 48.00 -116.05 47.70 -115.75 47.45 -115.75
The database is also broken into line segments that are drawn separately. By default, all programs use the wxp.map file. If the plot domain center point is outside of a range 25 to 80 North and 65 to 160 West, the cont.map and country.map maps will be used. The map database files may be specified with the map_file resource.
For large map databases, it is useful to use a binary version of the file. These files have a .bmap extension. The DLG (Digital Line Graph) maps from the USGS are in this format.
Database | Coverage | Resolution | Outlines |
wxp.map | North America | low | Continental, Country, State |
wxpstate.map | North America | low | Country, State |
cont.map | Global | low | Continental |
country.map | Global | low | Country |
state.map | United States | high | Continental, State |
usa_cnty.map | United States | high | County, State |
river.map | Global | high | Rivers |
zones.map | United States | high | Forecast zones |
DLG | United States | high | Digital Line Graph: Continental, State, County, Rivers, Roads, Misc Political Boundaries |
Map Lists (.mpl)
These are files that contain a list of files to be used to plot base maps for plots.
Complex map specifications cannot be listed on the command line. A map list
file allows for very complex maps to be drawn, toggles maps on and off based on domain
size and allows for map underlays and overlays. These are specified through the map_file resource with the "fi:
"
prefix. Some map lists provided with WXP are:
Database | Contents |
cnty.mpl | Conditional maps where wxp.map draws at large scales and DLG maps draw at small scale. |
county.mpl | County map, county labels and city IDs. |
full.mpl | Full DLG map plot. |
Raw Databases (.raw)
There are several databases in WXP Raw file format that can be used to plot information using the raw data plotting program mapplt. These files contain ASCII tabular data that can be modified with respect to NWS changes.
Database | Contents |
cities.raw | City location, zones, FIPS, WFOs, population |
counties.raw | County location, zone, FIPS, WFOs, size |
state.raw | State zones, WFOs |
zones.raw | Forecast zones location, FIPS, WFOs |
Color Tables (.clr)
Color table files are to be used to specify which colors are going to be used within in the program. The graphics program allocates (locks in) all the colors listed in the file. Each graphics program has color resources to specify and change colors of various components of the plot. Color table files are ASCII files that list a color name along with its RGB (red, green, blue) color values:
Black 0.0 0.0 0.0 White 1.0 1.0 1.0 Red 0.7 0.0 0.0 Green 0.0 0.7 0.0 Blue 0.0 0.0 0.7 Yellow 1.0 1.0 0.3 Cyan 0.0 0.7 0.7 Magenta 0.7 0.0 0.7 DGray 0.3 0.3 0.3 LGray 0.7 0.7 0.7 LRed 1.0 0.3 0.3 LGreen 0.3 1.0 0.3 LBlue 0.3 0.3 1.0 Brown 0.7 0.7 0.0 LCyan 0.3 1.0 1.0 LMagenta 1.0 0.3 1.0
Several color table files are provided with WXP:
Color Table | Description |
wxp.clr | Default color table (16 colors) |
sat.clr | Satellite color table with 50 gray shades |
rainbow.clr | A rainbow scheme with 23 colors |
rainbow2.clr | A rainbow scheme with 46 colors |
rainbow4.clr | A rainbow scheme with 92 colors |
radar.clr | Radar image color table |
gray25.clr | 25 gray shades |
gray100.clr | 100 gray shades |
gray200.clr | 200 gray shades |
Color Fill Files (.cfl)
Color fill files are used to specify which colors are to be used in color fill contours. Often these are used if the list of colors and attributes becomes too large to fit on the command line. Color fill files are also used to specify:
- contour values which can be used for contours with an irregular interval
- attributes define how the contours will look
Each line in the file has the following syntax:
[value:]color[:attributes...]
This file can be used with color fill and line contours. For color fills, the attributes will change the fill patterns. For line contours, the attributes can change the line styles. If the color_cont resource is set to "off", then the colors of the line contours are those specified in the file. Here is a sample file:
.01:DDMagenta .05:DMagenta .1:MMagenta .175:BMagenta .25:Blue .375:LBlue .5:Green .75:LGreen 1:Brown 1.5:Yellow 2:Red 3:Lred 4:LGray
Satellite Enhancement Files (.enh)
Satellite enhancement files are used to modify or enhance the satellite images in the xsat program. These files are similar to the color fill files except that contour values can be IR Celsius temperatures, color ranges can be specified and colors can be dithered. Here is a sample enhancement file:
MB 0:black c29:1 2-19 c6:20 21-31 c-31:32 c-32:Cyan1 c-36:Cyan2 c-40:Cyan3 c-44:Cyan4 c-48:Cyan5 c-52:Cyan6 c-54:Blue6 c-56:Blue5 c-58:Blue4 c-60:Blue3 c-62:Blue2 c-64:Green1 c-66:Green2 c-68:Green3 c-70:Green4 c-72:Green5
For low resolution displays, dithering is available. For dithered colors, two colors are specified separated by a "%" and the percent dither. The percent is 0-9 for a 10 level dither or a-z for a 26 level dither. For example: gray%gwhite
Variable Files (.var)
Variable files define how variables are to be used and plotted in the graphics programs. Each graphics program has its own variable file. For example, the sfcwx program as a sfcwx.var file. Each line in the variable file defines a specific variable such as:
temp Temperature 1 +temp [F]
The first parameter is the variable name that is used with the variable resource to specify which variable to plot. The second parameter is the menu label that is seen when the variable menu is printed. The third parameter specifies whether this variable is to appear in the variable menu. This can be a combination of model type "mo=", forecast time "ft=", level "le=" or the value "1" or "0" . Wildcard characters are permitted. The final parameter is the variable definition which lists the variable to plot including time and level along with any attributes including its units.
The variable file can contain derived variables such as temperature advection:
tadv Temperature_Advection le=~snd adv(wind,temp:K) [10^-4_K/s]
or composite plots which contain overlays and multiple panels:
depict Weather_Depiction le=sfc :sfc:depict{\ fr [:cf:lab=0:cof=depict.cfl],\ map [co=red],\ cldcv [:cloud],\ cldcl [:data:lc],\ wx [:wx:cl]}
Region Files (.reg)
Region file can be created to alias plot domain specifications. This default region file is wxp.reg. New regions can be added to this file. Here is an example line from the file:
us Contiguous_US 1
39,-97,2.3
The alias is listed first, followed by a long name (all spaces must be underscores), followed by a menu toggle and finally the plot domain specification. The menu toggle specifies whether the region is to appear in the region menu (1=yes, 0=no). The long name is then used in the menu listing.
Time and Level Menu Files (.tim and .lev)
These files are used to define various menu listings within program. They define a abbreviation which is used to define the time or level (see time or level resource). Second, they give the text to be used in the menu. No spaces are allowed but underscores "_" can be used in their place. Finally, there is a menu toggle that defines when the menu item will appear. This can be a combination of model type "mo=", forecast time "ft=" or level "le=". Wildcard characters are permitted. Here is a sample menu file:
init Initial mo=ngm|eta|avn* h06 6_hour mo=ngm|eta|avn* h12 12_hour mo=ngm|eta|avn* h18 18_hour mo=ngm|eta|avn* h24 24_hour mo=ngm|eta|avn* h30 30_hour mo=ngm|eta|avn* h36 36_hour mo=ngm|eta|avn* h42 42_hour mo=ngm|eta|avn* h48 48_hour mo=ngm|eta|avn* h60 60_hour mo=avn* h72 72_hour mo=avn* e3 3.5_day mo=mrf* d4 4_day mo=mrf* ...
Font Files (.fnt)
Font files are used to define how text is to be drawn. These are vector fonts that can be scaled. The default font is modern.fnt. Specifying the font_list resource will change the list of fonts used in a program . Multiple fonts may be specified separated by commas. The actual font used is specified as part of a graphics attribute.
Font Files | Type | Style |
modern.fnt | Modern | Normal |
modern_bold.fnt | Modern | Bold |
modern_ital.fnt | Modern | Italics |
roman.fnt | Roman | Normal |
roman_bold.fnt | Roman | Bold |
roman_ital.fnt | Roman | Italics |
gothic.fnt | Gothic | |
greek.fnt | Greek letters |
Font List File (.fnl)
Since font names can be quite long, a font list file is provided to create font aliases. This works much the same as listing the files with the font_list resource but that aliases for each font are also listed. Here is a sample font list file:
mod modern.fnt helv #-adobe-helvetica-bold-r-normal-*-12-*-*-*-*-*-*-* courier #-adobe-courier-bold-r-normal-*-12-*-*-*-*-*-*-* btimes #-adobe-times-bold-r-normal-*-12-*-*-*-*-*-*-* times #-adobe-times-medium-r-normal-*-12-*-*-*-*-*-*-* school #-adobe-new century schoolbook-bold-r-normal-*-12-*-*-*-*-*-*-* wtimes #Times New Roman:14 warial #Arial
The alias is listed first and the actual font name is listed next. If the font is preceded with a "#", it is a system font and not a WXP font. The first font listed is a WXP font. The next 5 are X11 fonts (Unix) and the last two are Windows fonts. System fonts are generally fixed and won't scale as the window is enlarged. System fonts are not printable. To specify a font, use the color resource: "-cot=white:fo=warial" or the plot parameter "-pp=font:helv". The default font list file is "wxp.fnl" which will be used if it exists. Otherwise, WXP will use the "modern.fnt" file or the fonts listed in the font_list resource. To specify a different font list file, use "-fl=fi:new_fonts.fnl".
Symbol Files (.smb)
Symbols files are used to plot various symbols that cannot be plotted with the text fonts. This is especially handy for weather symbols. The symbol file contains a set of symbols defined by a simple character string such as "RW-". Following the string is a set of X,Y points which describe the symbol. An example is:
T .7,.8 .4,.5 .7,.2 .5,.2 L .7,.2 .7,.4 L $ RW- .4,.7 .5,.7 .5,.6 .4,.6 .4,.7 L .3,.5 .6,.5 .45,.2 .3,.5 L $ RW+ .4,.7 .5,.7 .5,.6 .4,.6 .4,.7 L .3,.5 .6,.5 .45,.2 .3,.5 L .35,.4 .55,.4 L $ RW .4,.7 .5,.7 .5,.6 .4,.6 .4,.7 L .3,.5 .6,.5 .45,.2 .3,.5 L .35,.4 .55,.4 L $ R+ .2,.6 .3,.6 .3,.5 .2,.5 .2,.6 L .6,.6 .7,.6 .7,.5 .6,.5 .6,.6 L .4,.8 .5,.8 .5,.7 .4,.7 .4,.8 L .4,.4 .5,.4 .5,.3 .4,.3 .4,.4 L $
WXP comes with several predefined symbol files:
Symbol File | Description |
wx.smb | Standard weather symbols (SAO format) |
pwx.smb | Synoptic present weather symbols |
ptend.smb | Pressure tendency symbols |
cl.smb | Low cloud symbols |
cm.smb | Middle cloud symbols |
ch.smb | High cloud symbols |
sev.smb | Severe weather symbols |
Bulletin Files (.bul)
Bulletin files are used by the WXP ingest program to select products to save and specify what files the selected products are saved in. The default bulletin file is "ingest.bul" but this can be changed using the bull_file resource. Each line in the file specifies a pattern to match a specific WMO product header or a set of products. After the pattern is the action to be performed on the product including overwrite, append, pipe to a program, etc. The final parameter on the line is the filename or program. The filename can contain the same type of wildcard characters allowed in the filename convention.
# Pattern Action Filename Header Filename S[AP] >>-15 %D/%h%m%d%y.sao S[IMNS] >>-05 %D/%h%m%d%y.syn SD >>+07 %D/%h%m%d%y.rad SXUS2[0123] >> %D/%h%m%d%y.cman U[^AB] >>-65 %D/%12h%m%d%y.upa ASUS1_ >> %D/%3h%m%d%y.frt WWUS40 >> %D/%6h%m%d%y.wws FO >> %D/%12h%m%d%y.mod %D/hd%12h%m%d.mod
Shell Menu Files (wxp.menu)
The menu file specifies the menus to be used with the WXP shell program. The file lists various menus and menu items. The menu items are generally commands to be run most of which are WXP programs. With this file, the menus can be tailored for specific purposes and programs can be tailored by specifying command line parameters to be invoked automatically when the program is run.
Lookup Files (.lup)
There are several lookup files associated with WXP. These files provide general types of information not contained in any of the above file types. Each file has a different format which is explained is the appropriate sections:
Lookup File | Description |
case.lup | This file is a list of case studies that can be used by the wxp shell program. It provides an alias for the case study along with any resources that are critical for using the case study such as con_path and data_path. |
model.lup | This file defines the model types used in WXP. A model run is often comprised of several types of grids. This file associates a model type as specified with the model resource with a set of file types as specified as name convention tags. If more than one tag or file type is specified, these grids will be pieced together. |
mod_name.lup | This file associates a particular model number form the GRIB code with a character string that is inserted into the plot label. |
parse.lup | This file associates particular WMO headers with file name tags to aid in searching for data. Specifying a product in this file eliminates the need for an in_file resource specification using parse. |
source.lup | This file associates a particular data source number from the GRIB code with a character string. |
units.lup | This file lists conversion factors between various units. |
variable.lup | This file associates particular variable numbers as listed in the GRIB products with a character string that will be used in the plot label. |
Last updated July 21, 1998