src.delaunay#
Functions
|
Partitions a lat-lon domain into a number of coarser but regularly spaced points that comprises the vertices of the Delaunay triangles. |
|
Land cell selector based on how much of a grid cell contains topography of a certain elevation. |
- src.delaunay.get_decomposition(topo, xnp=11, ynp=6, padding=0)#
Partitions a lat-lon domain into a number of coarser but regularly spaced points that comprises the vertices of the Delaunay triangles.
Parameters#
- topoarray-like
2D topography data
- xnpint, optional
number of points in the first horizontal direction, by default 11
- ynpint, optional
number of points in the second horizontal direction, by default 6
- paddingint, optional
number of grid points to include as a boundary (padded) region, by default 0
Returns#
scipy.spatial.qhull.Delaunay
instancescipy Delaunary triangulation instance
- src.delaunay.get_land_cells(tri, topo, height_tol=0.5, percent_tol=0.95)#
Land cell selector based on how much of a grid cell contains topography of a certain elevation.
Parameters#
- tri
scipy.spatial.qhull.Delaunay
instance scipy Delaunay triangulation instance containing tuples of the three vertice coordinates of a triangle
- topoarray-like
2D topographic data
- height_tolfloat, optional
elevation above height_tol are considered as land, by default 0.5 [m]
- percent_tolfloat, optional
cut-off percentage of topography in the given grid cell below height_tol. By default 0.95, i.e., at least 5% of the grid cell has to be above heigh_tol to be considered a land cell.
Returns#
- list
list of land cell indices
- tri