CDIP banner
CDIP banner recent historic documents
sub-menu
Documentation
 
FAQs & Summaries
Glossary
Publications
 
Introduction
  History and Funding
  Program Goals
Wave Measurement
  Wave Generation
  Wave Dynamics
  Irregular Waves
  Spectral Analysis
  Gauging Waves
  Hurricane Events
  Tsunami Events
Instrumentation
  Underwater Sensors
  Surface Buoys
  Meteorological
Data Acquisition
  System Organization
  Hardware
  Software
Data Processing
  System Organization
  Software
  Quality Control
Data Management
  Stations and Sets
  Files and Storage
CDIP Products
  Data Formats
  Web Products
  COOS Integration
  WIS
  QARTOD
  Wave Eval Tool
  Metadata
  Custom Products
  NDBC XML/NWS Format
  NDBC Dial-A-Buoy
  Access Instructions
 
Related Links
 

DIRECTIONAL BUOY VECTOR FILE FORMAT
-----------------------------------

For directional buoys, the Datawell vector (df) files are formatted 
as follows:


Name: HARVEST BUOY                                  (start of header)      
Station: 07101
Deployment latitude: 34 27.50' N
Deployment longitude: 120 46.80' W
Water depth(m):  179.83
Local magnetic variation(deg): 13 E
Data type: Datawell vectors
Gauge type: Datawell Mark 2 directional buoy
Sample rate(Hz): 1.280
Field software version: datawell_acq v2
Field station type: sun
Method of analysis: Datawell
GPS: yes

Start time: 20001012144432 UTC
End time:   20001012151431 UTC
Sample length(hh:mm:ss): 00:30:00
Total number of vectors:  2304
Error-free vectors: 100.0%
--------------------------------------------------  (end of header)
    0    7  127  255  129  152   13  130   57  167  (start of data)
    0    8    0   51    0   56   17  129   95  237
    0    9  192  158    2   88    4  128  254  151
    0   10  247  104    2  112    0  130   20  124
    0   11  169  137    0   24   10  130  152  104
    0   12  194  252  129   56   22  130  186   17
    0   13   65  220  131  232   15  131    4   48
    0   14  102  134  134  192   19  128  242   51
    0   15  144  158  133   32   33    2  169   14
    0   16   82  252  129  160   23    4  150  147
    0   17  130  230    2   64   29    3   92  183
    0   18  150   61    4  176   48    0  229  241
    ...


THE HEADER:

The header of the Datawell vector file contains two sections. 
The first gives basic information about the sensor: the position, 
the sample rate, the buoy type, etc. 
The second section contains the start time, end time, and sample
length of the data. It also contains diagnostic information that depends on 
the sensor type. For directional buoys, this is the total number of 
vectors received and the percentage of these vectors that are considered 
to be error-free. Note that only the start time is set in the field and 
returned with the data; all other entries in this section are calculated 
and added by CDIP's processing programs.

Comments can be added as desired at the bottom of the second section. A dashed
line (----------) separates the header from the data; all comments must be 
placed above this line.


THE DATA:

For directional buoys, each line of data in the diskfarm file consists of ten
unsigned integers (10i5). Each of these integers is one byte of data; they
are grouped in tens because a ten-byte vector is the basic unit of
transmission for Datawell directional buoys. Each vector has the following 
structure:

      Byte 1: Error code                  Byte 6:  z and x displacements
      Byte 2: Counter                     Byte 7:  x displacement
      Byte 3: System (spectral) info      Byte 8:  y displacement
      Byte 4: System (spectral) info      Byte 9:  y displacement, parity
      Byte 5: z displacement              Byte 10: Parity code

Note that many of the values contained in a vector cross over from one byte to
the next. For example, the z-displacement value is composed of the fifth byte
and the top four bits of the sixth byte. A bit-by-bit representation of a
vector perhaps makes this more clear:

   byte 1   byte 2   byte 3   byte 4   byte 5   byte 6   byte 7  (bytes 8-10)
  00000000 01101111 10011001 11100110 00001011 10110000 10111111  ...
 |<------>|<------>|<--------------->|<----------->|<---------->| y disp,
   error    count      system word       z disp.       x disp.     parity...

The last eight bytes of each vector are transmitted by the buoy. These bytes
contain all the spectral data (in bytes three and four, the system words) and
all the displacement data (in bytes five through nine). The spectral
information is generated by the buoys' on-board processing; each half-hour new
spectral data is calculated for a 1600 second sample. This data goes into 
CDIP's spectral files. The displacement data - new x, y, and z displacements
are given with each vector - go into CDIP's xyz files.

Bytes one and two, the error and counter bytes, are added by the Datawell 
receiver when it receives the data on shore. The counter byte starts at zero 
when the receiver is powered up and then continuously cycles from 0 to 255. Any 
breaks in the counter values indicate a gap in the data stream.

Error Codes:

The error byte is set by the receiver after assessing the quality of the data
in the vector. The receiver assigns error codes between 0 and 15, setting the
bottom four bits of the error byte. The meaning of these codes can be
summarized as follows:

	0    -> No errors; good data
	1    -> All errors fixed by receiver; good data
	2-7  -> Receiver in sync but errors present; bad data
	8-15 -> Sync lost; bad data

In general, the higher the code the worse the data. 

CDIP's processing programs also check the data stream for errors and modify
the error byte when necessary. (The processing programs modify the top
four bits of the error byte, leaving the receiver's codes unchanged.) The
only changes made to diskfarm files occur when there are gaps in the data.

A break in the counter values indicates that there is gap in the data.
For example, in this data stream there is a gap when the counter reaches 101:

    0   95   73  195  131   56   42    2  133   39
    0   96  131  107    1  104   52    1  254  125
    0   97  127  255    4  120   25  128   86  187
    0   98   81  165    5  184    4  131  187  254
    0   99   84  198    3  136    3  133  119  107
    0  100   82   12    1  104   15  132  108  104
    0  101   68  203  129  104   18  130   54  137
    0  113   68  203    0   24   10  133   78   33
    0  114  126  101  129   88   25  131   29   76
    0  115  127  255  130   72    8  128  225   37
    0  116   96    4  129  112   10    0  135  138
    2  117   24  195  128  112    2    0  135   51
    0  118    2  119  130   56    9    0  154  180

By comparing counter numbers and page numbers (part of the system data), CDIP's
processing programs attempt to determine how many vectors are missing. If
this can be done, zeroed-out vectors are added to fill in the gap. These added
vectors are marked with an error code of 16:

    0   95   73  195  131   56   42    2  133   39
    0   96  131  107    1  104   52    1  254  125
    0   97  127  255    4  120   25  128   86  187
    0   98   81  165    5  184    4  131  187  254
    0   99   84  198    3  136    3  133  119  107
    0  100   82   12    1  104   15  132  108  104
    0  101   68  203  129  104   18  130   54  137
   16  102    0    0    0    0    0    0    0    0
   16  103    0    0    0    0    0    0    0    0
   16  104    0    0    0    0    0    0    0    0
   16  105    0    0    0    0    0    0    0    0
   16  106    0    0    0    0    0    0    0    0
   16  107    0    0    0    0    0    0    0    0
   16  108    0    0    0    0    0    0    0    0
   16  109    0    0    0    0    0    0    0    0
   16  110    0    0    0    0    0    0    0    0
   16  111    0    0    0    0    0    0    0    0
   16  112    0    0    0    0    0    0    0    0
    0  113   68  203    0   24   10  133   78   33
    0  114  126  101  129   88   25  131   29   76
    0  115  127  255  130   72    8  128  225   37
    0  116   96    4  129  112   10    0  135  138
    2  117   24  195  128  112    2    0  135   51
    0  118    2  119  130   56    9    0  154  180

Sometimes, when the receiver has been powered off or there is a long gap in
the data, it is impossible to determine how many vectors are missing. In this
case, the times of the vectors that follow the break cannot be known. (This
is true for files that have a definite start time. For files with a definite
end time, like most of CDIP's files prior to April 2000, times preceeding the 
break cannot be known.) As a result, they cannot be processed, and 100 is 
added to their error code: 

    0   95   73  195  131   56   42    2  133   39
    0   96  131  107    1  104   52    1  254  125
    0   97  127  255    4  120   25  128   86  187
    0   98   81  165    5  184    4  131  187  254
    0   99   84  198    3  136    3  133  119  107
    0  100   82   12    1  104   15  132  108  104
    0  101   68  203  129  104   18  130   54  137
  100  113   68  203    0   24   10  133   78   33
  100  114  126  101  129   88   25  131   29   76
  100  115  127  255  130   72    8  128  225   37
  100  116   96    4  129  112   10    0  135  138
  102  117   24  195  128  112    2    0  135   51
  100  118    2  119  130   56    9    0  154  180

Including the codes added by CDIP, there are six general categories of errors:

        0    -> No errors; good data
        1    -> All errors fixed by receiver; good data
        2-7  -> Receiver in sync but errors present; bad data
        8-15 -> Sync lost; bad data
	16   -> No data received, blank vector added
	100+ -> Vector time unknown

In order to maintain a high level of quality control, CDIP only processes data 
from vectors with error codes of zero and one; all other vectors are skipped.

Official UCSD Web Page