h5netcdf.Group
h5netcdf.Group¶
- class h5netcdf.Group(parent, name)¶
- __init__(parent, name)¶
Create netCDF4 group.
Groups are containers by which the netCDF4 (HDF5) files are organized. Each group is like a Dataset itself.
Methods
__init__(parent, name)Create netCDF4 group.
create_group(name)Create NetCDF4 group.
create_variable(name[, dimensions, dtype, ...])Creates a new variable.
flush()get(k[,d])items()keys()resize_dimension(dim, size)Resize a dimension to a certain size.
sync()values()Attributes
- property attrs¶
- create_variable(name, dimensions=(), dtype=None, data=None, fillvalue=None, chunks=None, chunking_heuristic=None, **kwargs)¶
Creates a new variable.
- Parameters
name (
str) – Name of the new variable. If given as a path, intermediate groups will be created, if not existent.dimensions (
tuple) – Tuple containing dimension name strings. Defaults to empty tuple, effectively creating a scalar variable.dtype (
numpy.dtype,str, optional) – Dataype of the new variable. Defaults to None.fillvalue (scalar, optional) – Specify fillvalue for uninitialized parts of the variable. Defaults to
None.chunks (
tuple, optional) – Tuple of integers specifying the chunksizes of each variable dimension.chunking_heuristic (
str, optional) – Specify auto-chunking approach. Can be either ofh5pyorh5netcdf. Discussion onh5netcdfchunking can be found in (GH52) and (PR127).compression (
str, optional) – Compression filter to apply, defaults togzipcompression_opts (
int) – Parameter for compression filter. Forcompression="gzip"Integer from 1 to 9 specifying the compression level. Defaults to 4.fletcher32 (
bool) – IfTrue, HDF5 Fletcher32 checksum algorithm is applied. Defaults toFalse.shuffle (
bool, optional) – IfTrue, HDF5 shuffle filter will be applied. Defaults toTrue.
Note
Please refer to
h5pydocumentation for further parameters via keyword arguments. Any parameterizations which do not adhere to netCDF4 standard will only work on files created withinvalid_netcdf=True,- Returns
var (
h5netcdf.Variable) – Variable class instance
- property dimensions¶
- property dims¶
- flush()¶
- property groups¶
- property name¶
- property parent¶
- resize_dimension(dim, size)¶
Resize a dimension to a certain size.
It will pad with the underlying HDF5 data sets’ fill values (usually zero) where necessary.
- sync()¶
- property variables¶