earthkit.hydro.subnetwork¶
Module contents¶
- earthkit.hydro.subnetwork.crop(river_network: RiverNetwork, copy=True)[source]¶
Crop a gridded network to the minimum bounding grid.
- Parameters:
river_network (RiverNetwork) – Original river network from which to create a cropped network.
copy (bool, optional) – Whether or not to modify the original river network or return a copy. Default is True.
- Returns:
The river network object created from the given data.
- Return type:
- earthkit.hydro.subnetwork.from_mask(river_network: RiverNetwork, node_mask=None, edge_mask=None, copy=True)[source]¶
Create a subnetwork from a river network.
- Parameters:
river_network (RiverNetwork) – Original river network from which to create a subnetwork.
node_mask (array, optional) – A mask of the network nodes or gridcells. Default is None (all True).
edge_mask (array, optional) – A mask of the network edges. Default is None (all True).
copy (bool, optional) – Whether or not to modify the original river network or return a copy. Default is True.
- Returns:
The river network object created from the given data.
- Return type: