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 |
|
#1859 in Parser implementations
Used in 4 crates
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:
data::Scan- A complete radar scan containing multiple sweepsdata::Sweep- A single rotation at one elevation angledata::Radial- A single beam direction with moment datadata::MomentData- Gate-by-gate measurements for a productmeta::Site- Radar site metadata (location, identifier)
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 theuomcrate. Enables methods likefirst_gate_range()returningLengthinstead of raw km values. -
serde- Serialization/deserialization support viaserde. All model types implementSerializeandDeserialize. -
chrono- Date/time support viachrono. Enablescollection_time()returningDateTime<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
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 theuomcrate for type-safe units of measure.serde: Implementserde::Serializeandserde::Deserializefor all models.chrono: Use thechronocrate for date and time types.