Skip to main content

Crate noawclg

Crate noawclg 

Source
Expand description

§noawclg

Download, analyse and visualise NOAA atmospheric, DWD ICON global, and ocean data.

This is a Rust port of the noawclg Python package, extended with DWD ICON global support. It gives you a clean Rust API over three data streams — GFS weather forecasts, ICON global forecasts, and GODAS/ERSST ocean analyses — with no API key required.

§Feature flags

  • default: pure logic only (catalogue, coordinate helpers, GRIB2/OPeNDAP download & caching machinery, ENSO math), no system dependencies.
  • grib: decode downloaded GFS GRIB2 files into gfs_dataset::GfsDatasets via the pure-Rust [gribberish] crate (pulls in native jpeg2000/png decoders at build time).
  • netcdf-io: GODAS/ERSST access over OPeNDAP and NetCDF4 save/load, via the [netcdf] crate. Requires a system libnetcdf built with DAP support (same runtime requirement the Python library has via netCDF4/h5netcdf).
  • icon: decode DWD ICON global forecasts into the same gfs_dataset::GfsDataset shape GFS uses, via [icon_dataset]. ICON’s native grid is unstructured/icosahedral, so this shells out to the system cdo tool for GRIB2 decoding and applies DWD’s own published nearest-neighbor remap table (see [icon_grid]) in pure Rust to land the result on a regular lat/lon grid. Implies netcdf-io; also requires cdo on PATH at runtime (checked with a clear error::Error::MissingSystemDependency, not a build-time requirement). See the README’s ICON section for install instructions.
  • full: all of the above.

See the crate README for details and a module-by-module comparison with the original Python package.

Re-exports§

pub use catalog::HOURS_10DAYS_3H;
pub use catalog::HOURS_16DAYS;
pub use catalog::HOURS_16DAYS_3H;
pub use catalog::HOURS_5DAYS_1H;
pub use catalog::MULTILEVEL_VARS;
pub use catalog::SURFACE_VARS;
pub use catalog::VARIABLES;
pub use coords::auto_date;
pub use coords::BoundingBox;
pub use coords::Region;
pub use error::Error;
pub use error::Result;
pub use gfs_dataset::GfsDataset;
pub use gfs_dataset::GfsDatasetManager;
pub use gfs_dataset::GfsVariable;
pub use load::load;
pub use ocean::classify_enso;
pub use ocean::enso_summary;
pub use ocean::enso_summary_from_series;
pub use ocean::get_currents;
pub use ocean::get_godas;
pub use ocean::get_nino_anomaly;
pub use ocean::get_ocean_temp;
pub use ocean::get_oni;
pub use ocean::get_salinity;
pub use ocean::get_ssh;
pub use ocean::get_sst_series;
pub use ocean::get_thermocline_depth;
pub use ocean::get_warm_water_volume;
pub use ocean::nino_anomaly_from_series;
pub use ocean::oni_from_series;
pub use ocean::open_ersst;
pub use ocean::open_godas;
pub use ocean::thermocline_depth_from_field4;
pub use ocean::warm_water_volume_from_field4;
pub use ocean::EnsoSummaryRow;
pub use ocean::Field3;
pub use ocean::Field4;
pub use ocean::GodasVarMeta;
pub use ocean::NinoBox;
pub use ocean::OceanCurrents;
pub use ocean::OceanField;
pub use ocean::TimeSeries;
pub use ocean::GODAS_LEVELS;
pub use ocean::GODAS_VARS;
pub use ocean::NINO_BOXES;
pub use query::geocode;
pub use query::Coordinate;
pub use query::GetNoaaData;
pub use query::GetNoaaDataOptions;
pub use view::DatasetView;

Modules§

catalog
GFS variable catalogue and pre-defined forecast-hour sequences.
coords
Coordinate utilities: dimension detection, bbox, date/lon helpers.
error
Crate-wide error type.
gfs_dataset
GFS Dataset Manager: download, parse, and assemble gridded datasets.
http
Shared HTTP infrastructure for NOMADS downloads.
load
Convenience wrapper: load GFS data directly as a GfsDataset.
ocean
Ocean data access: GODAS subsurface fields and ENSO diagnostics.
persistence
Save and load GfsDatasets to/from disk.
query
High-level query API: geocoding, point selection, and time-series access.
view
Lightweight read-only wrapper over a dataset already selected at one grid point.