EcoSym

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:

  1. 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.

  2. 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).

  3. 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:

  1. 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).
  2. From those species concentrations, it can compute what the alkalinity would be at that pH.
  3. It then compares that computed alkalinity to the actual tracked alkalinity.
  4. 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.

Where the pH Actually Ends Up: the Alkalinity Ceiling

The number printed on a bottle of tap water is not where your tank will sit. This is one of the most common surprises in the hobby: the tap tests 7.2, and a week later the tank reads 8.4, with nothing obviously wrong.

The reason is that tap water arrives supersaturated with CO2 -- it has been under pressure in a pipe. Once it is standing in an open tank exchanging gas with the room, that excess CO2 escapes, and the water drifts toward equilibrium with the atmosphere. At that equilibrium the CO2 concentration is fixed by the air (about 420 ppm), so rearranging the K1 expression leaves pH as a function of alkalinity alone:

[H+] = K1 x [CO2] / [HCO3-]**, where [CO2] = K_H x pCO2

Alkalinity, in other words, does not merely buffer the pH -- once the water has degassed, it sets it. Two waters with the same printed pH but different carbonate hardness end up in completely different places:

Water Alkalinity Carbonate hardness Settles at
Remineralised RO 1.8 x 10⁻⁴ mol/L ~0.5 °KH pH 7.5
Soft tap 1.0 x 10⁻³ mol/L ~2.8 °KH pH 8.2
Moderate tap 2.5 x 10⁻³ mol/L ~7 °KH pH 8.6
Hard tap 4.0 x 10⁻³ mol/L ~11 °KH pH 8.8

This has a practical consequence worth stating plainly: you cannot keep a soft-water fish at its preferred pH by choosing a lower-pH tap water. A tetra rated for pH 6.0 to 7.6 sitting in moderate tap water is in pH 8.6 water within a day, regardless of what the tap tested at.

What does move the number is anything that keeps pushing CO2 back into the water faster than it escapes:

  • A soil substrate. Organic matter mineralising in the bed is a continuous CO2 source. In the model this is worth roughly 0.3 pH units -- a dirted tank on moderate tap water settles nearer 8.3 than 8.6.
  • Injected CO2. The high-tech planted approach, and the only lever that moves pH by a full unit or more. Note that a filter which agitates the surface hard (a hang-on-back waterfall) works directly against it -- see Filters.
  • Genuinely low alkalinity. Which is why keepers of blackwater fish use RO water, peat and botanicals rather than trying to find soft tap.

Plants, perhaps surprisingly, do not hold pH down on their own. They consume CO2 in the light and release it in the dark, and across a day the two roughly cancel; in the model, adding plants to an unsoiled tank moves the settled pH by less than 0.05.

Pure RO Is Not a Water You Keep Fish In

The table above starts at remineralised RO for a reason. Reverse-osmosis or distilled water with nothing added back has essentially no alkalinity, and a water with no alkalinity has no pH of its own -- it takes whatever the biology gives it that hour. This is the opposite of what "pure" suggests. Keepers who work with soft-water fish start from RO precisely so they can choose the hardness, and then they add some back; the hobby products that do it are sold for exactly that purpose.

The version of this mistake that is hardest to see is a tank filled correctly and then refilled with pure RO at every water change. Nothing looks wrong on the day. But each change removes a quarter of the buffer the tank has and returns none of it, while nitrification spends more of it turning ammonia into nitrate. The carbonate hardness ratchets down, and the pH follows it.

Here is that run in the model -- a 196 L tank started on moderate tap water at 7 °KH, 25% changed weekly with pure RO:

Day Carbonate hardness pH
0 7.0 °KH 8.0
30 1.9 °KH 7.9
50 0.45 °KH 7.3
64 0.05 °KH 6.3

Two things are worth noticing. The first is how late the pH moves: after 30 days the tank has lost nearly three-quarters of its buffer and the pH has barely shifted, because alkalinity absorbs the acid until it is nearly gone. A keeper testing pH alone sees nothing until it is already happening. Testing KH would have shown it a month earlier. The second is that the water changes, not the biology, did most of the damage: simple dilution accounts for about 91% of the alkalinity lost, and nitrification the remaining 9%.

What follows from the crash is worse than the number itself. Below about pH 6.5 the nitrite-oxidising bacteria are in real trouble while the ammonia-oxidisers are not, so the cycle comes apart from one end: in the run above, the NOB population fell to 9% of its peak while the AOB held at 64%, and ammonia and nitrite both climbed back to cycling-phase levels in a tank that had been fully cycled for two weeks. See The Nitrogen Cycle.

The fix is not to chase the pH back up with additives. It is to put the minerals back in the replacement water, or to change with tap.

Topping Off Is the Opposite Problem

There is a mirror-image version of this, and it catches people who have learned the first lesson too well.

A water change and an evaporation top-off are not the same operation. A water change removes tank water, minerals and all, so the replacement has to bring minerals back. Evaporation removes only water -- every dissolved solid stays in the tank -- so a top-off must bring nothing back at all. Top off with tap and you are adding minerals to a tank that lost none, and nothing in a closed aquarium ever removes them again.

That one ratchets upward with no ceiling. Here are two runs of the same 196 L tank over 102 days, doing nothing but replacing evaporation:

Topped off with General hardness, day 0 day 102
Distilled / RO 6.00 °dGH 6.02 °dGH
Moderate tap 6.00 °dGH 7.07 °dGH

The RO line is flat, which is what "replace only what left" should look like. The tap line climbs about 0.27 °dGH every 25 days and the climb is perfectly straight, because nothing opposes it. Left alone it simply keeps going. The model's open tank evaporates gently, around 0.9% of its volume a month; a real tank in a dry room loses several times that, and the rate scales with it.

So the two operations want opposite water, and which one you are doing is decided entirely by whether any tank water is actually being removed:

You are Refill with Because
Topping off evaporation RO / distilled Only water left, so only water goes back
Changing water Tap, or remineralised RO Minerals left with the water and must return

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