georust / netcdf

High-level netCDF bindings for Rust
Apache License 2.0
81 stars 28 forks source link

Allow options for file open/create #75

Closed magnusuMET closed 3 years ago

magnusuMET commented 3 years ago

One can now open and create files in the different netCDF formats (CDF-1,2,5) and classic mode.

Some options are not exposed, as they may be deprecated in future editions.

@samoylovfp Would this be a good approach to your problem? The api would be

let mut file = netcdf::create_with("file.nc", Options::CLASSIC | Options::NETCDF4);
samoylovfp commented 3 years ago

That is perfect! Many thanks for this.

magnusuMET commented 3 years ago

@samoylovfp I've uploaded the crate with this PR as 0.5.2. Please let me know if something is amiss