| |
Methods defined here:
- GetAttribute(self, name)
- GetData(self, it0=None, it=None, iz=None, iy=None, ix=None)
- Return field nc_var (a netcdf variable)
at slice it0:it (time index), iz (elevation index), iy and/or ix.
An input index of None for any it,iz,iy,ix
implies that every index in that dimension
should be acquired, if the dimension exists. In other words, None is
an alias for ':' when accessing the array data.
- GetElevationAxis(self)
- Returns nvAxis instance or None.
- GetIndicesForPoint(self, ptid)
- Returns list of integers with index into the field's dimensions as laid out in the data source.
@type ptid integer
@param ptid Index into complete field data (up to 4D).
- GetMinMaxOfData(self, it0, itn, idt, iz0, izn, idz)
- Compute min/max values of data by slicing. Works both for
time and elev independent data. Will filter if data fall
outside valid range. Will unpack if data are stored as short.
it0, itn, idt: time starting, ending and delta indices
iz0, izn, idz: elevation starting, ending and delta indices
Return min max field values
- GetNcdumpString(self)
- Returns a descriptive multi-line string formatted in the style of
the program 'ncdump'.
An example for a variable 'ua':
float ua(time, zn, lata, lona)
ua:long_name = "u a-grid"
- GetPickValue(self, lon, lat)
- For non-warped grids, i.e. rectilinear.
Returns string repr. of picked value and the interpolated x,y indices.
- GetPickValueByIndex(self, ids=[], xi=None, yi=None, interp=True)
- Returns a formatted string with a value (interpolated or
nearest-neighbor) and picked indices
by using values at flattened data & coord
array indices "ids".
Nearest-neighbor value is returned if "interp=False".
- GetScaledElevations(self, scale=1.0, z=None, zbot=None, ztop=None)
- Returns normalized and scaled z values.
The elevation up/down orientation is accounted for by the
elevation's nvAxis object belonging to this field.
Time dependent elevations should be passed in with z,zbot,ztop,
whereby the zbot,ztop are global extrema to prevent time dependent
normalization.
@type z numarray
@param z Elevation values. If None, then the field's z axis
orientation and data is used.
@type scale number
@param scale Should be OPTION_HEIGHT if available to pipeline,
which will multiply the normalized elevation values.
@return numarray of elevation values or []
- GlobalMinMax(self)
- Compute the global min/max data values
- IsPacked(self)
- Return True if data are packed, False otehrwise
- MinMaxAtElev(self, iz)
- Compute the min/max values of a netcdf variable at given elevation.
- Print(self)
- Print information about self.
- Unpack(self, data)
- Unpack data. Some data may be written in the netcdf file using a
short type, allowing a packing factor of 4 with respect to double's.
- __init__(self, nc, axes, name, iz=0, it=0)
- Constructor.
nc: A NetCDFFile object.
axes: An nvAxisCollection object.
name: The name of this field.
- __str__(self)
|