Module netCDF4 :: Class Group

Class Group

object --+    
         |    
   Dataset --+
             |
            Group

Group(self, parent, name)

Groups define a hierarchical namespace within a netCDF file. They are analagous to directories in a unix filesystem. Each Group behaves like a Dataset within a Dataset, and can contain it's own variables, dimensions and attributes (and other Groups).

Group instances should be created using the createGroup method of a Dataset instance, or another Group instance, not using this class directly.

Parameters:

parent - Group instance for the parent group. If being created in the root group, use a Dataset instance.

name - Name of the group.

Returns:

a Group instance. All further operations on the netCDF Group are accomplished via Group instance methods.

Group inherits from Dataset, so all the Dataset class methods and variables are available to a Group instance (except the close method).

Instance Methods
 
__init__(self, parent, name)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
a new object with type S, a subtype of T
__new__(T, S, ...)
 
close(self)
overrides Dataset close method which does not apply to Group instances, raises IOError.

Inherited from Dataset: __delattr__, __enter__, __exit__, __getattr__, __getattribute__, __setattr__, __str__, createCompoundType, createDimension, createGroup, createVLType, createVariable, delncattr, getncattr, ncattrs, renameDimension, renameVariable, set_fill_off, set_fill_on, setncattr, sync

Inherited from object: __format__, __hash__, __reduce__, __reduce_ex__, __repr__, __sizeof__, __subclasshook__

Instance Variables

Inherited from Dataset: cmptypes, dimensions, file_format, groups, path, variables

Properties

Inherited from Dataset: maskanscale, parent, vltypes

Inherited from object: __class__

Method Details

__init__(self, parent, name)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__

__new__(T, S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

close(self)

 

overrides Dataset close method which does not apply to Group instances, raises IOError.

Overrides: Dataset.close