cf.DimensionCoordinate.set_cell_characteristics

DimensionCoordinate.set_cell_characteristics(cellsize, spacing)[source]

Set cell characteristics.

A cell characteristic is assumed to be valid for each cell. Cell characteristics are not inferred from the coordinate or bounds data, but may be set with this method. Cell characteristics are automatically removed whenever the new data or bounds are set with set_data or set_bounds respectively.

New in version 3.15.4.

Parameters
cellsize:

The cell size (i.e. the absolute difference between the cell bounds) characteristic. May be a Query, TimeDuration, scalar Data, scalar data_like object, or None. A value of None means no characteristic has been set.

spacing:

The cell spacing (i.e. the absolute difference between two neighbouring coordinate values) characteristic. May be a Query, TimeDuration, scalar Data, scalar data_like object, or None. A value of None means no characteristic has been set.

Returns

None

Examples

>>> d.set_cell_characteristics(cellsize=cf.D(5), spacing=cf.D(1))
>>> d.set_cell_characteristics(cf.Data(10, 'degree_E'), None)
>>> d.set_cell_characteristics(cf.wi(100, 200), 150)