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().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§

BlockCacheStats
Point-in-time statistics for BlockCacheStorage.
BlockCacheStorage
Block-aligned LRU cache for any random-access storage backend.
BytesStorage
In-memory storage backed by owned bytes.
ChunkCacheStats
Point-in-time statistics for a ChunkCache.
DatasetChunk
One decoded chunk from a chunked dataset.
DatasetChunkIterator
Iterator over decoded chunks in a chunked dataset.
FileStorage
File-backed storage that serves explicit byte ranges via positional reads.
FilesystemExternalFileResolver
Filesystem resolver for external raw data files.
FilesystemExternalLinkResolver
Filesystem resolver for external links. Linked files are cached after the first successful open.
MmapStorage
In-memory storage backed by a read-only memory map.
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.
RangeRequestStorage
Storage backed by a caller-provided byte-range reader.
StorageBuffer
An immutable byte range returned by a storage backend.

Enums§

NcFormat
NetCDF file format.
NcMetadataMode
NetCDF-4 metadata reconstruction policy.

Traits§

ExternalFileResolver
Resolves file names from HDF5 External Data Files messages to storage.
ExternalLinkResolver
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.

Type Aliases§

DynStorage