GADF (General Archival Data Format)

The GADF format for archiving geomagnetic data was developed at WDCC1-Copenhagen. The main ideas in developing the format were that it should be
  1. Flexible, in the sense that the same format could be used for various types of data.
  2. Compact.
  3. Self-describing.
GADF files may contain 3-component magnetometer data for one or more stations and may contain data for arbitrary time period. Each file consists of records containing timeseries of data. The records consist of a combination of two binary parts and an ASCII part. The internal housekeeping information and datadescription are contained in a binary header, while the ASCII part is used to store general information necessary for external users. The data itself is stored in binary format in 2-byte integer values.

The records in the files are sorted according to: Day, Station, Element, Hour. In the case of IMAGE magnetometer network data each record contains one hour of data. The structure of a single data file is then (N stations, M days, X-, Y-, Z- components):

Record #1    : Day #1, hour 0-1,   station #1, X-component
Record #2    : Day #1, hour 1-2,   station #1, X-component
.........
Record #24   : Day #1, hour 23-24, station #1, X-component
Record #25   : Day #1, hour 0-1,   station #1, Y-component
.........
Record #72   : Day #1, hour 23-24, station #1, Z-component
Record #73   : Day #1, hour 0-1,   station #2, X-component
.........
Record #72*N   : Day #1, hour 23-24, station #N, Z-component
Record #72*N+1 : Day #2, hour 0-1,   station #1, X-component
.........
Record #M*(72*N) : Day #M, hour 23-24, station #N, Z-component
Each record is 432 bytes long (in the case of IMAGE magnetometer network data) and consists of three parts:

1. Binary header    Bytes 1-32       32 bytes
2. ASCII header     Bytes 33-72      40 bytes
3. Binary data      Bytes 73-432    360 bytes

Binary Header

The binary header contains information about the record structure and internal housekeeping information about the data and its derivation. For external users it will normally be sufficient to use the information given in the ASCII-header together with some additional information supplied together with the data. The format of the binary header is given at the end of this file.

ASCII Header

The ASCII header is contained in bytes 33 through 72 of the record. The meaning of the fields is:

Byte no.    contents
--------------------------------------------------------------
33-35   IAGA three letter station code.
36      Element H,D,Z,X,Y indicate the normal magnetic elements.
E indicates the local magnetic east vector component perpendicular to H. A digit (1 ... N) indicates some component of a vector in a coordinate system which may be defined in the binary header or given separately.
(IMAGE uses X,Y,Z.)
37-42   Geographical Northpole distance in 0.001 degrees.
43-48   Geographical Longitude (East) in 0.001 degrees.
49-54   Invariant colatitude in 0.001 Degrees. (Not always supplied).
55-60   Date of the start of record in YYMMDD - format.
61-66   Time of the start of record in HHMMSS - format.
67-72   Tabular Base in nT (in Degrees for element D).

Binary data

The length of the binary data block is 360 bytes so there are 180 data points. The data in a record consists of a timeseries of data in 2-byte (16 bit) two's complement integer format. The scaling information and the sampling interval are given in the binary header.

BINARY HEADER

The values are one- or two-byte values. One-byte values are positive (0-255) whereas the two-byte values are two's complement integers. In the table below the 'IMAGE CD-ROM' columns give constant values used in IMAGE CD-ROM's as hexadecimal and decimal numbers. If no value is given the particular parameter may vary from record to another.
Byte    Mnem. Description                      hexa    dec.
----------------------------------------------------------------------
1-2     NR    Length of record in bytes        01B0    432
3-4     NB    Length of binary header          0020    32
5-6     NA    Length of ASCII header           0028    40
7-8     SN    Station number (internal use)
9-10    IV    Sample interval in seconds
11-12   DS    Datasamples in record            00B4    180
13-14   RL    Reference level                  7FFF    32767
15-16   UN    Uncertainty or max. daily drift  7FFF    32767
17-18   TP    Temperature in 0.1 Degrees Centigrades
19-20   FB    Filter breakpoint                0000    0
21-22   FS    Filter slope                     7FFF    32767
23-24   RS    Reserved                         7FFF    32767
25      RF    Record flag
26      SC    Scaling information for binary data
27      SD    Source of data                   01      1
28      IN    Instrument number                00      0
29      EC    Extended elementcode
30      DT    Datatype                         01      1
31      BL    Base line information            00      0
32      CR    Code for reference level         00      0
Notes:

byte 13-14 RL
Reference level, in the same units and same offset as the data.

byte 15-16 UN
Uncertainty of data, the reference level or the maximum daily drift of the baseline.

byte 19-20 FB
Filter breakpoint
  0000 if values are means between datapoints
  7FFF if no filtering was employed or filter unknown.
  Otherwise period in seconds at which low pass filter is 3dB down (0.7 amplitude).

byte 21-22 FS
Filter slope
  Number of dB per octave, or measured equivalent for numerical filter.

byte 25 RF
Record flag
  0  normal data
  1  all data in record are missing
  2  erroneous data, may not be used without visual inspection or editing
  9  indicates that this is not a normal data record, but a record containing supplementary information (internal use only)

byte 26 SC
Scale,  x = SC
  x = 0 : scale = 1.0
  0 < x <= 8 : scale = 2^(3-x)
  x > 8 : scale = 10^(10-x)
  Application: multiply all data values as well as reference level and
  uncertainty by "scale" to yield data in units according to
  the appropriate element code (EC) (byte 29)

byte 27 SD
Source of data
  used bits 0-1 (Low to high order)
    bit
      0 = 0 : digitized from analog magnetogram
      0 = 1 : data from digital recorder
      1 = 0 : data from primary magnetograph
      1 = 1 : data from supplementary magnetograph

byte 28 IN
Instrument number, a number indicating the magnetogram used.

byte 29 EC
Extended element code
  Normal magnetic elements (and units).
    1 : D (0.1')
    2 : I (0.1')
    3 : H (nT)
    4 : F (nT)
    5 : X (nT)
    6 : Y (nT)
    7 : Z (nT)

    Additional codes
    8 : E (nT)  Magnetic east, component perpendicular to H
    9 : H1 (nT) component perpendicular to H2, where
    10: H2 (nT) is directed along corrected geomagnetic latitutes (toward east).
    15: R (nT) Reserved (for example for residual)

byte 30 DT
Data type, - specifies the type of data which may be:
    0 : momentary values
    1 : averaged values (corresponding to sampling interval)
    2 : ranges (within sampling interval)
    3 : filtered values; filter characteristics - bytes 19-20, 21-22

byte 31 BL
Baseline information:
    0 : absolute values, - but not necessarily calibrated.
    1 : relative values from magnetometer baseline
    2 : relative values from adopted reference level (QL)
    4 : absolute and calibrated data

byte 32 CR
Code for reference level given in byte 13-14
    0 : no reference level given
    1 : preliminary QL
    2 : adopted QL
    3-9: reserved for special reference levels
    10 : reference level is the daily average
    11 : reference level is the monthly average.

IMAGE home page
Updated: 10.2.2010 - AV