A javascript implementation for decoding Nexrad Level II radar archive files. It currently does not support decoding bzip compressed radar data, or non-highres radar data.
You can find more information on how radar data is encoded at NOAA
$ git clone https://github.com/bartholomew91/nexrad-radar-data.git
const { Level2Radar } = require('./index')
const file_to_load = "KTLX20130420_205120_V06" // The radar archive file to load
new Level2Radar(file_to_load).then(radar => {
console.log(radar.getHighresReflectivity())
})
You can find an example of using the library HERE
Sets the elevation you want to grab the data from
Sets the current scan you want to grab the data from
Alias for setScan
Returns an Object of radar reflectivity data for the current elevation and scan in the following format
{
gate_count: Number,
first_gate: Number,
gate_size: Number,
rf_threshold: Number,
snr_threshold: Number,
scale: Number,
offset: Number,
data_offset: Number,
moment_data: Array
}
Returns an Object of radar velocity data for the current elevation and scan in the following format
{
gate_count: Number,
first_gate: Number,
gate_size: Number,
rf_threshold: Number,
snr_threshold: Number,
scale: Number,
offset: Number,
data_offset: Number,
moment_data: Array
}
Returns an Object of radar spectrum data for the current elevation and scan in the following format
{
gate_count: Number,
first_gate: Number,
gate_size: Number,
rf_threshold: Number,
snr_threshold: Number,
scale: Number,
offset: Number,
data_offset: Number,
moment_data: Array
}
Returns an Object of radar diff reflectivity data for the current elevation and scan in the following format
{
gate_count: Number,
first_gate: Number,
gate_size: Number,
rf_threshold: Number,
snr_threshold: Number,
scale: Number,
offset: Number,
data_offset: Number,
moment_data: Array
}
Returns an Object of radar diff phase data for the current elevation and scan in the following format
{
gate_count: Number,
first_gate: Number,
gate_size: Number,
rf_threshold: Number,
snr_threshold: Number,
scale: Number,
offset: Number,
data_offset: Number,
moment_data: Array
}
Returns an Object of radar correlation coefficient data for the current elevation and scan in the following format
{
gate_count: Number,
first_gate: Number,
gate_size: Number,
rf_threshold: Number,
snr_threshold: Number,
scale: Number,
offset: Number,
data_offset: Number,
moment_data: Array
}
- RHO moment data parsing is not working
- Add bZip data decompression for newer archives
- Allow loading from tar files and web
- Add non-highres reflection and velocity data
This work is based on the project of Unidata
MIT © Matt Johnston