pub struct NetCdfReader { /* private fields */ }Expand description
NetCDF file reader.
Provides methods for reading NetCDF files, including metadata and data.
Implementations§
Source§impl NetCdfReader
impl NetCdfReader
Sourcepub fn open(path: impl AsRef<Path>) -> Result<Self>
pub fn open(path: impl AsRef<Path>) -> Result<Self>
Open a NetCDF file for reading.
Real NetCDF-4 / HDF5 files are read with the Pure-Rust oxinetcdf
backend. When the netcdf3 feature is enabled, NetCDF-3 classic and
64-bit offset files are read first via the netcdf3 crate.
§Arguments
path- Path to the NetCDF file
§Errors
Returns NetCdfError::InvalidFormat if the file is neither a readable
NetCDF-3 file nor a readable NetCDF-4 / HDF5 file.
Sourcepub fn from_netcdf3(file: FileReader) -> Result<Self>
pub fn from_netcdf3(file: FileReader) -> Result<Self>
Sourcepub const fn metadata(&self) -> &NetCdfMetadata
pub const fn metadata(&self) -> &NetCdfMetadata
Get the file metadata.
Sourcepub fn version(&self) -> NetCdfVersion
pub fn version(&self) -> NetCdfVersion
Get the file format version.
Sourcepub fn dimensions(&self) -> &Dimensions
pub fn dimensions(&self) -> &Dimensions
Get dimensions.
Sourcepub fn global_attributes(&self) -> &Attributes
pub fn global_attributes(&self) -> &Attributes
Get global attributes.
Sourcepub fn cf_metadata(&self) -> Option<&CfMetadata>
pub fn cf_metadata(&self) -> Option<&CfMetadata>
Get CF metadata if available.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for NetCdfReader
impl !RefUnwindSafe for NetCdfReader
impl !Send for NetCdfReader
impl !Sync for NetCdfReader
impl !UnwindSafe for NetCdfReader
impl Unpin for NetCdfReader
impl UnsafeUnpin for NetCdfReader
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