netcdf3 0.3.1

A pure Rust library for reading and writing NetCDF-3 files
Documentation

netcdf3

Crates.io Documentation Build Status Crates.io Version Minimum rustc version

Description

A pure Rust library for reading and writing NetCDF-3 files.

Technical features

  • Read the classic and 64-bit offset NetCDF-3 files :
    • Open the files and parse the headers.
    • Read the variables data from a file.
    • Read the attribute u8 values as UTF-8 string.
    • Read the variable data as N-dimensional arrays (using the crate ndarray).
  • Manage the NetCDF-3 structures : dimensions, attributes and variables (create, read, rename, remove).
  • Write the classic and 64-bit offset NetCDF-3 files:
    • Binary comparisons are done between the crate outcomes and files produced with the Python library (netCDF4).
    • Also see the Python script pyscripts/create_test_nc3_files.py and the Rust test file tests/tests_write_nc3_files.rs.

Known limitations

  • Cannot read and write too large NetCDF-3 files (the slicing arrays is not implemented yet).
  • Don't manage yet the special case under which the numrecs value is indeterminate (numrecs = 2^32 - 1) (see the File Format Specifications).
  • Don't manage yet the special case under which a vsize value is indeterminate (vsize = 2^32 - 1) (see the File Format Specifications).

Examples

Various examples are available here.