Perform a basin-to-basin flow accumulation

accumulate(basin_ids, downstream_ids, flows)

Arguments

basin_ids

a vector of basin ids

downstream_ids

a vector of downstream basin ids, aligned with the entries in basin_ids

flows

a vector of flows generated in each basin, aligned with the entries in basin_ids

Value

a vector of outlet flows for each basin (including flow generated within the basin), aligned with the entries in basin_ids