/rust-netcdf

High-level NetCDF bindings for Rust

Primary LanguageRustApache License 2.0Apache-2.0

netcdf

Docs Build Status Crates.io Coverage Status codecov Crates.io dependency status

Medium-level netCDF bindings for Rust, allowing easy reading and writing of array-like structures to a file.

Status

Supported:

  • Variables
  • Normal Dimensions
  • Attributes
  • Subgroups
  • Open/Append/Create modes
  • Reading from memory (read only for now)
  • Unlimited dimensions
  • string variables

Not (yet) supported:

  • user defined types
  • enum types

All variable data is read into a 1-dimensional buffer, with the resulting layout with the last variable varying the fastest. The data can also be read into an ndarray.

Building

This crate depends on libnetcdf. The Travis build runs on Ubuntu 16.04 Xenial and installs libnetcdf via apt, which results in netcdf v.4.4.0. netcdf is not widely tested on other versions of netcdf.

You can build the library and run the tests via Docker like this:

docker build . -t netcdf
docker run -it --rm netcdf

Documentation

Some examples of usage can be found in the tests/lib.rs file. The documentation can also be found using cargo doc.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.