The ecosystem is the basic functional unit of ecology, consisting of living organisms interacting with each other and their non-living environment. Ecosystems can vary in size from small oases to entire oceans, and include terrestrial ecosystems like forests and grasslands as well as aquatic ecosystems consisting of freshwater or marine environments. Within ecosystems, energy flows through trophic levels as light energy is converted to chemical energy and passed between producers, consumers, and decomposers in food chains and webs.