The Carbonate System
For a general introduction to water chemistry, see Chemistry.
Why the Carbonate System Is the Invisible Hand Behind pH
The carbonate system is the chemical machinery that translates every molecule of CO₂ produced or consumed into a pH change — and pH affects everything. It controls how toxic ammonia is (the fraction of NH₃ doubles with each pH unit above 7). It determines how much CO₂ is available for photosynthesis (at pH 9, virtually none). It governs whether CaCO₃ substrates dissolve or precipitate. In a small sealed container, the daily swing of photosynthesis and respiration can push pH from below 7 at night to above 9 in the afternoon, and the carbonate system is the buffer that either dampens or amplifies those swings.
Understanding the carbonate system is understanding why pH behaves the way it does — why alkalinity matters, why adding bicarbonate stabilizes a system, and why a jar with low alkalinity can experience wild pH oscillations that stress every organism in it.
The Three Forms of Dissolved Inorganic Carbon
When CO2 gas dissolves in water, it does not simply float around as CO2 molecules. It undergoes a chain of chemical reactions and ends up distributed across three chemical forms:
-
CO2(aq) -- dissolved CO2 gas. This is the form that entered from the air (or was produced by respiration). It is also the only form that can leave the water and return to the gas phase.
-
Bicarbonate (HCO3-) -- CO2 reacts with water to form bicarbonate, releasing a hydrogen ion (H+) in the process. This is typically the dominant form at the pH values found in most natural waters (roughly pH 6.5 to 8.5).
-
Carbonate (CO3--) -- bicarbonate can lose another hydrogen ion to become carbonate. This form only becomes significant at higher pH values (above about 9).
The sum of all three forms is called dissolved inorganic carbon (DIC). The model tracks DIC as a single pool and then splits it into the three forms based on pH whenever it needs to know the breakdown.
How pH Controls the Balance
The distribution of DIC among the three forms depends entirely on pH:
- At low pH (acidic, below about 6): Almost all DIC exists as CO2(aq). The water is too acidic for much bicarbonate or carbonate to form.
- At neutral pH (around 6.5 to 8.5): Most DIC exists as bicarbonate (HCO3-). This is the typical range for healthy aquatic ecosystems.
- At high pH (alkaline, above about 9): Carbonate (CO3--) becomes increasingly important, and CO2(aq) becomes vanishingly small.
This has practical consequences. At high pH, there is very little dissolved CO2 available for gas exchange with the headspace, or for organisms that can only use CO2 directly (as opposed to bicarbonate). Some algae species in the model have carbon concentrating mechanisms that let them also use bicarbonate, which is an advantage at high pH.
The Equilibrium Constants: K1 and K2
The balance between the three carbon forms is governed by two equilibrium constants:
- K1 governs the balance between CO2(aq) and bicarbonate. It describes how readily CO2 reacts with water to form HCO3-.
- K2 governs the balance between bicarbonate and carbonate. It describes how readily HCO3- gives up another hydrogen ion to form CO3--.
A third constant, Kw, describes the self-dissociation of water itself (into H+ and OH-), which matters for the overall charge balance.
Temperature and Salinity Dependence
All three equilibrium constants depend on temperature and salinity:
-
In freshwater (salinity below 1 PSU), the model uses the Plummer & Busenberg (1982) polynomial fits for K1 and K2. These are accurate to within 0.01 pK units over 0 to 90 degrees C.
-
In saltwater (salinity above 5 PSU), the model uses the Millero (2010) formulation for K1 and K2, which accounts for both temperature and salinity.
-
In between (1 to 5 PSU, the estuarine transition zone), the model linearly blends the freshwater and saltwater pK values to avoid a discontinuous jump.
-
The water dissociation constant Kw uses the Millero (1995) formulation at all salinities. This formula is written as a single expression for ln(Kw) that includes both temperature and salinity terms, and is correct at salinity = 0 (giving pKw = 14.00 at 25 degrees C) as well as at full seawater.
Higher temperature shifts the equilibrium constants, generally favoring more CO2(aq) relative to bicarbonate. Higher salinity also changes the constants, though the effect is more subtle.
Total Alkalinity
Total alkalinity (TA) is a measure of the water's buffering capacity -- its ability to resist changes in pH when acids or bases are added. In chemical terms, alkalinity is the sum of all the base species in the water that can accept hydrogen ions:
TA = [HCO3-] + 2 x [CO3--] + [OH-] - [H+]
Bicarbonate counts once, carbonate counts double (because it can accept two hydrogen ions), and hydrogen ions count negatively (because they are the acid, not the buffer).
How Biology Changes Alkalinity
Alkalinity is tracked as a conserved pool in the model, meaning it only changes when specific biological or chemical processes add or remove charged species. The key processes that alter alkalinity are:
-
Ammonium (NH4+) uptake by algae: decreases alkalinity by 1 unit per unit of nitrogen taken up. When a cell absorbs NH4+, it effectively removes a positively charged ion from solution, which shifts the charge balance.
-
Nitrate (NO3-) uptake by algae: increases alkalinity by 1 unit per unit of nitrogen taken up. Absorbing a negatively charged ion has the opposite effect.
-
Nitrification (NH4+ converted to NO3- by nitrifying bacteria): decreases alkalinity by 2 units per unit of nitrogen oxidized. This is one of the largest alkalinity sinks in the model. Nitrifiers consume ammonium and produce nitrate plus hydrogen ions, which is a double hit to alkalinity. In addition, the nitrifiers' own growth (assimilating NH4+ into biomass) costs another 1 unit of alkalinity per unit of nitrogen assimilated.
-
Decomposition releasing NH4+: increases alkalinity by 1 unit per unit of nitrogen released. When dead organic matter breaks down and releases ammonium back into the water, alkalinity goes up. This is called mineralization.
-
Denitrification (NO3- converted to N2 gas): increases alkalinity by 1 unit per unit of nitrogen denitrified. This process consumes hydrogen ions.
-
Animal excretion of NH4+: increases alkalinity by 1 unit per unit of nitrogen excreted. Grazers, ciliates, and copepods all excrete ammonium as a waste product, and this increases alkalinity just like decomposition does.
-
DOM photodegradation releasing NH4+: increases alkalinity by 1 unit per unit of nitrogen released, the same as decomposition.
-
Denitrification organic N mineralization: when denitrifying bacteria consume organic matter in anoxic sediments, the nitrogen in that organic matter is released as NH4+, which increases alkalinity by 1 unit per unit of nitrogen mineralized. This is separate from the alkalinity produced by NO3- reduction itself.
-
NH3 volatilization (gas exchange): dissolved NH3 can transfer between water and headspace. When NH3 dissolves into water from the headspace, it increases alkalinity by 1 unit per mol. When NH3 leaves the water for the headspace, alkalinity decreases correspondingly.
The net effect on alkalinity depends on which of these processes dominate. In a system with active nitrification but limited denitrification, alkalinity tends to decline over time, which can gradually lower pH.
How the Model Calculates pH
The model does not set pH directly. Instead, it solves for pH at each time step using the charge balance equation. Given the current values of DIC and total alkalinity, it finds the pH at which all the charges in solution balance out.
The approach works like this:
- For any candidate pH value, the model can calculate how much of the DIC would exist as CO2, HCO3-, and CO3-- (using K1 and K2).
- From those species concentrations, it can compute what the alkalinity would be at that pH.
- It then compares that computed alkalinity to the actual tracked alkalinity.
- The correct pH is the one where computed alkalinity equals actual alkalinity.
The model searches for this pH numerically, converging on the value where the computed and actual alkalinity match.
Why This Matters for Biology
The carbonate system connects carbon cycling to pH in ways that have real consequences for organisms in the model:
-
Ammonia toxicity. The fraction of dissolved nitrogen that exists as toxic free ammonia (NH3, as opposed to the relatively harmless ammonium ion NH4+) depends strongly on pH. At pH 7, almost all of it is NH4+. At pH 9, a significant fraction is NH3. The carbonate system determines what pH the water reaches, which in turn determines how toxic the nitrogen is.
-
Carbon availability. Algae need carbon to grow. Some can only use dissolved CO2, which becomes scarce at high pH. Others can use bicarbonate via carbon concentrating mechanisms, giving them an advantage in alkaline conditions.
-
Organism survival. Many organisms have hard pH limits. If the carbonate system drives pH outside the range of about 6.5 to 9.0, organisms start dying, which changes the biology, which changes the chemistry, creating feedback loops.
-
Buffering and stability. Systems with higher alkalinity have more stable pH. In a low-alkalinity system, a burst of photosynthesis (removing CO2) can spike pH dangerously high, while a burst of respiration (adding CO2) can crash it low. High alkalinity smooths these swings out.
General Hardness and CaCO₃ Equilibrium
General hardness (GH), calcium cycling, and CaCO₃ precipitation/dissolution all interact closely with the carbonate system. The key connection is stoichiometric: every mole of CaCO₃ precipitated or dissolved removes or adds 2 moles of alkalinity, directly affecting the buffering capacity described above. The calcite saturation state (Ω) captures the thermodynamic tendency toward precipitation or dissolution at any given moment.
For the full treatment — GH initialization, Ca²⁺ and Mg²⁺ pools, biological Ca sinks (shell building, molting), the Ω-driven kinetic rate laws, calcareous substrate types, and Ca²⁺ return on death — see Calcium and Magnesium Cycles.
TA vs. GH: Total alkalinity and general hardness are related but distinct. TA measures buffering capacity (charge balance); GH measures divalent cation availability (Ca²⁺ + Mg²⁺). Nitrification can consume TA without affecting Ca²⁺, and shell building consumes both in different proportions. Use alkalinity for carbonate buffering and GH for calcium availability.
Further Reading
- Dissolved Gases and Gas Exchange -- how CO2 moves between water and headspace via Henry's law
- Carbon Cycle -- the complete carbon budget, including DIC sources and sinks
- Calcium and Magnesium Cycles -- CaCO₃ equilibrium, shell building, and alkalinity effects
- Photosynthesis -- how CO2 limitation and bicarbonate use affect producer growth
- Nitrogen Cycle -- how nitrogen transformations affect alkalinity and pH