N6RAT.TXT - Format of Nimbus 6 Radiance Archive Tapes.

This document has been adapted from A6TAPES.DOC which was
produced when the original magnetic tapes were copied to optical disk.


                    OVERALL STRUCTURE
                    -----------------


*       "Tapes" (files corresponding to one magnetic tape's worth of data) are
        copies of our rat6 (A6 series) tapes.

*       Data was originally stored in 12 bit 'words' and now occupies the 12
        least significant bits of a 16 bit word.  - Data range is 0 - 4095.

*       The byte ordering within 16 bit integers follows the dec convention of
        least significant byte first on the "tape".


"FILE" STRUCTURE
----------------

*       The following block structures form the basic repeat units on a "tape":

        'Start of input mag tape' block
        Orbit header
        Orbit header
        Radiance data

*       Blocks will have the format:

     (     3654 Sync Code (7106 Octal) (2 bytes indicating start of record)
     (     3654  "    "     "     "    ("   "       "        "   "    "   )
     (     Block length in words                       (2 bytes)
     (     Block # within file (starting at 0)         (2 bytes)
BLOCK(     Identifier                                  (2 bytes)
     (     Data
     (     End mark                                    (2 bytes)
     (     Checksum                                    (2 bytes)

*       End marks signify    End of block (EOB) - 2321 (4421 Octal)
                             End of file  (EOF) - 2730 (5252 Octal)


RECORD IDENTIFIERS
------------------

        3282   (6322 Octal)       'Start of input mag tape' block
        3280   (6320 Octal)       Orbit header block
        3281   (6321 Octal)       Radiance data block


'START OF INPUT MAG TAPE' BLOCK (7 16 BIT INTEGERS)
-------------------------------

WORD      FUNCTION

0         3654 (7106 Octal) Sync Code repeated twice every block
1         3654   "     "     "    "      "       "     "     "
2         Block Length (total number of words in block, all inclusive)
3         Block # (= 0)
4         3282
5         2321 End of block marker (EOB)
6         Checksum


ORBIT HEADER (53 16 BIT INTEGERS)
------------

WORD      FUNCTION

0         3654 (7106 Octal) Sync Code repeated twice every block
1         3654   "     "     "    "      "       "     "     "
2         Block Length (total number of words in block, all inclusive)
3         Block #
4         3280
5         Data Day
6         Data Year
7         Day of Processing
8         Year of Processing
9-10      Orbit #
11        Source
12        Day
13-14     Start time
15        No. of major frames in orbit
16-17     Equator crossing
18-19     Day/Night crossing
20        Flag                                       See note (1)
21-50     Calibration data
51        2730 End of file marker (EOF)
52        Checksum


RADIANCE DATA (1281 16 BIT INTEGERS)
-------------

WORD         FUNCTION

0            3654 (7106 Octal) Sync Code repeated twice every block
1            3654   "     "     "    "      "       "     "     "
2            Block Length, L (Total number of words in block, all inclusive)
3            Block #
4            3281
5            No. of formatted sub-blocks in block (24)
6            Sub-block LENGTH, S (53 WORDS)
7 - 6+S      First sub-block
7+S - 6+2S   Second sub-block, etc.
L-1          End mark
L            Checksum

SUB-BLOCK FORMAT:

0            Day
1-2          Time (in seconds past midnight)
3            Latitude (*8)
4            Longitude (*8)
5            Pitch
6-9          Flags                                   See note (2)
10           Scan mirror status                      See note (3)
11-26        Radiance ch1 (1cm)
27-42        Radiance ch2 (6cm)
43-44        16 second radiances
45-46        Noise
47-48        Modulator amplitudes
49-50        Sieve temperatures
51-52        Modulator frequencies


NOTES
-----

(1) FLAG (in Orbit Header)
    ----

    WORD: 20    BIT: 0   erased orbit (should never occur)
                     1   checksum/parity of day header block incorrect at RAT6
                         stage
                     2   checksum/parity of orbit header incorrect at RAT6 stage
                     3   checksum/parity of calibration data incorrect at RAT6
                         stage
                     4-7 spare
                     8   formatted block copied direct from input tape* (should
                         never occur)
                     9   radiance slots contain housekeeping
                     10  radiance slots contain modulator amplitude
                     11  radiance slots contain scan mirror data


* Here, "input tape" refers to magnetic tapes which were used to write the RAT6
  tapes.


(2) FLAGS (in Data Block)
    -----

    WORD: 6    BIT: 0    channel 2 scan enable
                    1    channel 1 scan enable
                    2    PMR on
                    3    TDRE on
                    4    day/night
                    5    beacon B
                    6    beacon A
                    7    S band B
                    8    S band A
                    9    sync
                    10   checksum PMR in raw data
                    11   checksum header in raw data

    WORD: 7    BIT: 0    launch mode
                    1    electrical zero
                    2    space view channel 2
                    3    BB view channel 2
                    4    earth view channel 2
                    5    space view channel 1
                    6    BB view channel 1
                    7    earth view channel 1
                    8    calibration sequence imminent
                    9    channel 2 calibration enable
                    10   channel 1 calibration enable
                    11   pitch compensated latitude/longitude

    WORD: 8    BIT: 0    discontinuity
                    1    1=rads, 0=volts in radiance slots on channel 2
                    2    1=rads, 0=volts in radiance slots on channel 1
                    3    housekeeping functions expanded
                    4    stray correction has been applied
                    5    spare
                    6    archiving read (by RAT6) was bad
                    7-9  spare
                    10   frequency counter channel 2
                    11   frequency counter channel 1

    WORD: 9    BIT: 0-7  spare
                    6-8  channel 1 sieve
                    9-11 channel 2 sieve


(3) SCAN MIRROR STATUS
    ------------------

    Status information is in X1, Y1, X2 and Y2 form, each item constituting
three bits:

X = 0, good
  = 1, position is outside tolerance levels

Y = 0, vertical view
  = 1-6, number of major frame within view

X or Y = 63, position is unknown