Files
nexrad-level-2-data/API.md
T
2022-04-11 13:44:32 -05:00

14 KiB

Classes

Level2Radar

Typedefs

HighResData : object

See NOAA documentation for detailed meanings of these values.

MessageHeader : object

See NOAA documentation for detailed meanings of these values.

Radial
Volume

Level2Radar

Kind: global class

new Level2Radar(file, [options])

Parses a Nexrad Level 2 Data archive or chunk. Provide rawData as a Buffer. Returns an object formatted per the ICD FOR RDA/RPG - Build RDA 20.0/RPG 20.0 (PDF), or as close as can reasonably be represented in a javascript object. Additional data accessors are provided in the returned object to pull out typical data in a format ready for processing.

Param Type Default Description
file Buffer | Level2Radar Buffer with Nexrad Level 2 data. Alternatively a Level2Radar object, typically used internally when combining data.
[options] object Parser options
[options.logger] object | boolean console By default error and information messages will be written to the console. These can be suppressed by passing false, or a custom logger can be provided. A custom logger must provide the log() and error() function.

level2Radar.setElevation(elevation)

Sets the elevation in use for get* methods

Kind: instance method of Level2Radar
Category: Configuration

Param Type Description
elevation number Selected elevation number

level2Radar.getAzimuth([scan]) ⇒ number | Array.<number>

Returns an single azimuth value or array of azimuth values for the current elevation and scan (or all scans if not provided). The order of azimuths in the returned array matches the order of the data in other get* functions.

Kind: instance method of Level2Radar
Returns: number | Array.<number> - Azimuth angle
Category: Data

Param Type Description
[scan] number Selected scan

level2Radar.getHighresReflectivity([scan]) ⇒ HighResData | Array.<HighResData>

Returns an Object of radar reflectivity data for the current elevation and scan (or all scans if not provided)

Kind: instance method of Level2Radar
Returns: HighResData | Array.<HighResData> - Scan's high res reflectivity data, or an array of the data.
Category: Data

Param Type Description
[scan] number Selected scan or null for all scans in elevation

level2Radar.getHighresVelocity([scan]) ⇒ HighResData | Array.<HighResData>

Returns an Object of radar velocity data for the current elevation and scan (or all scans if not provided)

Kind: instance method of Level2Radar
Returns: HighResData | Array.<HighResData> - Scan's high res velocity data, or an array of the data.
Category: Data

Param Type Description
[scan] number Selected scan, or null for all scans in this elevation

level2Radar.getHighresSpectrum([scan]) ⇒ HighResData | Array.<HighResData>

Returns an Object of radar spectrum data for the current elevation and scan (or all scans if not provided)

Kind: instance method of Level2Radar
Returns: HighResData | Array.<HighResData> - Scan's high res spectrum data, or an array of the data.
Category: Data

Param Type Description
[scan] number Selected scan, or null for all scans in this elevation

level2Radar.getHighresDiffReflectivity([scan]) ⇒ HighResData | Array.<HighResData>

Returns an Object of radar differential reflectivity data for the current elevation and scan (or all scans if not provided)

Kind: instance method of Level2Radar
Returns: HighResData | Array.<HighResData> - Scan's high res differential reflectivity data, or an array of the data.
Category: Data

Param Type Description
[scan] number Selected scan or null for all scans in elevation

level2Radar.getHighresDiffPhase([scan]) ⇒ HighResData | Array.<HighResData>

Returns an Object of radar differential phase data for the current elevation and scan (or all scans if not provided)

Kind: instance method of Level2Radar
Returns: HighResData | Array.<HighResData> - Scan's high res differential phase data, or an array of the data.
Category: Data

Param Type Description
[scan] number Selected scan or null for all scans in elevation

level2Radar.getHighresCorrelationCoefficient([scan]) ⇒ HighResData | Array.<HighResData>

Returns an Object of radar correlation coefficient data for the current elevation and scan (or all scans if not provided)

Kind: instance method of Level2Radar
Returns: HighResData | Array.<HighResData> - Scan's high res correlation coefficient data, or an array of the data.
Category: Data

Param Type Description
[scan] number Selected scan or null for all scans in elevation

level2Radar.getScans() ⇒ number

Return the number of scans in the current elevation

Kind: instance method of Level2Radar
Category: Metadata

level2Radar.getHeader([scan]) ⇒ MessageHeader

Return message_header information for all scans or a specific scan for the selected elevation

Kind: instance method of Level2Radar
Category: Metadata

Param Type Description
[scan] number Selected scan, omit to return all scans for this elevation

level2Radar.listElevations() ⇒ Array.<number>

List all available elevations

Kind: instance method of Level2Radar
Category: Metadata

Level2Radar.combineData(...data) ⇒ Level2Radar

Combines the data returned by multiple runs of the Level2Data constructor. This is typically used in "chunks" mode to combine all azimuths from one revolution into a single data set. data can be provided as an array of Level2Radar objects, individual Level2Data parameters or any combination thereof.

The combine function blindly combines data and the right-most argument will overwrite any previously provided data. Individual azimuths located in Level2Radar.data[] will be appended. It is up to the calling routine to properly manage the parsing of related chunks and send it in to this routine.

Kind: static method of Level2Radar
Returns: Level2Radar - Combined data

Param Type Description
...data Level2Radar Data to combine

HighResData : object

See NOAA documentation for detailed meanings of these values.

Kind: global typedef
Properties

Name Type Description
gate_count number
gate_size number
first_gate number
rf_threshold number
snr_threshold number
scale number
offset number
block_type string 'D'
control_flags number
data_size number
name string 'REF', 'VEL', 'SW ', 'ZDR', 'PHI', 'RHO'
spare Array.<Buffer> Spare data per the documentation
moment_data Array.<number> Scaled data

MessageHeader : object

See NOAA documentation for detailed meanings of these values.

Kind: global typedef
Properties

Name Type
aim number
ars number
compress_idx number
cut number
dcount number
elevation_angle number
elevation_number number
id string
julian_date number
mseconds number
phi HighResData
radial Radial
radial_length number
radial_number number
[reflect] HighResData
[rho] HighResData
rs number
rsbs number
spectrum HighResData
sp number
volume Volume
[velocity] HighResData
[zdr] HighResData

Radial

Kind: global typedef
Properties

Name Type Description
block_type string 'R'
horizontal_calibration number
horizontal_noise_level number
name string 'RAD'
nyquist_velocity number
radial_flags number
size number
unambiguous_range number
vertical_calibration number
vertical_noise_level number

Volume

Kind: global typedef
Properties

Name Type Description
block_type string 'R'
calibration number
differential_phase number
differential_reflectivity number
elevation number
feedhorn_height number
latitude number
longitude number
name string 'VOL'
processing_status number
size number
tx_horizontal number
tx_vertical number
version_major number
version_minor number
volume_coverage_pattern number
zdr_bias_estimate number