6 releases ()

new 1.0.0-rc.2 Feb 28, 2026
1.0.0-rc.1 Jan 19, 2026
0.1.0 Mar 2, 2025
0.1.0-rc3 Sep 18, 2024
0.1.0-rc.4 Jan 1, 2025

#1859 in Parser implementations


Used in 4 crates

MIT license

3MB
3.5K SLoC

Core data model for NEXRAD weather radar data.

This crate provides an ergonomic API for working with NEXRAD radar data, documented for users who may not be familiar with the NOAA Archive II format.

Overview

The data model consists of:

Example

use nexrad_model::data::{Scan, Sweep, MomentValue};

fn process_scan(scan: &Scan) {
    println!("{}", scan.coverage_pattern_number());

    for sweep in scan.sweeps() {
        for radial in sweep.radials() {
            if let Some(reflectivity) = radial.reflectivity() {
                for value in reflectivity.values() {
                    match value {
                        MomentValue::Value(dbz) => println!("dBZ: {}", dbz),
                        MomentValue::BelowThreshold => {},
                        MomentValue::RangeFolded => {},
                        _ => {},
                    }
                }
            }
        }
    }
}

Features

Optional features provide additional functionality:

  • uom - Type-safe units of measure via the uom crate. Enables methods like first_gate_range() returning Length instead of raw km values.

  • serde - Serialization/deserialization support via serde. All model types implement Serialize and Deserialize.

  • chrono - Date/time support via chrono. Enables collection_time() returning DateTime<Utc> instead of raw timestamps.

Crate Boundaries

This crate is a pure data model with the following responsibilities and constraints:

Responsibilities

  • ✓ Define domain types (Scan, Sweep, Radial, Site, MomentData)
  • ✓ Provide data transformations and validations
  • ✓ Support optional features (serde, chrono, uom)

Constraints

  • No I/O operations (file, network, stdio)
  • No binary parsing or encoding
  • No rendering or visualization
  • No CLI or user interaction

This crate focuses solely on providing ergonomic data structures for working with NEXRAD radar data. All I/O, parsing, and rendering concerns are handled by separate crates in the NEXRAD library suite.


NEXRAD Model

Crates.io Docs.rs Rust CI

A common model for representing NEXRAD weather radar data. Provides an ergonomic API which is documented for an audience who is not necessarily familiar with the NOAA Archive II format.

Features

  • uom: Use the uom crate for type-safe units of measure.
  • serde: Implement serde::Serialize and serde::Deserialize for all models.
  • chrono: Use the chrono crate for date and time types.

Dependencies