Field


Type

Size

(integers)

Info Flat Size

Integer

1

Grid Type

Integer

1

Grid Info Size

Integer

1

Start Time

Integer

1

End Time

Integer

1

Data Units

Text

3

Data Type

Integer

1

Lower Left Cell X

Integer

1

Lower Left Cell Y

Integer

1

Number of Cells X

Integer

1

Number of Cells Y

Integer

1

Cell Size

Float

1

Compression Method

Integer

1

Compressed Array Size

Integer

1

Compression Scale Factor

Float

1

Compression Base

Float

1

Max Data Value

Float

1

Min Data Value

Float

1

Mean Data Value

Float

1

Number of Ranges

Integer

1

Range Limit Table

Float

20

Range Counts

Integer

20

Grid Header Contents (All Types)


Notes:

  • Info Flat Size should represent the size (in bytes) of the header of the grid record. This is somewhat implementation dependent and results may vary.
  • Grid Type is the integer representation of the DSS record type of the grid. Grid types are numbered starting at 400, as follows.
    • 400: Unknown grid type.  Grid Info contains only the common elements listed in the table above.
    • 410: HRAP grid type.  Grid Info contains common elements and the HRAP data source. 
    • 420: Albers grid type.  Grid Info contains common elements and Albers projection metadata.  This is the type used for SHG grids. 
    • 430: Specified grid type.  Grid Info contains common elements and additional metadata including a general-purpose definition of the spatial reference system.  
    • In some applications, a non-time-varying grid is incremented by adding 1 to the grid type, 411, for example could be used as the grid type of an HRAP grid of some fixed property, such as ground elevation. To date, use of this convention has been inconsistent.  Grid types ending in 1 can safely be assumed to be time-invariant, but grid types ending in 0 cannot always be assumed to be members of a sequence of time-varying grids.
  • Start Time and End Time are represented by an integer number of minutes since 31 Dec 1899, 00:00. This number can be converted to an HecTime using the set() method.
  • Data Units is a string converted to Hollerith values. The three-integer field can contain up to 12 characters.
  • Data Type is one of the following.
    • 0 = Period Average
    • 1 = Period Cumulative
    • 2 = Instantaneous Value
    • 3 = Instantaneous Cumulative
    • 4 = Frequency
    • 5 = Invalid
  • Lower Left Cell X and Y, and Number of Cells X and Y represent the row and column number of the origin, and the extent in rows and columns of the grid in the record, relative to the numbering system implied by the grid reference system (HRAP, SHG, etc.).
  • Cell Size is a float value cast to an int data type for storage. It represents the size, in meters, of a cell in the grid.  Cells are assumed to be square.
  • Compression Method:
    • 0 = Undefined Compression Method
    • 101001 = Precip 2 Byte
    • 26 = Deflate using the ZLIB library function.
  • Compressed Array Size is the number of bytes used in the DSS record to store the compressed array of grid values.
  • Compression Scale Factor and Compression Base are values used for scaling the data in the array for storage. The base is subtracted from each value and the result is divided by the scale Factor.  For precipitation in mm, the base is 0, and scale is 100, so that 5.00mm of rain is represented in the stored array as 500.
  • Min Data Value, Max Data Value, and Mean Data Value apply to non-null values in the array, with their conventional meanings.
  • Number of Ranges, Range Limit Table, and Range Counts provide a data summary. The range count array contains, in decreasing order, the counts of cells that are less than or equal to, the range limit values stored in the range limit array (stored in order of increasing value).  The tables can contain up to 20 values.  The default range array table contains 13 values (NULL, 0.0, 1E-7, 5.0, 10.0, 20.0, 50.0, 100.0, 200.0, 500.0, 1000.0, 2000.0, and 5000.0) which were set for precipitation values in mm for durations on the order of an hour.  Other ranges limits can be set through the programming interface.



Field


Type

Size

(integers)

HRAP Headers append the following

Data Source

Text

3


Albers Headers (including SHG) append the following

Projection Datum

Integer

1

Projection Units

Text

3

First Standard Parallel

Float

1

Second Standard Parallel

Float

1

Central Meridian

Float

1

Latitude of Origin

Float

1

False Easting

Float

1

False Northing

Float

1

X Coordinate of Cell (0,0)

Float

1

Y Coordinate of Cell (0,0)

Float

1

Grid Header Contents (Fixed Spatial Reference)



Notes:

  • Data Source field for HRAP headers can contain up to 12 ASCII characters using Hollerith encoding.
  • Projection Datum for Albers headers is one of the following:
    • 0 = Undefined Projection Datum
    • 1 = NAD 27
    • 2 = NAD 83

Projection Units field for Albers headers can contain up to 12 ASCII characters






Field


Type

Size

(integers)

Specified Grid Info Headers append the following

Version Number

Integer

1

SRS Name Length

Integer

1

SRS Name

Text

As Specified

SRS Definition Type

Integer

1

SRS Definition Length

Integer

1

SRS Definition

Text

As Specified

X Coordinate of Cell (0,0)

Float

1

Y Coordinate of Cell (0,0)

Float

1

Null Value

Float

1

Time Zone ID Length

Int

1

Time Zone ID

Text

As Specified

Time Zone Raw Offset

Integer

1

Is Interval

Boolean

1

Is Time-Stamped

Boolean

1

Grid Header Contents (Specified Spatial Reference)


Notes:

  • Version number is an integer. When a change in the stored information occurs the number will be increased. No dots or sub-versions will be used.
  • The Length fields for SRS Name, SRS Definition, and Time Zone ID specify the number of integers used to store the Hollerith-encoded (four characters per int) SRS Name, SRS Definition, and Time Zone ID text fields.
  • SRS Definition Type is one of the following:
    • 0 = Well-Known Text (WKT)
  • Is Interval and Is Time-Stamped fields are stored as integers.
    • 0= False

1 = True (any non-zero value will convert to True.)