The concept of a river as an ecosystem whose character changes continually between its source and its mouth according to the nature of its energy inputs. The headwaters are likely to be narrow, fast flowing, and shaded by trees and other vegetation, so that virtually all the energy enters in the form of leaves, twigs, and other debris from the surroundings. The fauna is dominated by detritivores and filter feeders. Further downstream, as the river broadens and becomes less shaded, it is colonized by algae and plants, which contribute significant energy to the community and are exploited by grazers. Towards the mouth, increased sediment loading reduces light penetration and in situ photosynthesis may decline. Energy, in the form of biomass and detritus, is constantly flowing downstream, hence the energetics of any particular section of the river are influenced by events upstream. The result is a longitudinal continuum of ecosystem structure, with certain predictable properties.