Measuring the rate of photosynthesis in a pond is easy. A researcher takes two water samples from the same depth and puts one into a clear bottle and the other into a "dark" bottle that light cannot enter. The researcher can then hang the two bottles back in the pond at the end of a rope. Inside each bottle, the many organisms carry on with life. Those in the clear bottle photosynthesize and respire. However, without light, those in the dark bottle can only respire.
Over time, the amount of oxygen released in the two bottles will be different. In the clear bottle, the amount of oxygen released will equal the amount produced through photosynthesis by the producers minus the amount consumed through respiration by all organisms. In the dark bottle, by contrast, the same kinds of organisms can only respire and therefore only consume oxygen. In the dark bottle, then, the amount of oxygen will drop steadily.
We can assume that the organisms in the clear bottle consume about the same amount of oxygen as those in the dark bottle. Therefore, the total amount of oxygen produced by photosynthesis in the clear bottle equals the amount we know is consumed in the dark bottle plus the "extra" amount of oxygen produced in the clear bottle. The total amount of oxygen produced in the clear bottle is a measure of the rate of photosynthesis in the pond as a whole.
Using the results from the two-bottle measurement, researchers can also estimate the net primary productivity, the amount of energy converted into organic molecules by the producers in a given time. On average, a plant stores about 3.5 kcal of energy (in glucose and other organic molecules) for each gram of oxygen released. The net primary productivity of the producers in the pond is the number of grams of oxygen released X 3.5 kcal/g of oxygen.