Management of optimum water quality in a stream