| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
_Variable --+
|
MFTime
MFTime(self, time, units=None)
Class providing an interface to a MFDataset time Variable by imposing a unique common time unit to all files.
Example usage:
>>> import numpy >>> f1 = Dataset('mftest_1.nc','w', format='NETCDF4_CLASSIC') >>> f2 = Dataset('mftest_2.nc','w', format='NETCDF4_CLASSIC') >>> f1.createDimension('time',None) >>> f2.createDimension('time',None) >>> t1 = f1.createVariable('time','i',('time',)) >>> t2 = f2.createVariable('time','i',('time',)) >>> t1.units = 'days since 2000-01-01' >>> t2.units = 'days since 2000-02-01' >>> t1.calendar = 'standard' >>> t2.calendar = 'standard' >>> t1[:] = numpy.arange(31) >>> t2[:] = numpy.arange(30) >>> f1.close() >>> f2.close() >>> # Read the two files in at once, in one Dataset. >>> f = MFDataset('mftest*nc') >>> t = f.variables['time'] >>> print t.units days since 2000-01-01 >>> print t[32] # The value written in the file, inconsistent with the MF time units. 1 >>> T = MFTime(t) >>> print T[32] 32
| Instance Methods | |||
|
|||
|
|||
|
Inherited from Inherited from |
|||
| Class Variables | |
__qualname__ =
|
|
| Properties | |
|
Inherited from |
| Method Details |
Get records from a concatenated set of variables.
|
Create a time Variable with units consistent across a multifile dataset.
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Fri Feb 7 14:52:16 2014 | http://epydoc.sourceforge.net |