High-level NetCDF bindings for Rust
Not (yet) supported: appending to existing files (using unlimited dimensions), user defined types, string variables, multi-valued attributes, strided/subsetted reads. All variable data is read into a 1-dimensional Vec with the last variable dimension varying fastest.
rust-netcdf depends on libnetcdf.
```Rust // Open file simplexy.nc: let file = netcdf::open(&pathtosimplexy).unwrap();
// Access any variable, attribute, or dimension through simple HashMap's: let var = file.root.variables.get("data").unwrap();
// Read variable as any NCTYPE, optionally failing if doing so would
// force a cast:
let data : Vec
// All variable data is read into 1-dimensional Vec. for x in 0..(6*12) { assert_eq!(data[x], x as i32); } ```
```Rust let f = netcdf::testfilenew("crabs.nc"); // just gets a path inside repo
let mut file = netcdf::create(&f).unwrap();
let dimname = "ncrabs"; file.root.adddimension(dim_name, 10).unwrap();
let varname = "crabcoolnesslevel";
let data : Vec
I intend to improve documentation soon. For now, check out tests/lib.rs for quite a few usage examples.