netcdf3
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
u8values 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.pyand the Rust test filetests/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
numrecsvalue is indeterminate (numrecs = 2^32 - 1) (see the File Format Specifications). - Don't manage yet the special case under which a
vsizevalue is indeterminate (vsize = 2^32 - 1) (see the File Format Specifications).
Examples
Various examples are available here.