Expand description
Pure-Rust NetCDF file reader.
Supports:
- CDF-1 (classic):
CDF\x01magic - CDF-2 (64-bit offset):
CDF\x02magic - CDF-5 (64-bit data):
CDF\x05magic - NetCDF-4 (HDF5-backed):
\x89HDF\r\n\x1a\nmagic (requiresnetcdf4feature)
§Example
use netcdf_reader::NcFile;
let file = NcFile::open("example.nc").unwrap();
println!("format: {:?}", file.format());
for var in file.variables().unwrap() {
println!(" variable: {} shape={:?}", var.name(), var.shape());
}Re-exports§
pub use error::Error;pub use error::Result;pub use user_defined::NcArrayValue;pub use user_defined::NcCompoundFieldView;pub use user_defined::NcCompoundValueField;pub use user_defined::NcEnumValue;pub use user_defined::NcValue;pub use user_defined::NcValueView;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.
- user_
defined - Decoders for NetCDF-4 user-defined data values.
Structs§
- Block
Cache Stats - Point-in-time statistics for
BlockCacheStorage. - Block
Cache Storage - Block-aligned LRU cache for any random-access storage backend.
- Bytes
Storage - In-memory storage backed by owned bytes.
- Chunk
Cache Stats - Point-in-time statistics for a
ChunkCache. - Dataset
Chunk - One decoded chunk from a chunked dataset.
- Dataset
Chunk Iterator - Iterator over decoded chunks in a chunked dataset.
- File
Storage - File-backed storage that serves explicit byte ranges via positional reads.
- Filesystem
External File Resolver - Filesystem resolver for external raw data files.
- Filesystem
External Link Resolver - Filesystem resolver for external links. Linked files are cached after the first successful open.
- Mmap
Storage - In-memory storage backed by a read-only memory map.
- NcFile
- An opened NetCDF file.
- NcOpen
Options - Configuration options for opening a NetCDF file.
- NcSlice
Iterator - Lazy iterator over slices of a variable along a given dimension.
- Range
Request Storage - Storage backed by a caller-provided byte-range reader.
- Storage
Buffer - An immutable byte range returned by a storage backend.
Enums§
- NcFormat
- NetCDF file format.
- NcMetadata
Mode - NetCDF-4 metadata reconstruction policy.
Traits§
- External
File Resolver - Resolves file names from HDF5 External Data Files messages to storage.
- External
Link Resolver - Resolves HDF5 external links to another opened file.
- NcReadable
- Trait alias for types readable from both classic and NetCDF-4 files.
- Storage
- Random-access, immutable byte storage for HDF5 parsing and reads.