WXP version 5
File Reference

ASCII Raw File

The raw data file contains the same information as the WXP format. This type of file is provided to allow non-WXP programs to create data that can be used by WXP. Raw data files are written in ASCII and contain location and values for various data points. This data can be plotted or fit to a grid for contouring. Raw data files can also be used to plot and annotate various plots with text and weather symbols. These files can be created by many of the plotting programs such as sfcwx, upairwx, and fouswx. Raw data can be displayed using mapplt, fitted to a grid with grid, and manipulated with rawmath.

FORMAT

The format is as follows:

WXPRAW
date
[flag]info
[data header]
raw data...

Header Data

The first line of the file is the string:

WXPRAW

which is used to determine file type. The second line of the data file is a character string describing the valid time and origin of the image (less than 50 characters). Examples:

12Z 14 JUN 98
May 1995

The third line contains a character string describing the contents of the raw file (less than 50 characters). Examples:

Surface Temperature (C)
Monthly Precipitation (in)

Data Header

There is an optional data header which is placed after the information line which describes the raw data.  This is not necessary if the only one type of data exists in the file but it is often more convenient to put more than one piece of data for each station in the raw file.  This is done by specifying more than one value on each line of station data.  In order to access this data, the column number can be specified or the column name.  The name and additional attributes are specified in the data header. 

To include the data header, a "!" (exclamation point) flag must be added to the beginning of the information line.  The data header contains a list of information, whitespace delimited, one for each column of data.  The format is:

name[:long_name][:attributes...]

where:

The data header block is terminated with a "$".  The rest of the line following the "$" is ignored. This can be used for column headers.  Here is an example:

WXPRAW
22-30 JUN 1998
!Hurricane BLAS
ID LAT LON
TIME:Time:ur:tx
WIND:Max_wind_(kt):ul:tx
PR:Low_central_pressure_(mb):ll:tx
STAT:Storm_status:co=yellow
LINE:Storm_track
$ID   LAT     LON   TIME   WIND  PR  STAT  LINE
  1   9.90  -96.20 22/15Z   30     -    L  post:line:co=green    TROPICAL_DEPRESSION

Raw Data

The following lines contain information for each station/report. The format is:

ident [lat lon] data1 [data2...]

Where:

where:

Raw files should have one blank line at the end.  This way raw files can be strung together in a stream to programs such as rawmath.

Comments

Any line starting with a "#", is considered a comment line.

EXAMPLES

A simple raw file would look like:

WXPRAW
19Z 21 JAN 98
Surface Temperature (F)
KBIL 45.80 -108.53  47.0
KBNA 36.12  -86.68  26.0
KCVG 39.05  -84.67  16.0
KDAY 39.90  -84.20  13.0
KDBQ 42.40  -90.70  18.0
(blank line)

The data lines contain a station identifier, latitude, longitude, and a simple value. Using multiple columns in a raw file would look like:

WXPRAW
15Z 2 NOV 97
Surface data
#ID   LAT    LON   T    TD  WIND ALT SLP VIS
KAUG 44.32 -69.80 34.0 20.0 0207 040 399  15
KBGR 44.80 -68.82 35.0 19.0 0206 040 297  15
KBNA 36.12 -86.68 62.0 49.0 2311 970 054  10
KCAR 46.87 -68.02 30.0 18.0 3509 037 297  30
(blank line)

Here, the columns are unnamed but there is a column header as a comment line. Plotting programs will plot all of the data fields for a particular station/report. This will overlap information. To select a particular column of information, specify the column number starting with column one (in this case one is T). For example:

mapplt sfc.raw-1

To eliminate overlap, attributes may also be added to enhance output:

WXPRAW
21Z 21 JAN 98
Surface Station data
KABR 45.45  -98.43 C:cldcv:co=white 19:text:ul:co=green 12:text:ll:co=green 
KBBW 41.43  -99.65 C:cldcv:co=white 53:text:ul:co=green 26:text:ll:co=green 
KBIL 45.80 -108.53 O:cldcv:co=white 49:text:ul:co=green 24:text:ll:co=green 
KBNA 36.12  -86.68 C:cldcv:co=white 28:text:ul:co=green 16:text:ll:co=green 
KDLH 46.83  -92.18 S:cldcv:co=white 23:text:ul:co=green 11:text:ll:co=green 

To simplify this, attributes can be in the data header:

WXPRAW
06Z  8 AUG 98
!Surface All data
id lat lon
temp:Surface_Temperature_(F):value:ul
dewp:Surface_Dewpoint_temperature_(F):value:ll
pres:Sea_level_Pressure_(mb):data:ur
wbrbc:Surface_:cbarb:
cldcv:Surface_Cloud_cover:cloud:
wx:Surface_Present_weather:symb:cl
$
KJDN  47.33 -106.93 75.000000 51.099998 097 300.000000,14.000000 - -
KPIT  40.50  -80.22 73.900002 61.000000 235 120.000000,7.000000 C -
KCID  41.88  -91.72 66.900002 66.900002 152 0.000000,0.000000 O -
KLIT  34.73  -92.23 77.000000 75.199997 176 150.000000,3.000000 B -
KIAD  38.95  -77.45 73.900002 71.099998 251 0.000000,5.000000 S -
KROW  33.30 -104.53 77.000000 50.000000 113 160.000000,8.000000 C -
KBKW  37.78  -81.12 69.099998 63.000000 220 120.000000,6.000000 C -
KRDU  35.87  -78.78 75.900002 73.900002 227 80.000000,5.000000 O TR-

Once the data header is specified, individual columns can be plotted using:

mapplt sfc.raw-temp

The output will be a plot of temperatures with the label of "Surface All data-Surface Temperature (F)" which is the combination of the raw file information line and the long name for the specified variable.

The data header is nice for specifying the names of regular columns but this doesn't work well if the data is irregular as is the case with SHEF data.  In this case, the data type is specified with each data value:

WXPRAW
 0Z 28 DEC 93
SHEF Data
HLTK1 TA:17 TX:36 TN:17
EART2 PCIRG:16.59 PPKRG:.00
KNBT2 PCIRG:12.00 PPKRG:.00 HGIRG:2.85
NLKT2 PCIRG:9.74 PPKRG:.00
TKLT2 PCIRG:10.33 PPKRG:.00 HGIRG:4.23
BILT2 PCIRG:7.81 PPKRG:.00
STST2 PCIRG:12.93 PPKRG:.00
BCPT2 PCIRG:12.41 PPKRG:.00
ATKM5 HGIRG:7.60
RKFM5 HGIRG:5.30
ANKM5 HGIRG:7.64
SSPM5 HGIRG:87.01

To plot the PCIRG data, use:

mapplt shef.raw-PCIRG

A more complete example is a hurricane track raw file which includes various types of formatting:

WXPRAW
22-30 JUN 1998
!Hurricane BLAS
ID LAT LON
TIME:Time:ur:text
WIND:Max_wind_(kt):ul:text
PR:Low_central_pressure_(mb):ll:text
STAT:Storm_status:co=yellow
LINE:Storm_track
$ID  LAT   LON     TIME    WIND  PR  STAT  LINE
  1   9.90  -96.20 22/15Z   30     -    L  post:line:co=green    TROPICAL_DEPRESSION
  2  10.90  -97.90 22/21Z   45  1000 @:wx  post:line:co=yellow   TROPICAL_STORM
  3  11.20  -98.10 23/03Z   55   997 @:wx  post:line:co=yellow   TROPICAL_STORM
  4  11.20  -99.00 23/09Z   55   994 @:wx  post:line:co=yellow   TROPICAL_STORM
  5  12.00 -100.30 23/15Z   55   994 @:wx  post:line:co=yellow   TROPICAL_STORM
  6  12.80 -101.80 23/21Z   65   987 @+:wx post:line:co=red      HURRICANE-1
  7  13.10 -103.40 24/03Z   90   970 @+:wx post:line:co=lred     HURRICANE-2
  8  13.40 -104.10 24/09Z   95   970 @+:wx post:line:co=lred     HURRICANE-2
  9  14.00 -104.70 24/15Z  100   965 @+:wx post:line:co=magenta  HURRICANE-3
 10  14.70 -105.70 24/21Z  100   965 @+:wx post:line:co=magenta  HURRICANE-3
 11  15.00 -106.50 25/03Z  115   948 @+:wx post:line:co=lmagenta HURRICANE-4
 12  15.50 -107.30 25/09Z  120   945 @+:wx post:line:co=lmagenta HURRICANE-4
 13  16.10 -108.10 25/15Z  120   948 @+:wx post:line:co=lmagenta HURRICANE-4
 14  16.60 -108.90 25/21Z  115   948 @+:wx post:line:co=lmagenta HURRICANE-4
 15  17.10 -110.10 26/03Z  100   960 @+:wx post:line:co=magenta  HURRICANE-3
 16  17.30 -111.00 26/09Z   95   965 @+:wx post:line:co=lred     HURRICANE-2
 17  17.40 -112.40 26/15Z  100   960 @+:wx post:line:co=magenta  HURRICANE-3
 18  17.60 -113.50 26/21Z   90   970 @+:wx post:line:co=lred     HURRICANE-2
 19  17.70 -114.40 27/03Z   90   970 @+:wx post:line:co=lred     HURRICANE-2
 20  17.80 -115.60 27/09Z   80   977 @+:wx post:line:co=red      HURRICANE-1

The identifiers are the advisory numbers. The columns are specified in the column header section:

Col Name Longname Attribute
1 ID    
2 LAT    
3 LON    
4 TIME Time ur:text (place upper right, data is text)
5 WIND Max_wind_(kt) ul:text (place upper left, data is text)
6 PR Low_central_pressure_(mb) ll:text (place lower left, data is text)
7 STAT Storm_status col:yellow (color yellow)
8 LINE Storm_track  

Additional attributes can be specified with the data as is the case with the storm status. The "@:wx" specifies to plot a tropical storm symbol. The storm track data has a plot type of "line" and a data value of "post" which means a line will be drawn between the current location and the next location. The data value of "pre" can be used to draw to the previous location. The data header section is terminated with the '$' at the beginning of the line with the header remarks. This shows using the remainder of this line as a column header line. This is considered a comment and does not affect the interpretation of the raw file. Again, a single data type can be selected by specifying the column name. For example:

mapplt track.dat-LINE:wi=2

will plot the storm track with a width of 2 pixels and changing colors based on storm intensity. The plot output will be labeled "Hurricane Blas-Storm track".

SEE ALSO


Last updated August 7, 1998