netcdf3
Description
A pure Rust library for reading and writing NetCDF-3 files.
Technical features
- Read a NetCDF-3 file :
- Read a variable data.
- Read a subset of a variable data.
- Read a variable data into a N-dimensional array (using the crate ndarray).
- Write a NetCDF-3 file :
- Write a variable data.
- Write a subset of a variable data.
- Write a variable data from a N-dimensional array (using the crate ndarray).
Notes
- If the number of records
numrecsis greater thanstd::i32::MAXthen this value is considered as indeterminated (numrecs = 2^32 - 1) (see the File Format Specifications). - If the chunk size of a given variable
vsizeis greater thestd::i32::MAXthen its value is considered as indeterminated (vsize = 2^32 - 1) (see the File Format Specifications). - For the file writing, binary comparisons between the crate outcomes and files produced by the Python library (netCDF4) are done while the test suite (see the Python script
pyscripts/create_test_nc3_files.pyand the Rust test filetests/tests_write_nc3_files.rs.)
Known limitations
- Cannot read/write too large NetCDF-3 files. Cannot read/write a subset of a variable data yet.
- Cannot rewrite the NetCDF-3 files (append/remove records, edit dimensions/attributes/variables, ...).
Examples
Various examples are available here.