Module sia_model :: Class Variable
[hide private]
[frames] | no frames]

Class Variable

source code

object --+
         |
        Variable

A class to hold variable data and attributes, similar to the Scientific.io.netcdf variables.

Instance Methods [hide private]
 
__init__(self, varname, datatype='d', dimensions=(), attrs={})
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
get_axis_label(self)
Returns a string to label a axis in a plot.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Instance Variables [hide private]
  name
the variable name
  datatype
the datatype
  attrs
netCDF CF-1.4 attributes
  data
the acutal data in a numpy array (this could probably be done better)
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, varname, datatype='d', dimensions=(), attrs={})
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Parameters:
  • varname (string) - Name of the variable.
  • datatype (string) - One of:
    • 'f4' (32-bit floating point)
    • 'd' (64-bit floating point)
    • 'i4' (32-bit signed integer)
    • 'i2' (16-bit signed integer)
    • 'i1' (8-bit signed integer)
    • 'S1' (single-character string)
  • dimensions (a touple of strings) - what dimensions are associated with this variable, if () then its scalar.
  • attrs (dict) - a dictionary holding all the attirbutes of the variable.
Overrides: object.__init__