new Level2Radar(file [, options])
Parses a Nexrad Level 2 Data archive or chunk. Provide `rawData` as a `Uint8Array`. Returns an object formatted per the [ICD FOR RDA/RPG - Build RDA 20.0/RPG 20.0 (PDF)](https://www.roc.noaa.gov/wsr88d/PublicDocs/ICDs/2620002U.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.
Radar data is accessed through the get* methods
Parameters:
| Name | Type | Argument | Description |
|---|---|---|---|
file |
Uint8Array | Level2Radar | Uint8Array with Nexrad Level 2 data. Alternatively a Level2Radar object, typically used internally when combining data. | |
options |
ParserOptions |
<optional> |
Parser options |
Members
-
hasGaps :boolean
-
Gaps were found in the source data
Type:
- boolean
-
header :Header
-
Type:
-
isTruncated :boolean
-
Source data was truncated
Type:
- boolean
-
vcp :Vcp
-
Type:
Methods
-
<static> combineData(data)
-
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.
Parameters:
Name Type Argument Description dataLevel2Radar <repeatable>
Data to combine Returns:
Combined data- Type
- Level2Radar
-
getAzimuth( [scan])
-
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.
Parameters:
Name Type Argument Description scannumber <optional>
Selected scan Returns:
Azimuth angle- Type
- number | Array.<number>
-
getHeader( [scan])
-
Return message_header information for all scans or a specific scan for the selected elevation
Parameters:
Name Type Argument Description scannumber <optional>
Selected scan, omit to return all scans for this elevation Returns:
- Type
- MessageHeader
-
getHighresCorrelationCoefficient( [scan])
-
Returns an Object of radar correlation coefficient data for the current elevation and scan (or all scans if not provided)
Parameters:
Name Type Argument Description scannumber <optional>
Selected scan or null for all scans in elevation Returns:
Scan's high res correlation coefficient data, or an array of the data.- Type
- HighResData | Array.<HighResData>
-
getHighresDiffPhase( [scan])
-
Returns an Object of radar differential phase data for the current elevation and scan (or all scans if not provided)
Parameters:
Name Type Argument Description scannumber <optional>
Selected scan or null for all scans in elevation Returns:
Scan's high res differential phase data, or an array of the data.- Type
- HighResData | Array.<HighResData>
-
getHighresDiffReflectivity( [scan])
-
Returns an Object of radar differential reflectivity data for the current elevation and scan (or all scans if not provided)
Parameters:
Name Type Argument Description scannumber <optional>
Selected scan or null for all scans in elevation Returns:
Scan's high res differential reflectivity data, or an array of the data.- Type
- HighResData | Array.<HighResData>
-
getHighresReflectivity( [scan])
-
Returns an Object of radar reflectivity data for the current elevation and scan (or all scans if not provided)
Parameters:
Name Type Argument Description scannumber <optional>
Selected scan or null for all scans in elevation Returns:
Scan's high res reflectivity data, or an array of the data.- Type
- HighResData | Array.<HighResData>
-
getHighresSpectrum( [scan])
-
Returns an Object of radar spectrum data for the current elevation and scan (or all scans if not provided)
Parameters:
Name Type Argument Description scannumber <optional>
Selected scan, or null for all scans in this elevation Returns:
Scan's high res spectrum data, or an array of the data.- Type
- HighResData | Array.<HighResData>
-
getHighresVelocity( [scan])
-
Returns an Object of radar velocity data for the current elevation and scan (or all scans if not provided)
Parameters:
Name Type Argument Description scannumber <optional>
Selected scan, or null for all scans in this elevation Returns:
Scan's high res velocity data, or an array of the data.- Type
- HighResData | Array.<HighResData>
-
getScans()
-
Return the number of scans in the current elevation
Returns:
- Type
- number
-
listElevations()
-
List all available elevations
Returns:
- Type
- Array.<number>
-
setElevation(elevation)
-
Sets the elevation in use for get* methods
Parameters:
Name Type Description elevationnumber Selected elevation number