N456RGD.TXT - Format Of Nimbus 4, 5 and 6 Gridded Radiance Tapes.

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

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

*       Files are copies of SCR and PMR Gridded Radiance Tapes.

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

*       The maximum block length is 2048 12-bit numbers.

*       The byte ordering within 16 bit integers follows the DEC convention
        of least significant byte first.

FILE STRUCTURE
--------------

*       Each file contains blocks with the following basic structure :-

        ( 3654 Sync Code (7106 Octal) (2 bytes indicating start of block)
        ( 3654  "    "     "     "    ("   "       "        "   "    "  )
        ( Block Length in words                       (2 bytes)
        ( Block # within file                         (2 bytes)
  Block ( Identifier                                  (2 bytes)
        ( Data
        ( Endmark                                     (2 bytes)
        ( Checksum                                    (2 bytes)

*       Valid values for Endmark are 2321 and 2730 decimal
        (4421 and 5252 Octal respectively).


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

        4032   (7700 Octal)   Start of data day block
        448    (700  Octal)   Partial grid - orbit
        449    (701  Octal)   Final grid - lat/long
        450    (702  Octal)   Zonal Mean Radiances and standard deviations
                              (derived from lat/long grids)
        461    (715  Octal)   Fourier analysis - coefficients of radiance
                              (derived from lat/long grids)
        4033   (7701 Octal)   End of data day block
        4095   (7777 Octal)   End of useful data block

*       For Nimbus 5 uncorrected gridded radiances only, the following
        extra data types occur:

        451    (703  Octal)   Zonal Mean Retrieved Temperature
                              (derived from lat/long grids)
        453    (705  Octal)   Fourier analysis - coefficients of
                              retrieved temperature
        454    (706  Octal)   Retrieved temperature standard deviations

*       For Nimbus 6 gridded radiances only, the following extra types
        of data were used:

        384    (600  Octal)   Zonal Mean Radiances from ZMR program
        465    (721  Octal)   Day/Night differences (gridded block)


START OF DATA DAY BLOCK (22 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         4032
5         Ignore
6         Processing day
7         Processing year
8         Ignore
9         Data Day
10        Data Year
11-15     Ignore
16        No. of orbits (typically 12)
17        Ignore
18-19     No. of major frames - F2 format (See note (1)) (typically 4000)
20        Endmark
21        Checksum


PARTIAL (ORBIT) GRID BLOCK (1180 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         448
5         2925 - No significance
6         Channel                      See note (2)
7         Data Day
8         Data Year
9         Processing Day
10        Processing Year
11        Latitude Increment (=32)   (deg*8)
12        First Latitude, 80 deg S (=-640)   (deg*8)
13        No. of latitude elements (=41)
14        Scaling factor for day-time data, SD1
15        Scaling offset for day-time data, SD0 - F0 format (See note (1))
16        Scaling factor for night-time data, SN1
17        Scaling offset for night-time data, SN0 - F0 format (See note (1))
18        Longitude of first day crossing at equator   (deg*8)
19        Longitude of first night crossing at equator (deg*8)
20-21     Wave number of channel - F4 format (See note (1))   (cm^-1)
22-29     Ignore
30-1177   Data Array (of x), 2 X (14 X 41) (See below)
1178      Endmark
1179      Checksum

Data Array:

    The day and night data are given separately.

    Each day (and night) matrix consists of 14 columns, one for each orbit,
and 41 rows, one for each 4 degree latitude, 80 deg N to 80 deg S,
the 21st element of the row being at the equator.

    The first column gives data for the orbit whose longitude at the equator
is given by (word 18)/8 (day) and (word 19)/8 (night).  The next column is
the orbit immediately eastwards of this first orbit.  Its longitude at the
equator is (word 18)/8 (day) or (word 19)/8 (night) plus 26.6 deg E and so on,
to the 14th orbit.

    The data for the day orbits start at 80 deg S, and for the night orbits
at 80 deg N.  Some orbits or parts of orbits may be missing.  No data or
bad data are indicated by 0.

        Radiance (day)   =  SD0 + X/SD1
           "     (night) =  SN0 + X/SN1

    Thus, word 30 is for 80 deg S first orbit day, word 31 is for 76 deg S
first orbit day, word 71 for 80 deg S 2nd orbit day, word 604 for 80 deg N
first orbit night, word 605 for 76 deg N first orbit night, and word 1177
is for 80 deg S final orbit night.

    Normally,

SD0 = SN0 = 0, and
SD1 = SN1 = 16.0 (20.0 for Nimbus 5 Channel C4D).


FINAL (LAT/LONG) GRID BLOCK (1710 16 BIT INTEGERS)
---------------------------

    These give radiance data from different channels or combinations of
channels.

    The radiances are reduced to a latitude-longitude grid of 37 elements in
longitude (every 10 degrees) and 41 elements in latitude (every 4 degrees from
80 deg S to 80 deg N).  The first and last elements in longitude are equal
180 deg W and 180 deg E) for each latitude.

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          449
5-6        Scaling factor - F4 format (See note (1))   See note (3)
7-8        Ignore
9          Data Day
10         =1,  Day                       ) Radiances indicated - F0 format
           =-1, Night                     ) See note (1)
           =0,  Day/Night (usually mean)  )
11         Channel                          See note (2)
12         No. of longitude elements (=37)
13         No. of latitude elements (=41)
14-15      Ignore
16         Extreme latitudes (*8) (=640)
17-34      Ignore
35         Data Year
36-190     Ignore
191-1707   Data Array (of X) (See below)
1708       Endmark
1709       Checksum


Data Array:

   1st element  :       180 W     80 S
   2nd element  :       170 W     80 S
   3rd element  :       160 W     80 S
   .
   .
   .
   37th element :       180 E     80 S (= 1st element)
   38th element :       180 W     76 S
   .
   .
   .
   Last element :       180 E     80 N 
   (1517th)

*        4095 (i.e. -1) INDICATES NO DATA, OR BAD DATA.


ZONAL MEAN RADIANCES AND STANDARD DEVIATIONS BLOCK
--------------------------------------------------

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         450
5         Data Day
6         Data Year
7         Processing Day
8         Processing Year
9-16      Ignore
17        Channel                                      See note (2)
18-19     Scaling factor - F4 format (See note (1))    See note (3)
20-60     Standard deviations                          See note (4)
61-101    Zonal means                                  See note (5)

*         Words 17-101 are repeated for each channel.

L-1       Endmark
L         Checksum

    To find the number of channels, subtract 17 from block length
and divide by 85.


FOURIER ANALYSIS BLOCK, RADIANCE COEFFICIENTS
---------------------------------------------

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         461
5         Data Day
6         Data Year
7         Processing Day
8         Processing Year
9-12      Ignore
13        Wave Number (One per block)
14-16     Ignore
17        Channel                                              See note (2)
18-19     Scaling factor - F4 format (See note (1))            See note (3)
20-60     Amplitudes of sine components - F0 format (note (1)) See note (6)
61-101    Cosine components - F0 format                        See note (6)

*         Words 17-101 are repeated for each channel.

L-1       Endmark
L         Checksum

    The channels and method of finding number of channels are as for the
zonal mean radiance blocks.


END OF DATA DAY 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 #
4         4033
5         Endmark
6         Checksum


END OF USEFUL DATA 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 #
4         4095
5         Endmark
6         Checksum

------------------------------------------------------------------------------

For Nimbus 5 uncorrected gridded radiances only, files contain the
following extra blocks 

NB - This temperature data is not consistent with the best radiances that
     can be produced.  For most purposes it is best not to use it.


ZONAL MEAN RETRIEVED TEMPERATURE BLOCK
--------------------------------------

    One block per day, derived from the LAT/LONG grids after gap filling,
then retrieved at each grid point.  The length of the block is dependent
on the data.

WORD      FUNCTION

0         3654 (7106 Octal) Sync Code repeated twice every block
1         3654   "     "     "    "      "       "     "     "
2         Block length, L (number of words in block, all
          inclusive)
3         Block #
4         451
5         Data Day
6         Data Year
7         Processing Day
8         Processing Year
9-10      Scaling offset - F2 format (See note (1)), e.g. -160
11-12     Scaling factor - F4 format (See note (1)), e.g. 8.0
13-16     [spare]
17        15
18        Ignore (for contour program)
19        Data Day
20        Ignore
21        Version 1: 1st level as ground temp., 2nd as 1000mb air temp.,
          3rd as 0.2 up etc.;
          Version 2: the same but omitting ground temp.; 1st is surface air;
          Version 1 used 1 band, 1 season mean for retrieval;
          Version 2 used 41 band mean changing daily
22        No. of latitudes (first 80S, last 80N)
23        No. of pressure levels
          (equal intervals of 0.2 in ln(p) starting at 1000mb)
24-40     Ignore
41        Data Year
42-200    Ignore
201 -            Data Array (OF X); R=(X/FACTOR)-OFFSET, R in deg K;
200+(#22)*(#23)  Latitude varies fastest; First element is 80S at surface;
                 Second is surface at (160/(1-#22))+80 deg S, etc.;
                 A data element (X) of -1 indicates missing or bad data;
L-1       Endmark
L         Checksum

*         #N means replace by contents of location (i.e. word number) N.


FOURIER ANALYSIS BLOCK, RETRIEVED TEMPERATURE COEFFICIENTS
----------------------------------------------------------

    Two blocks per wave number (up to about four) per day, derived from the
LAT/LONG grids after gap filling, then retrieved at each grid point.

WORD      FUNCTION

0         3654 (7106 Octal) Sync Code repeated twice every block
1         3654   "     "     "    "      "       "     "     "
2         Block Length, L (number of words in block, all inclusive)
3         Block #
4         453
5         Data Day
6         Data Year
7         Processing Day
8         Processing Year
9-10      Scaling offset - F2 format (See note (1)), normally 0
11-12     Scaling factor - F4 format (See note (1))
13        Wave number - F1 format (See note (1))
14        4095 if X are sin components; 1 if X are cos components;
15        No. of levels (equal intervals of 0.2 in ln p)
16        If 0, first level is ground, 2nd is surface air etc.;
          If 1, ground temp. omitted; 1st is surface air;
          All data with 0 retrieved with 1 band, 1 season mean profile;
          All data with 1 retrieved with 41 band mean changing daily;
17 -      Data Array (of X); Amplitude R=(X/FACTOR)-OFFSET, R in deg K;
16+41*#15 Latitude varies fastest; First element is 80S at surface,
          2nd is 76S at surface, etc.; latitude increment is 4 degrees;
          A data element 2048 indicates no data;
L-1       Endmark
L         Checksum

*         #N means replace by contents of location (i.e. word number) N.


RETRIEVED TEMPERATURE STANDARD DEVIATIONS BLOCK
-----------------------------------------------

    This block gives the standard deviation of temperature from zonal mean
at that particular level and latitude.  R is in K.

    The format is as for the Zonal Mean Retrieved Temperature block.

------------------------------------------------------------------------------

For Nimbus 6 gridded radiances only, files contain the following extra blocks 

ZONAL MEAN RADIANCES BLOCK
--------------------------

    This block contains zonal mean radiances obtained by averaging all
radiances that fall within 10 degree wide latitude bins.  A result is produced
provided there are more than eight points going in to make the average.
This product is similar to the 450 (Zonal Mean Radiances And Standard
Deviations block) product but the latter was produced by interpolating to
4 degree latitude crossings before zonally averaging.
In the past the 450 product has been generally used for scientific analysis. 

    The latitude bins are 85S-75S, 75S-65S, etc. to 75N-85N, a total of 17.
The bins are therefore centred at 80S, 70S, etc. to 80N.  For most bins it
will be evident that the bin will provide an average that is weighted towards
this central latitude.  This is also approximately true for the first and las
bins for the following reason: because the orbit takes the satellite to
81 degrees N and 81 degrees S, these end bins never have data poleward of 81
degrees; however the satellite spends more time at this tangential latitude
than elsewhere, hence the first and last bins will contain a preponderance
of data at the centre biasing the mean to approximately this location. 

    Note that only data where channel 1 was in sieve setting 0 and channel 2
was in sieve setting 1 were used for the averages.  Any other data (rare)
were ignored in obtaining the mean.

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          384
5          Processing Day
6          Processing Year
7          Ignore
8          Data Day
9          Data Year
10         Ignore
11         Channel 1 PMC sieve setting for the day (normally 0)
12         Channel 2 pmc sieve setting for the day (normally 1)

*       Then follow 17 X (24 X 3) mean radiance values.

13         Daytime          80S, 1st channel
14         Nighttime        80S, 1st channel
15         Day + night mean 80S, 1st channel (averaged over all views -
                               not generally just a mean of above two values)
16         Daytime          80S, 2nd channel
17         Nighttime        80S, 2nd channel
18         Day + Night mean 80S, 2nd channel

.
.
.
etc., for 24 channels

*       These 72 words are followed by another 72 for 70S, 72 for 60S, etc..

.
.
.
UNTIL

1234       Daytime          80N, 24th channel
1235       Nighttime        80N, 24th channel
1236       Day + Night mean 80N, 24th channel
1237       Endmark
1238       Checksum

    The channel list is as follows:

-------------------------------------------------------------------------------
Channel                                                          Data Type*
-------------------------------------------------------------------------------
1   Ch1000 (ch 1 radiance at scan centre)                           A
2   Ch1015 (ch 1 radiance at 14.75 degrees)                         A
3   Ch2100 (ch 2 radiance at scan centre)                           A
4   Ch2115 (ch 2 radiance at 14.75 degrees)                         A
5   Ch3000 ((ch1000-0.4*ch2100)/0.6)                                A
6   undefined (was reserved for another radiance combination)
7   undefined (was reserved for another radiance combination)
8   undefined (was reserved for another radiance combination)
9   undefined (was reserved for another radiance combination)
10  undefined (was reserved for another radiance combination)
11  ch 1 1st orthogonal polynomial coefficient                      B
12  ch 1 2nd orthogonal polynomial coefficient                      C
13  ch 1 3rd orthogonal polynomial coefficient                      C
14  ch 1 4th orthogonal polynomial coefficient                      C
15  ch 1 5th orthogonal polynomial coefficient                      C
16  ch 1 6th orthogonal polynomial coefficient                      C
17  ch 1 standard deviation of actual scan from polynomial fit      A
18  ch 2 1st orthogonal polynomial coefficient                      B
19  ch 2 2nd orthogonal polynomial coefficient                      C
20  ch 2 3rd orthogonal polynomial coefficient                      C
21  ch 2 4th orthogonal polynomial coefficient                      C
22  ch 2 5th orthogonal polynomial coefficient                      C
23  ch 2 6th orthogonal polynomial coefficient                      C
24  ch 2 standard deviation of actual scan from polynomial fit      A
-------------------------------------------------------------------------------

* data types (and scaling factors):

A - this is a radiance in units of 1/16 of a mW/M^2/ster/(cm^-1),
    i.e. divide values by 16 to bring to mW/M^2/ster/(cm^-1);
    12-bit positive integers (F1 format (See note (1));
    (zero indicates no data) 

B - this is the first orthogonal polynomial coefficient; -2047 - 2047,
    F0 format (See note (1)); if multiplied by 4.8/(16*SQRT(59)) it will
    give the average radiance over the scan in mW/M^2/ster/(cm^-1);
    (zero indicates no data)

C - these are the remaining orthogonal polynomial coefficients;
    12-bit positive integers (F1 format (See note (1));
    if multiplied by 2.4/(16*SQRT(59)) they will give radiance deviations
    over the scan in mW/M^2/ster/(cm^-1); (2048 indicates no data) 


DAY/NIGHT DIFFERENCES BLOCK
---------------------------

    Produced from the LAT/LONG grids for the channels for which a day/night
mean analysis is derived.  The length of the block is dependant on the data.

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              465
5              Data Day
6              Data Year
7              Processing Day
8              Processing Year
9              Latitude Increment   (deg*8)
10             First latitude, normally 80S
11             No. of latitudes

START CYCLE:

12             Channel
13-14          Scaling factor - F4 format (See note (1))
15-(14+#11)    Zonal average -
               ( (Day/Night radiance)*(scaling factor) ) + 1024,
               i.e. R = (X-1024)/SCALE FACTOR; 4095 is bad or no data

END CYCLE

* This cycle of (3+#11) words is repeated (l-7-7)/(3+#11) times once/channel.

L-1            Endmark
L              Checksum

*         #N means replace by contents of location (i.e. word number) N.


NOTES
-----

    Results are always given in radiance, suitably scaled.  The radiance unit
is always mW m^-2 ster^-1 (cm^-1)^-1.

    Each block holds data for one particular type of analysis,
e.g. one block holds latitude/longitude radiances for one channel for one day.

    The data blocks are arranged chronologically with special blocks marking
the beginning and end of each day, but are in no fixed sequence within each
day. Sometimes (vary rarely) a block may be missing altogether.


(1) Number Formats
    --------------

    The data are binary numbers.  The bulk are in 12-bit positive integer or
signed 2s complement 12-bit integer format but it is occasionally necessary
to use other formats. The abbreviations assigned to the various formats are: 

     F0 : Signed 2s complement 12-bit integer,
     F1 : 12-bit positive number,
     F2 : 24-bit 2s complement integer,
     F4 : 24-bit 2s complement fraction; point after first word.

Examples.

    Suppose the 200th word in the block has a value I1 and it is required to
put the value, in decimal, into A :

     F0 : A = word 200 = I1
          If I1 is >= 2048 then A = A - 4096,
          e. g. 132 -> 132
                4050 -> -46.

     F1 : A = I1,
          e.g. 56 -> 56.

     F2 and F4 occupy 2 words (I2 is word 201).

     F2 : A = (I1 x 4096) + I2
          If I1 >= 2048 then A = A - (4096 x 4096).

     F4 : A = I1 + (I2/4096)
          If I1 >= 2048 then A = A - 4096.


(2) Channel
    -------

    Possible channels with the codes referring to them in the data follow.

For Nimbus 4:

CODE   CHANNEL
1      A
2      B
3      C
4      D
5      F
6      E

    Note the reversal of E and F.  E and F are declouded.*

For Nimbus 5:

CODE   CHANNEL
1      B12 (weighted difference between B1 & B2)
2      B23 (weighted     "         "    B2 & B3)
3      B34 (weighted     "         "    B3 & B4)
4      B4
5      A1
6      A2
20     B4
22     A2D (channel A2 declouded)*
23     A3D (channel A3 declouded)
24     A4D (channel A4 declouded)
28     C4D (channel C4 declouded)

    The following channels are unlikely to be found but have been included here 
for completeness.

9      C1
10     C2
11     C3
12     C4
13     D1
14     D2
15     D3
16     D4
17     B1
18     B2
19     B3
21     A1D (channel A1 declouded)
25     C1D (channel C1 declouded)
26     C2D (channel C2 declouded)
27     C3D (channel C3 declouded)

For Nimbus 6:

    For Nimbus 6 the channel numbers below are first given in decimal and then
in brackets in octal (which is normally the name by which they are known). 
The channels to be found in the files depend on the mode, mainly because
PMC 1 was unable to scan for a long period.

a) normally present:

512         (1000)      PMC 1 sieve setting 0 nadir view
1088        (2100)      PMC 2 sieve setting 1 nadir view
1093        (2105)      PMC 2 sieve setting 1 5 degrees scan angle
1101        (2115)      PMC 2 sieve setting 1 14.5 degrees scan angle
1536        (3000)      1.67*(1000)-0.67*(2100) (highest weighting function)
1120        (2140)      PMC 2 zeroth orthogonal polynomial coefficient
                        (proportional to mean of scan)
1121-1125  (2141-2145)  PMC 2 orthogonal polynomial coefficients 1-5

b) in addition, present except when PMC 1 was not scanning:

525        (1015)       PMC 1 sieve setting 0 14.5 degrees scan angle
544        (1040)       PMC 1 zeroth orthogonal polynomial coefficient
                        (proportional to mean of scan)
545-549    (1041-1045)  PMC 1 orthogonal polynomial coefficients 1-5

    In addition to the above, lat/long grids (449 blocks) for channels 261 and
262 decimal (405 and 406 octal) maybe unintentionally present and should be
ignored.  (They are related to the instrument housekeeping.)

NB - Note that the noise level of channel 1000 was substantially lower when
     PMC 1 was not scanning (because the time of PMC 1 was devoted entirely
     to channel 1000 rather than a range of scan angle).

* Declouded radiances were produced by fitting an upper envelope to the
  radiance as measured along the orbit.  Thus they represent approximately
  the clear-column radiance.


(3) SCALING FACTOR
    --------------
 
    The scaling factor is normally 8.0 (but 10.0 for C4D).  All data have
to be divided by the scaling factor to arrive at the radiance. 


(4) STANDARD DEVIATIONS
    -------------------

R = X x (0.25 / scaling factor)

    2048 indicates missing data.


(5) ZONAL MEANS
    -----------

    Values at every 4 degrees latitude, 80 deg S to 80 deg N.

R = (X / scaling factor)

    2048 indicates bad or missing data.


(6) AMPLITUDES OF SINE AND COS COMPONENTS
    -------------------------------------

    Phase angle is eastwards positive with respect to Greenwich.

R = (X / scaling factor)

    2048 indicates no data.


    This document is an updated version of 'The Selective Chopper Radiometer
on Nimbus 5 Magnetic Tapes', Atmospheric Physics Memorandum No. 74.2.  It has
had extra sections added to it however regarding the format of data blocks
found on some Nimbus 5 and Nimbus 6 magnetic tapes.