pub struct NetCDF4File { /* private fields */ }Expand description
A NetCDF-4 file reader.
Wraps a rustyhdf5 File and provides NetCDF-4 semantics: dimensions, variables with CF attributes, groups, and type mapping.
Implementations§
Source§impl NetCDF4File
impl NetCDF4File
Sourcepub fn open<P: AsRef<Path>>(path: P) -> Result<Self, Error>
pub fn open<P: AsRef<Path>>(path: P) -> Result<Self, Error>
Open a NetCDF-4 file from a filesystem path.
Sourcepub fn from_bytes(data: Vec<u8>) -> Result<Self, Error>
pub fn from_bytes(data: Vec<u8>) -> Result<Self, Error>
Open a NetCDF-4 file from in-memory bytes.
Sourcepub fn nc_properties(&self) -> Result<Option<String>, Error>
pub fn nc_properties(&self) -> Result<Option<String>, Error>
Get the _NCProperties root attribute, if present.
This attribute is written by standard NetCDF-4 libraries and contains provenance information (library version, HDF5 version, etc.).
Sourcepub fn dimensions(&self) -> Result<Vec<Dimension>, Error>
pub fn dimensions(&self) -> Result<Vec<Dimension>, Error>
List dimensions defined in the root group.
Sourcepub fn variables(&self) -> Result<Vec<Variable<'_>>, Error>
pub fn variables(&self) -> Result<Vec<Variable<'_>>, Error>
List all variables in the root group.
Sourcepub fn variable(&self, name: &str) -> Result<Variable<'_>, Error>
pub fn variable(&self, name: &str) -> Result<Variable<'_>, Error>
Get a specific variable by name from the root group.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for NetCDF4File
impl RefUnwindSafe for NetCDF4File
impl Send for NetCDF4File
impl Sync for NetCDF4File
impl Unpin for NetCDF4File
impl UnsafeUnpin for NetCDF4File
impl UnwindSafe for NetCDF4File
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more