cdms2.hgrid:AbstractHorizontalGrid

AbstractHorizontalGrid.fixCutCells(nonConvexCells, threshold=270.0)[source]

For any mapping from a spherical to a planar surface, there is a linear cut. Grid cells that span the cut may appear to be nonconvex, which causes problems with meshfill graphics. This routine attempts to ‘repair’ the cut cell boundaries so that meshfill recognizes they are convex.

Parameters
nonConvexCells1D numpy array of indices of nonconvex cells, as returned from checkConvex.
thresholdpositive floating-point value in degrees.
If the difference in longitude values of consecutive boundaries nodes
exceeds the threshold, the cell is considered a cut cell. On return,
the grid boundaries are modified.
Returns
value is a 1D array of indices of cells that cannot be repaired.