Energy Inputs
For the vast majority of ecosystems on the planet, energy from the sun drives their biological operations. Plants, algae and certain bacteria accomplish photosynthesis, which is the conversion of solar energy to the carbohydrate form usable by most other organisms. In this regard, these organisms function as "primary producers." Increasingly reduced amounts of this energy are passed through the food web as herbivorous creatures, called primary consumers, munch plants and are themselves consumed by predators, secondary consumers. Decomposing organisms like worms and fungi provide the release of this energy back into the ecosystem by processing dead organic matter.
Climate
Ecosystems are hugely influenced by climate, the long-term patterns of weather that affect a given area. Organisms have their own thresholds of tolerance for different climatic conditions, and thus their organization in ecosystems around the world is greatly governed by factors like temperature and precipitation. The wildebeest of a tropical grassland and the bison of a temperate grassland perform similar roles as large grazers in their respective ecosystems, which are both dominated by grasses but which experience notably different climates. Climate also affects the development of soils, and these two influences are prime drivers of plant communities.
Microclimate and Terrain
Within a given ecosystem, however, multiple microclimates may exist. These small areas of distinct climatic character often stem from topographic influence. The south slope of a ridge, for example, is more exposed to solar radiation and may be open and semi-arid, while on the other side of the divide, the cooler, moister north-facing slope fosters thick forest. In South Florida, seasonally dry sawgrass prairies may surround radically different "tree-island" communities like cypress domes or tropical hardwood hammocks, deriving from extremely slight elevational differences that allow for more moisture or greater soil accumulation.
Ecological Niches
A niche in an ecosystem is analogous to a person's job in a city: it is an organism's specific role in the ecological community. For example, a hummingbird in a temperate deciduous forest is a pollinator of certain flowering shrubs and trees as well as an occasional eater of insects. Ecosystems of bountiful resources may support numerous species fulfilling essentially the same niche, but often species living alongside one another must diversity, even if just slightly, to minimize competition.