NCAR TAPE FORMAT FOR NAVY GRID DATA
(ALL GRID TYPES-DATA SETS: 240.0, 240.1, 240.5, 240.6, 018.0, 104.0)
  1. This writeup describes the format of tapes containing grid analysis data from the U.S. Navy Fleet Numerical Oceanography Center (formerly Fleet Numerical Weather Central). These analyses include the following types of grids:


    Grid NameDimensionsNumber of
    Points
    Grid Coverage

    Northern Hemisphere63 x 633969north pole to about 0.2N
    Southern Hemisphere63 x 633969south pole to about 0.2S
    Northern Hemisphere125 x 12515625double resolution of 63x63
    Southern Hemisphere125 x 12515625double resolution of 63x63
    Global Spherical144 x 7310512entire globe
    Global Band144 x 497056tropical band 40.9S to 59.7N

    They are packed according to the format given below. The routine GBYTES has been written for several computers, is documented in NCAR TN/IA-93, and makes the unpacking of binary data a simple task.

    These grids have not been converted to a standard set of units, partly because of lack of time, and partly because of the loss of precision during such conversions.


  2. Tape physical format:
    1. Load point on the tape.
    2. One tape block (physical record) for each data grid (logical record). Each block contains the identification along with the data. There are no separate tape label records. The blocks are written in binary mode (odd parity).
    3. An end of file (EOF) follows the last data record.


  3. Data record format (written in terms of 60 bit words). Also see paragraph 6. The data are packed in binary as follows:
    1. Words 1 and 2 are the grid label:

      FIELDformyearmondayhourpresvarforemiscaphys
      rec
      sourcestatbiasscalemiscb
      BITS PRIOR TO FIELD06131722273746556567737894110
      FIELD WIDTH (BITS)67455109910265161610

      where:
      FieldDescription
      form
      format number:  3 - Northern Hemisphere 63 x 63
      4 - Southern Hemisphere 63 x 63
      10 - Global Band 144 x 49
      11 - Global Spherical 144 x 73
      13 - Northern Hemisphere 125 x 125
      14 - Southern Hemisphere 125 x 125
      year year without century, e.g. 65 = 1965
      monmonth, 1 to 12 for January to December
      dayday of month, 1 to 31. On a monthly mean grid, this value is 0 - see miscb.
      hourGreenwich mean time of analysis, 00Z, 06Z, 12Z or 18Z
      prespressure level in millibars. Levels with higher pressure values generally appear first on the tape. Sea level pressure uses 1013. Surface oceanographical is 1013. Surface meteorological is 1001. Upper air levels are: 1000, 925, 850, 700, 500, 400, 300, 250, 200, 100, 50, 30 & 10. See Table 1.
      varvariable code such as 1 for heights, 10 for temperatures See Tables 1 and 2 for availability, codes, and units.
      fore0 for an analysis, non-zero for forecast
      miscaunused (intended for second pressure of thickness fields)
      phys recunused (artifact from old three-record format, the presence of which requires modification of RGRID type inventory)
      sourcesource of the analysis, 3 = U.S. Navy F.N.O.C.
      staton daily grids this is the grid status or quality:
      0- OK, no known problems
      non-zero- there are problems, but the user may find some of the grid to be useful
      on monthly grids it equals (miscb / 4.) + .5
      biasthe bias value used in packing the data so that all packed values are positive. 32768 for most grids.
      scalescale value used in packing grid values, packed as bias + scale, so that -6 for SST is packed as 32762
      miscbunused on daily grids. On monthly mean grids this value is the number of days used to make the mean grid.

    2. Word 3 is a CDC 7600 floating point value for the Base Value. See paragraph 4 for its incorporation in the unpacking. This value is usually zero. For height grids, it contains the ICAO standard height for the level involved.

    3. Words 4 through the word shown below hold the packed data points, as a continous string of 16-bit bytes. The last 60-bit word is zero padded. The last 60-bit word used, by grid size:
      GridNumber of
      Points
      In Words 4
      Through
      Unused Bits
      (0 Padding)
      63 x 633969106236
      125 x 12515625417020
      144 x 7310512280748
      144 x 497056188524

    4. Following the last 60-bit word containing the packed data points, is a 60-bit checksum obtained by adding all the preceding 60-bit words. This addition is an add and carry logical addition (as performed by a CDC 7600)
    5. Following the checksum is up to 16 60-bit words containing parts of the original Navy identification information plus some extraneous bits found at the end of the original data records. At this time, these are of no interest to the user, except as a consideration for defining a maximum buffer (or tape block) size.


  4. Unpacking the data points:

    The data can be unpacked with the folowing equation, which is used in the RUNAVY routines:

    True Value = Base Value + (Packed value - Bias) * 2Scale
    The value Scale is packed in the record as described above. Table 3 llustrates a sample unpack of a grid label.

  5. Grid format / indexing:

    Figures 1 through 6 show the general layout of the grid data points. The indexing for the grids is as follows:

    1. 63 x 63 or 125 x 125. Origin, GRID(1,1) at lower left. For GRID(I,J): J=1, I scans from left to right, then J steps up 1, so that:

      63 X 63125 X 125

      Packed
      Point
      Grid
      I,J
      Packed
      Point
      Grid
      I,J
      11,111,1
      22,122,1
      33,133,1
      ............
      6363,1125125,1
      641,21261,2
      ............
      198532,32781363,63(Pole)
      ............
      396761,6315623123,125
      396862,6315624124,125
      396963,6315625125,125

      The 63 x 63 grid is an extension of the NMC 47 x 51 octagonal grid. The pole point on the Navy grid, I,J = 32,32 corresponds to I,J = 24,26 on the NMC grid.

    2. 144 x 73 or 144 x 49. Origin, GRID(1,1) at upper left. For GRID(I,J): J=1, I scans from top to bottom, then J steps right 1, so that:

      144 X 73144 X 49

      Packed
      Point
      Grid
      I,J
      Lat/LonPacked
      Point
      Grid
      I,J
      Lat/Lon
      11,190.0 N, 60.0 E11,159.7 N, 60.0 E
      22,187.5 N, 60.0 E22,158.6 N, 60.0 E
      33,185.0 N, 60.0 E33,157.4 N, 60.0 E
      ............
      3737,10.0 N, 60.0 E31,10.0 N, 60.0 E
      ............
      7272,187.5 S, 60.0 E4848,139.0 S, 60.0 E
      7373,1 90.0 S, 60.0 E4949,140.9 S, 60.0 E
      741,290.0 N, 62.5 E501,259.7 N, 62.5 E
      ............
      875972,120 87.5 S, 357.5 E587948,12039.0 S,357.5 E
      876073,120 90.0 S, 357.5 E588049,12040.9 S,357.5 E
      87611,121 90.0 N, 0.0 E58811,12159.7 N, 0.0 E
      ............
      1051071,144 85.0 S, 57.5 E......
      1051172,144 87,5 S, 57.5 E705548,14439.0 S, 57.5 E
      1051273,144 90.0 S, 57.5 E705649,14440.9.S, 57.5 E



  6. Sample grid unpack:
    1. Showing the grid label and the first data point (DP#1)

      DataPacked
      Binary Value
      OctalBase 10Meaning

      form000113363 x 63 grid
      year1000001101651965
      mon011066June
      day11101352929th
      hour01100141212Z
      pres000000101012101023 - 173 = 850mbs
      var0001110107157sea surface temperature
      fore00000000000an analysis
      misca0000000000not used
      phys rec00no longer used
      source00001133U.S. Navy
      stat0000000no known problems with the grid
      bias100000000000000010000032768see unpacking formula
      scale01111111111110107777232762Scale = 32762 - 32768 = -6
      miscb0000000000not used on a daily
      base60 bits of zero00see unpacking formula
      DP#1100001100100011110310734375= 0 + (34375 - 32768) * 2**(-6) = 25.109


    2. Examples of the CDC 7600 floating point word

      The base value in Word 3 will be in the form:

      BITS         1  2     12  13     60
      -----------------------------------
      MEANING   sign  exponent  magnitude
      -----------------------------------
      
      When a number is negative (sign bit on) the entire word will be in 1's complement form. The exponent is biased by 2000 (base 8) for exponents greater than zero, and 1777 (base 8) for exponents less than zero. The binary point for the magnitude is assumed to be at the extreme right, Thus a packed value of 1773 (base 8) would represent an exponent of -4 (base 8). A value of 2005 (base 8) would represent an exponent of +5 (base 8). Values ordinarily are normalized to the left with the first significant digit in the high order position.

      Value7600 Representation (Octal)

      -2.00060563777777777777777
      -1.00060573777777777777777
      0.000000000000000000000
      1.00017204000000000000000
      2.00017214000000000000000
      3.12517216200000000000000
      301100.00017424460260000000000
      11300.00017355411000000000000

      TABLE 1 - LEVELS AND VARIABLES
      Level (mb)Variables

      1013slp sst currents
      1001t ddep e u v dd ff
      1000z t ddep e u v dd ff
      925z t ddep e u v omg
      850z t ddep e u v dd ff omg
      700z t ddep e u v dd ff omg
      5011000-500 thick
      500z t ddep e u v dd ff omg
      400z t ddep e u v dd ff
      300z t ddep e u v dd ff omg
      250z t u v dd ff
      200z t u v dd ff omg
      150z t u v dd ff omg
      100z t u v dd ff omg
      70z t u v
      50z t u v dd ff omg
      30z t u v dd ff omg
      20z t u v
      10z t u v dd ff omg
      5z t u v
      2z t u v
      1z t u v
      0.4z t u v

      **Not all of these are available in each grid type, see inventories.
      TABLE 2 - VARIABLE CODES AND UNITS
      Variable
      Code
      MeaningUnits

      1z - geopotential height g.p. centimeters
      6slp - sea level pressuremillibars
      10t - temperatureCelsius
      12ddep - dewpoint depressionCelsius
      30u - u wind componentcentimeters per second
      31v - v wind componentcentimeters per second
      33**dd - wind directiondegrees / 10
      34**ff - wind forceknots
      40omg - vertical motioncentimeters per second
      45e - vapor pressuremillibars
      55sst5 - sst 5 day meanCelsius
      56ssta - sst anomalyCelsius
      57sst - sea sfc temperatureCelsius
      58sst - NCAR yrmo mean sstCelsius
      59sst - NCAR long term meanCelsius

      **these are in a geographic orientation (whereas the u and v components are positive along the positive i and j directions of the grid)