cf.DimensionCoordinate.contiguous¶

DimensionCoordinate.
contiguous
(overlap=True)[source]¶ Return True if a construct has contiguous cells.
A construct is contiguous if its cell boundaries match up, or overlap, with the boundaries of adjacent cells.
In general, it is only possible for a zero, 1 or 2 dimensional construct with bounds to be contiguous. A size 1 construct with any number of dimensions is always contiguous.
An exception occurs if the construct is multidimensional and has more than one element.
New in version 2.0.
 Parameters
 overlapbool, optional
If False then 1d cells with two vertices and with overlapping boundaries are not considered contiguous. By default such cells are not considered contiguous.
Note
The value of the overlap parameter does not affect any other types of cell, for which a necessary (but not sufficient) condition for contiguousness is that adjacent cells do not overlap.
 Returns
bool
Whether or not the construct’s cells are contiguous.
Examples
>>> c.has_bounds() False >>> c.contiguous() False
>>> print(c.bounds[:, 0]) [ 0.5 1.5 2.5 3.5 ] >>> print(c.bounds[:, 1]) [ 1.5 2.5 3.5 4.5 ] >>> c.contiuous() True
>>> print(c.bounds[:, 0]) [ 0.5 1.5 2.5 3.5 ] >>> print(c.bounds[:, 1]) [ 2.5 3.5 4.5 5.5 ] >>> c.contiuous() True >>> c.contiuous(overlap=False) False