HydroLangGRIB2Parser

HydroLangGRIB2Parser

GRIB2 Parser for HydroLang Parses real GRIB2 meteorological data files

Constructor

new HydroLangGRIB2Parser()

Source:

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

Source:
Returns:

Transformed index

Type
number

calculateGridBounds()

Calculate approximate grid bounds for Lambert Conformal projection

Source:

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

Source:
Returns:

2D grid

Type
Array.<Array>

createGridMetadataResponse()

Create metadata-only response for bbox intersection checking

Source:

(async) extractGRIBMetadataOnly()

Extract GRIB metadata without decoding full data arrays (prevents stack overflow)

Source:

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

Source:
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

Source:
Returns:

HydroLang formatted data

Type
Object

generateBasicCoordinates()

Generate basic coordinates for HRRR grid (CONUS coverage)

Source:

generateCoordinates(grid, bbox) → {Object}

Generate coordinate arrays for the grid

Parameters:
Name Type Description
grid Object

Grid definition

bbox Array

Bounding box (optional)

Source:
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)

Source:
Returns:

Coordinate arrays

Type
Object

getFullGridBounds(grid) → {Array}

Get full grid bounds

Parameters:
Name Type Description
grid Object

Grid definition

Source:
Returns:

Bounding box [west, south, east, north]

Type
Array

getFullGridBounds(grid) → {Array}

Get full grid bounds

Parameters:
Name Type Description
grid Object

Grid definition

Source:
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

Source:
Returns:

Parameter description

Type
string

getParameterDescriptionFromData(data) → {string}

Get parameter description from parsed data

Parameters:
Name Type Description
data Object

Parsed GRIB2 data

Source:
Returns:

Parameter description

Type
string

getParameterDescriptionFromParsedData(data) → {string}

Get parameter description from parsed data

Parameters:
Name Type Description
data Object

Parsed GRIB2 data

Source:
Returns:

Parameter description

Type
string

getParameterFromData(data) → {string}

Get parameter information from parsed data

Parameters:
Name Type Description
data Object

Parsed GRIB2 data

Source:
Returns:

Parameter code

Type
string

getParameterFromData(data) → {string}

Get parameter information from parsed data

Parameters:
Name Type Description
data Object

Parsed GRIB2 data

Source:
Returns:

Parameter code

Type
string

getParameterFromParsedData(data) → {string}

Get parameter from parsed data

Parameters:
Name Type Description
data Object

Parsed GRIB2 data

Source:
Returns:

Parameter code

Type
string

getParameterName()

Get human-readable parameter name

Source:

getParameterNameFromData(data) → {string}

Get parameter name from parsed data

Parameters:
Name Type Description
data Object

Parsed GRIB2 data

Source:
Returns:

Parameter name

Type
string

getParameterNameFromData(data) → {string}

Get parameter name from parsed data

Parameters:
Name Type Description
data Object

Parsed GRIB2 data

Source:
Returns:

Parameter name

Type
string

getParameterNameFromParsedData(data) → {string}

Get parameter name from parsed data

Parameters:
Name Type Description
data Object

Parsed GRIB2 data

Source:
Returns:

Parameter name

Type
string

getUnitsFromData(data) → {string}

Get units from parsed data

Parameters:
Name Type Description
data Object

Parsed GRIB2 data

Source:
Returns:

Units

Type
string

getUnitsFromData(data) → {string}

Get units from parsed data

Parameters:
Name Type Description
data Object

Parsed GRIB2 data

Source:
Returns:

Units

Type
string

getUnitsFromParsedData(data) → {string}

Get units from parsed data

Parameters:
Name Type Description
data Object

Parsed GRIB2 data

Source:
Returns:

Units

Type
string

getVariableFromMessage()

Extract variable name from GRIB2 message

Source:

(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

Source:
Returns:

Parsed GRIB2 data

Type
Object

(async) parseBuffer(buffer) → {Promise.<Object>}

Parse GRIB2 file buffer

Parameters:
Name Type Description
buffer ArrayBuffer

GRIB2 file buffer

Source:
Returns:

Parsed GRIB2 data

Type
Promise.<Object>

(async) parseBufferStreaming()

Parse large GRIB2 files using streaming approach

Source:

parseGRIBHeaders()

Parse GRIB message headers without full decoding

Source:

parseGridSection()

Parse Grid Definition Section (Section 3) for coordinates and dimensions

Source:

parseProductSection()

Parse Product Definition Section (Section 4) for parameter information

Source: