The study of the relationships between living organisms and their physical and chemical environment in streams and rivers.