h5netcdf.File#

class h5netcdf.File(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()

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

attrs

dimensions

dims

filename

groups

mode

name

parent

variables

close()#
property filename#
flush()#
property mode#
property parent#
sync()#