A dynamic rating curve approach to indirect discharge measurement