West Coast/Alaska Tsunami Warning
Center
Operations Manual
NOAA/NWS/WCATWC
Palmer,
http://wcatwc.arh.noaa.gov
Section 4.1.3.1:
WC/ATWC Data Format
Last
Updated: 5/2006
Figure 1 illustrates the byte stream of a typical WC/ATWC
data file. The WC/ATWC file structure includes a disk header, a channel header
block, and a data block. As shown in table 1, the disk header consists of the
first 24 bytes of the file. This data is immediately followed by a series of N
200-byte channel headers. The specific information contained in the channel
header is listed in table 2. The data block follows the last channel header and
the exact number of bytes in each sequential data channel is determined from
the information provided in the corresponding channel header.
A quick way to obtain disk and channel header
information is to simply perform a hexadecimal data dump of the file. This is illustrated in figure 2. The bytes
are in little endian format and should be read from right
to left. For example, the hexadecimal value for the year is found in bytes 1-2
of the disk header. When converting the hexadecimal value to a decimal number, the
value D5 07 should be read as 07 D5.

Figure 1 - Byte stream structure for a WC/ATWC data file.
Table 1 - The disk header format used at the West Coast and
|
DISK HEADER |
|||||
|
Byte |
Data Type |
# Bytes |
Parameter |
C Structure |
Example |
|
1-2 |
2 byte integer |
2 |
wYear |
SYSTEMTIME |
1980-2099 |
|
3-4 |
2 byte integer |
2 |
wMonth |
SYSTEMTIME |
1-12 |
|
5-6 |
2 byte integer |
2 |
wDayOfWeek |
SYSTEMTIME |
0-6 |
|
7-8 |
2 byte integer |
2 |
wDay |
SYSTEMTIME |
1-31 |
|
9-10 |
2 byte integer |
2 |
wHour |
SYSTEMTIME |
0-23 |
|
11-12 |
2 byte integer |
2 |
wMinute |
SYSTEMTIME |
0-59 |
|
13-14 |
2 byte integer |
2 |
wSecond |
SYSTEMTIME |
0-60 |
|
15-16 |
2 byte integer |
2 |
wMilliseconds |
SYSTEMTIME |
0-999 |
|
17-20 |
4 byte integer |
4 |
iNumChans |
DISKHEADER |
currently set at 200 |
|
21-24 |
4 byte integer |
4 |
iChanSize |
DISKHEADER |
currently set at 200 |
Table 2 - The channel header format used at the West Coast
and
|
CHANNEL HEADER |
|||||
|
Byte |
Data Type |
# Bytes |
Parameter |
C Structure |
Example |
|
1-6 |
char |
6 |
szStation[6] |
CHNLHEADER |
BILL |
|
7-12 |
char |
6 |
szChannel[6] |
CHNLHEADER |
BHZ |
|
13-16 |
char |
4 |
szNetID[4] |
CHNLHEADER |
IU |
|
17-32 |
SYSTEMTIME |
16 |
stStartTime |
CHNLHEADER |
As in disk header |
|
33-40 |
double |
8 |
dSampRate |
CHNLHEADER |
20 |
|
41-44 |
long |
4 |
INumSamps |
CHNLHEADER |
2400 |
|
45-48 |
int |
4 |
iBytePerSamp |
CHNLHEADER |
4 |
|
49-52 |
int |
4 |
iTrigger |
CHNLHEADER |
0 or 1 |
|
53-56 |
int |
4 |
iSignalToNoise |
CHNLHEADER |
5 |
|
57-60 |
int |
4 |
iPickStatus |
CHNLHEADER |
1 |
|
61-64 |
int |
4 |
iStationType |
CHNLHEADER |
1 |
|
65-72 |
double |
8 |
dLat |
CHNLHEADER |
68.0651 |
|
73-80 |
double |
8 |
dLong |
CHNLHEADER |
166.4524 |
|
81-88 |
double |
8 |
dElevation |
CHNLHEADER |
299.0 |
|
89-96 |
double |
8 |
dGain |
CHNLHEADER |
1027600000.0 |
|
97-104 |
double |
8 |
dGainCalibration |
CHNLHEADER |
0 |
|
105-112 |
double |
8 |
dClipLevel |
CHNLHEADER |
4194304.0 |
|
113-120 |
double |
8 |
dTimeCorrection |
CHNLHEADER |
0.0 |
|
121-128 |
double |
8 |
dScaleFactor |
CHNLHEADER |
0.03 |
|
129-132 |
long |
4 |
IUnused1 |
CHNLHEADER |
NA |
|
133-136 |
int |
4 |
iUnused1 |
CHNLHEADER |
NA |
|
137-140 |
int |
4 |
iUnused2 |
CHNLHEADER |
NA |
|
141-148 |
double |
8 |
dUnused1 |
CHNLHEADER |
NA |
|
149-156 |
double |
8 |
dUnused2 |
CHNLHEADER |
NA |
|
157-164 |
double |
8 |
dUnused3 |
| |