h5netcdf.legacyapi.Dataset#

class h5netcdf.legacyapi.Dataset(path, mode='r', invalid_netcdf=False, phony_dims=None, **kwargs)#
__init__(path, mode='r', invalid_netcdf=False, phony_dims=None, **kwargs)#

NetCDF4 file constructor.

Parameters
  • path (path-like) – Location of the netCDF4 file to be accessed.

  • mode ("r", "r+", "a", "w") – A valid file access mode. Defaults to “r”.

  • invalid_netcdf (bool) – Allow writing netCDF4 with data types and attributes that would otherwise not generate netCDF4 files that can be read by other applications. See Invalid netCDF files for more details.

  • phony_dims ('sort', 'access') – See Datasets with missing dimension scales for more details.

  • **kwargs – Additional keyword arguments to be passed to the h5py.File constructor.

Notes

In h5netcdf version 0.12.0 and earlier, order tracking was disabled in HDF5 file. As this is a requirement for the current netCDF4 standard, it has been enabled without deprecation as of version 0.13.0 (GH128).

Datasets created with h5netcdf version 0.12.0 that are opened with newer versions of h5netcdf will continue to disable order tracker.

Methods

__init__(path[, mode, invalid_netcdf, ...])

NetCDF4 file constructor.

close()

createDimension(name, size)

Creates a new dimension with given name and size.

createGroup(name)

Create NetCDF4 group.

createVariable(varname, datatype[, ...])

Creates a new variable.

create_group(name)

Create NetCDF4 group.

create_variable(name[, dimensions, dtype, ...])

Creates a new variable.

flush()

get(k[,d])

getncattr(name)

Retrieve a netCDF4 attribute.

items()

keys()

ncattrs()

Return netCDF4 attribute names.

resize_dimension(dim, size)

Resize a dimension to a certain size.

setncattr(name, value)

Set a netCDF4 attribute.

sync()

values()

Attributes

attrs

dimensions

dims

filename

groups

mode

name

parent

variables