ecmwf-opendata (Rust)
Rust client for ECMWF Open Data.
API documentation (docs.rs): https://docs.rs/ecmwf-opendata
This crate is a Rust re-implementation of the core functionality of the upstream Python project ecmwf-opendata:
- Build MARS-like requests (keyword/value pairs)
- Resolve request → data URLs
- Download whole files, or download selected fields via the
.indexsidecar using HTTPRangerequests
Chinese documentation: see README.zh-CN.md.
Install
Library usage
1) Python-like Client(...) options
Python:
=
Rust:
use ;
let opts = ClientOptions ;
let client = new?;
# Ok::
source can be a known mirror ("ecmwf", "aws", "azure", "google") or a custom base URL ("https://...").
2) Request builder (kwargs-ish)
use ;
let client = new?;
let req = new
.r#type
.param
.step
.target;
let result = client.retrieve_request?;
println!;
# Ok::
3) retrieve_pairs: strongest “kwargs/dict” feel
use ;
let client = new?;
let result = client.retrieve_pairs?;
println!;
# Ok::
CLI
This repository also includes a small CLI example (as a Cargo example target).
Notes / limitations
- This is intentionally a “core features” port; it does not aim to fully replicate every upstream Python feature.
latest()probing depends on endpoint availability. If it fails, specifydate/timeexplicitly.- Data usage is subject to ECMWF Open Data terms (including attribution requirements).