#radar #weather #nexrad #noaa #meteorology

nexrad-decode

Binary protocol decoding for NEXRAD weather radar data

11 releases ()

new 1.0.0-rc.3 Feb 28, 2026
1.0.0-rc.2 Jan 23, 2026
0.1.2 Jan 3, 2026
0.1.1 Mar 2, 2025
0.1.0-rc2 Aug 12, 2024

#1858 in Parser implementations


Used in 2 crates

MIT license

3.5MB
13K SLoC

Binary protocol decoding for NEXRAD Archive II data.

This crate provides low-level decoding functions and type definitions for NEXRAD weather radar data, implementing NOAA's WSR-88D Interface Control Document for the RDA/RPG (ICD 2620002AA, Build 24.0).

Overview

The main entry point is messages::decode_messages, which parses binary data into structured messages::Message objects:

use nexrad_decode::messages::{decode_messages, MessageContents};

let messages = decode_messages(&decompressed_data)?;

for message in &messages {
    match message.contents() {
        MessageContents::DigitalRadarData(data) => {
            // Process radar data message
        }
        MessageContents::VolumeCoveragePattern(vcp) => {
            // Process VCP information
        }
        _ => {}
    }
}

Message Types

The decoder handles several message types defined in the ICD:

  • Digital Radar Data (Type 31) - Primary radar measurements
  • RDA Status Data (Type 2) - Radar status and alarms
  • Volume Coverage Pattern (Type 5) - Scanning strategy details
  • Clutter Filter Map (Type 15) - Clutter suppression data

Features

  • nexrad-model - Convert decoded messages to nexrad_model types
  • uom - Type-safe units of measure for physical quantities

Module Organization

  • messages - Message parsing and type definitions
  • summarize - Utilities for summarizing message collections
  • binary_data - Wrapper type for binary blobs with debug support

Crate Boundaries

This crate provides binary protocol parsing with the following responsibilities and constraints:

Responsibilities

  • ✓ Parse binary data per NOAA ICD 2620002AA specification
  • ✓ Convert raw bytes into structured message types
  • ✓ Provide conversion to nexrad_model types (when feature enabled)
  • ✓ Validate message structures and checksums

Constraints

  • No I/O operations (operates on byte slices provided by caller)
  • No file or network access
  • No rendering or visualization
  • No CLI or user interaction

This crate is purely concerned with parsing binary protocol data. It accepts byte slices as input and returns structured data types. All I/O operations (reading files, downloading from AWS, decompression) are handled by the nexrad-data crate.


NEXRAD Decode

Crates.io Docs.rs Rust CI

Decoding functions and models for NEXRAD weather radar data. Decoder and struct definitions are in accordance with NOAA's WSR-88D Interface Control Document for the RDA/RPG "ICD 2620002AA".

Features

  • nexrad-model: Provides mappings to a common model for representing NEXRAD radar data.
  • uom: Use the uom crate for type-safe units of measure.

Dependencies