Terrestrial ecosystems control carbon dioxide fluxes to and from the atmosphere through photosynthesis and respiration, a balance between net primary productivity and heterotrophic respiration, that determines whether an ecosystem is sequestering carbon or releasing it to the atmosphere.