Calculate the reach (node) Strahler for all nodes in a river network. The function will not work if any of the nodes in the network have more than two adjacent upstream reaches (e.g. some networks generated by the OCNet package).

sbn_strahler(g)

Arguments

g

a river network as an igraph object. Must be a downstream directed graph.

Value

a vector of stream Strahler orders.

Examples

g <- sbn_create(10, 0.7)
sbn_strahler(g)
#>  1  2  3  4  5  6  7  8  9 10 
#>  3  3  2  2  1  1  1  1  1  1