Skip to main content

Crate netcdf_reader

Crate netcdf_reader 

Source
Expand description

Pure-Rust NetCDF file reader.

Supports:

  • CDF-1 (classic): CDF\x01 magic
  • CDF-2 (64-bit offset): CDF\x02 magic
  • CDF-5 (64-bit data): CDF\x05 magic
  • NetCDF-4 (HDF5-backed): \x89HDF\r\n\x1a\n magic (requires netcdf4 feature)

§Example

use netcdf_reader::NcFile;

let file = NcFile::open("example.nc").unwrap();
println!("format: {:?}", file.format());
for var in file.variables() {
    println!("  variable: {} shape={:?}", var.name(), var.shape());
}

Re-exports§

pub use error::Error;
pub use error::Result;
pub use types::*;

Modules§

classic
Classic (CDF-1/2/5) NetCDF file format support.
error
masked
_FillValue / missing_value masking for NetCDF variables.
nc4
NetCDF-4 (HDF5-backed) format support.
types
unpack
scale_factor / add_offset unpacking for NetCDF variables.

Structs§

NcFile
An opened NetCDF file.
NcOpenOptions
Configuration options for opening a NetCDF file.
NcSliceIterator
Lazy iterator over slices of a variable along a given dimension.

Enums§

NcFormat
NetCDF file format.

Traits§

NcReadable
Trait alias for types readable from both classic and NetCDF-4 files.