Primary production is the synthesis of organic compounds from atmospheric or aqueous carbon dioxide. It principally occurs through the process of photosynthesis. Almost all life on earth is directly or indirectly reliant on primary production. The organisms responsible for primary production are known as primary producers and form the base of the food chain. In terrestrial ecosystems, these are mainly plants, while in aquatic ecosystems algae are primarily responsible. Primary production is distinguished as either net or gross, the former accounting for losses to processes such as cellular respiration, the latter not.