Package netCDF4 :: Module _netCDF4 :: Class Group
[hide private]
[frames] | no frames]

Class Group

object --+    
         |    
   Dataset --+
             |
            Group

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

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

Additional read-only class variables:

**`name`**: String describing the group name.

Instance Methods [hide private]
 
__init__(...)
**`__init__(self, parent, name)`** `netCDF4.Group` constructor.
a new object with type S, a subtype of T
__new__(T, S, ...)
 
_getname(...)
 
close(...)
**`close(self)`**

Inherited from Dataset: __delattr__, __enter__, __exit__, __getattr__, __getattribute__, __getitem__, __repr__, __setattr__, __unicode__, createCompoundType, createDimension, createGroup, createVLType, createVariable, delncattr, filepath, getncattr, ncattrs, renameAttribute, renameDimension, renameGroup, renameVariable, set_auto_mask, set_auto_maskandscale, set_auto_scale, set_fill_off, set_fill_on, setncattr, setncatts, sync

Inherited from Dataset (private): _enddef, _redef

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

Properties [hide private]
  name
string name of Group instance

Inherited from Dataset: __orthogonal_indexing__, cmptypes, data_model, dimensions, disk_format, file_format, groups, keepweakref, parent, path, variables, vltypes

Inherited from Dataset (private): _grpid, _isopen

Inherited from object: __class__

Method Details [hide private]

__init__(...)
(Constructor)

 

**`__init__(self, parent, name)`** `netCDF4.Group` constructor.

**`parent`**: `netCDF4.Group` instance for the parent group. If being created in the root group, use a `netCDF4.Dataset` instance.

**`name`**: - Name of the group.

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

Overrides: object.__init__

__new__(T, S, ...)

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

close(...)

 

**`close(self)`**

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

Overrides: Dataset.close