Methods
applyScanningMode(index, grid, numRows, numCols) → {number}
Apply scanning mode transformations to grid indices
Parameters:
| Name | Type | Description |
|---|---|---|
index |
number | Linear index |
grid |
Object | Grid definition |
numRows |
number | Number of rows |
numCols |
number | Number of columns |
Returns:
Transformed index
- Type
- number
calculateGridBounds()
Calculate approximate grid bounds for Lambert Conformal projection
convertTo2DGrid(values, grid) → {Array.<Array>}
Convert 1D values array to 2D grid
Parameters:
| Name | Type | Description |
|---|---|---|
values |
Array | 1D array of values |
grid |
Object | Grid definition |
Returns:
2D grid
- Type
- Array.<Array>
createGridMetadataResponse()
Create metadata-only response for bbox intersection checking
(async) extractGRIBMetadataOnly()
Extract GRIB metadata without decoding full data arrays (prevents stack overflow)
extractParsedData(message, options) → {Object}
Extract data in HydroLang format from parsed GRIB2
Parameters:
| Name | Type | Description |
|---|---|---|
message |
Object | Parsed GRIB2 message |
options |
Object | Extraction options |
Returns:
HydroLang formatted data
- Type
- Object
extractParsedData(message, options) → {Object}
Extract data in HydroLang format from parsed GRIB2
Parameters:
| Name | Type | Description |
|---|---|---|
message |
Object | Parsed GRIB2 message |
options |
Object | Extraction options |
Returns:
HydroLang formatted data
- Type
- Object
generateBasicCoordinates()
Generate basic coordinates for HRRR grid (CONUS coverage)
generateCoordinates(grid, bbox) → {Object}
Generate coordinate arrays for the grid
Parameters:
| Name | Type | Description |
|---|---|---|
grid |
Object | Grid definition |
bbox |
Array | Bounding box (optional) |
Returns:
Coordinate arrays
- Type
- Object
generateCoordinatesFromParsedData(grid, bbox) → {Object}
Generate coordinates from parsed GRIB2 data
Parameters:
| Name | Type | Description |
|---|---|---|
grid |
Object | Grid definition from parsed data |
bbox |
Array | Bounding box (optional) |
Returns:
Coordinate arrays
- Type
- Object
getFullGridBounds(grid) → {Array}
Get full grid bounds
Parameters:
| Name | Type | Description |
|---|---|---|
grid |
Object | Grid definition |
Returns:
Bounding box [west, south, east, north]
- Type
- Array
getFullGridBounds(grid) → {Array}
Get full grid bounds
Parameters:
| Name | Type | Description |
|---|---|---|
grid |
Object | Grid definition |
Returns:
Bounding box [west, south, east, north]
- Type
- Array
getParameterDescriptionFromData(data) → {string}
Get parameter description from parsed data
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object | Parsed GRIB2 data |
Returns:
Parameter description
- Type
- string
getParameterDescriptionFromData(data) → {string}
Get parameter description from parsed data
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object | Parsed GRIB2 data |
Returns:
Parameter description
- Type
- string
getParameterDescriptionFromParsedData(data) → {string}
Get parameter description from parsed data
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object | Parsed GRIB2 data |
Returns:
Parameter description
- Type
- string
getParameterFromData(data) → {string}
Get parameter information from parsed data
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object | Parsed GRIB2 data |
Returns:
Parameter code
- Type
- string
getParameterFromData(data) → {string}
Get parameter information from parsed data
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object | Parsed GRIB2 data |
Returns:
Parameter code
- Type
- string
getParameterFromParsedData(data) → {string}
Get parameter from parsed data
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object | Parsed GRIB2 data |
Returns:
Parameter code
- Type
- string
getParameterName()
Get human-readable parameter name
getParameterNameFromData(data) → {string}
Get parameter name from parsed data
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object | Parsed GRIB2 data |
Returns:
Parameter name
- Type
- string
getParameterNameFromData(data) → {string}
Get parameter name from parsed data
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object | Parsed GRIB2 data |
Returns:
Parameter name
- Type
- string
getParameterNameFromParsedData(data) → {string}
Get parameter name from parsed data
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object | Parsed GRIB2 data |
Returns:
Parameter name
- Type
- string
getUnitsFromData(data) → {string}
Get units from parsed data
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object | Parsed GRIB2 data |
Returns:
Units
- Type
- string
getUnitsFromData(data) → {string}
Get units from parsed data
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object | Parsed GRIB2 data |
Returns:
Units
- Type
- string
getUnitsFromParsedData(data) → {string}
Get units from parsed data
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object | Parsed GRIB2 data |
Returns:
Units
- Type
- string
getVariableFromMessage()
Extract variable name from GRIB2 message
(async) parseBuffer(buffer, options) → {Object}
Parse GRIB2 file buffer and extract data
Parameters:
| Name | Type | Description |
|---|---|---|
buffer |
ArrayBuffer | GRIB2 file buffer |
options |
Object | Parsing options |
Returns:
Parsed GRIB2 data
- Type
- Object
(async) parseBuffer(buffer) → {Promise.<Object>}
Parse GRIB2 file buffer
Parameters:
| Name | Type | Description |
|---|---|---|
buffer |
ArrayBuffer | GRIB2 file buffer |
Returns:
Parsed GRIB2 data
- Type
- Promise.<Object>
(async) parseBufferStreaming()
Parse large GRIB2 files using streaming approach
parseGRIBHeaders()
Parse GRIB message headers without full decoding
parseGridSection()
Parse Grid Definition Section (Section 3) for coordinates and dimensions
parseProductSection()
Parse Product Definition Section (Section 4) for parameter information