pyflwdir.FlwdirRaster.main_upstream#

FlwdirRaster.main_upstream(uparea: ndarray | None = None) → ndarray#

Return the main upstream node for each node.

Parameters:

uparea (1D array of float, optional) – Upstream area used to select the main upstream node. Calculated from the graph if omitted.

Returns:

Linear indices of the selected upstream nodes.

Return type:

1D array of int