In ecology, productivity or production refers to the rate of generation of biomass in an ecosystem. It is usually expressed in units of mass per unit surface (or volume) per unit time, for instance grams per square metre per day (g m-2 d-1). The mass unit may relate to dry matter or to the mass of carbon generated. Productivity of autotrophs such as plants is called primary productivity, while that of heterotrophs such as animals is called secondary productivity.
Primary production 
Primary production is the synthesis of new organic material from inorganic molecules such as H2O and CO2. It is dominated by the process of photosynthesis which uses sunlight to synthesise organic molecules such as sugars, although chemosynthesis represents a small fraction of primary production.
Organisms responsible for primary production include land plants, marine algae and some bacteria (including cyanobacteria).
Secondary production 
Secondary production is the generation of biomass of heterotrophic (consumer) organisms in a system. This is driven by the transfer of organic material between trophic levels, and represents the quantity of new tissue created through the use of assimilated food. Secondary production is sometimes defined to only include consumption of primary producers by herbivorous consumers (with tertiary production referring to carnivorous consumers), but is more commonly defined to include all biomass generation by heterotrophs.
Organisms responsible for secondary production include animals, protists, fungi and many bacteria.
Secondary production can be estimated through a number of different methods including increment summation, removal summation, the instantaneous growth method and the Allen curve method. The choice between these methods will depend on the assumptions of each and the ecosystem under study. For instance, whether cohorts should be distinguished, whether linear mortality can be assumed and whether population growth is exponential.
See also