The ecological basis for river management