Package MFnetCDF4_classic :: Module MFnetCDF4_classic :: Class Dataset
[hide private]
[frames] | no frames]

Class Dataset

source code

             object --+    
                      |    
netCDF4_classic.Dataset --+
                          |
                         Dataset

class for reading a multi-file netCDF dataset.

Instance Methods [hide private]
  __getattribute__(self, name)
x.__getattribute__('name') <==> x.name
  __init__(self, files, check=False)
Open a Dataset spanning multiple files, making it look as if it was a single file.
  __setattr__(self, name, value)
override base class attribute creation
  close(self)
Close the Dataset.
  ncattrs(self)
return names of netCDF attribute for this Dataset in a list

Inherited from netCDF4_classic.Dataset: __delattr__, __new__, createDimension, createVariable, renameDimension, renameVariable, set_fill_off, set_fill_on, sync

Inherited from netCDF4_classic.Dataset (private): _enddef, _redef

Inherited from object: __hash__, __reduce__, __reduce_ex__, __repr__, __str__


Class Variables [hide private]

Inherited from netCDF4_classic.Dataset (private): _dsetid


Instance Variables [hide private]

Inherited from netCDF4_classic.Dataset: dimensions, file_format, variables


Properties [hide private]

Inherited from object: __class__


Method Details [hide private]

__getattribute__(self, name)

source code 
x.__getattribute__('name') <==> x.name
Overrides: netCDF4_classic.Dataset.__getattribute__
(inherited documentation)

__init__(self, files, check=False)
(Constructor)

source code 

Open a Dataset spanning multiple files, making it look as if it was a single file. Variables in the list of files that share the same unlimited dimension are aggregated.

Adapted from pycdf by Andre Gosselin.

Usage:

nc = MFnetCDF4_classic.Dataset(files, check=False)
Parameters:
  • files - either a sequence of netCDF files or a string with a wildcard (converted to a sorted list of files using glob) The first file in the list will become the "master" file, defining all the record variables (variables with an unlimited dimension) which may span subsequent files. Attribute access returns attributes only from "master" file. The files are always opened in read-only mode.
  • check - True if you want to do consistency checking to ensure the correct variables structure for all of the netcdf files. Checking makes the initialization of the MFnetCDF4_classic instance much slower. Default is False.
Overrides: netCDF4_classic.Dataset.__init__

__setattr__(self, name, value)

source code 
override base class attribute creation
Overrides: netCDF4_classic.Dataset.__setattr__

close(self)

source code 

Close the Dataset.

close()
Overrides: netCDF4_classic.Dataset.close
(inherited documentation)

ncattrs(self)

source code 

return names of netCDF attribute for this Dataset in a list

ncattrs()
Overrides: netCDF4_classic.Dataset.ncattrs
(inherited documentation)