Methods

How the model was checked, where to be careful with it, and the files behind it.

Checks it passes

Validated
  • Calibrated to one number: the 1985–2022 trend of −0.0017 pH per year (Copernicus Marine).
  • Untuned: pH change 1850–2022 is −0.125, against a published ≈ −0.1.
  • Untuned: Revelle factor 10.6, inside the typical 8–14 range.
  • Very high scenario reaches pH 7.70 by 2100, in line with published projections.

Be careful with

Caution
  • One global-mean surface box. Cold, upwelling and coastal waters sit well away from 8.04.
  • The shaded range is parameter uncertainty only. It leaves out scenario choice, regional differences and natural variability.
  • Not modelled: changing alkalinity or circulation, biology, minor ions.
  • CO₂ history is NOAA's Mauna Loa record from 1959 and ice-core estimates before that; scenarios are SSP-like.

Can a sensor see this?

Sensor

The model repo includes a pH-electrode simulator. A drift of only 0.1 mV per year looks the same as the whole global acidification trend, so detecting it depends on careful calibration.

–

Noise and drift values are simulation inputs, not specs of any real product.

Model files

ocean_ph_model.pyThe model. No plotting, no I/O on import.
Python
Notebook (.ipynb)Walkthrough with outputs already run.
Jupyter
co2_annmean_mlo.csvNOAA GML Mauna Loa annual-mean CO₂, 1959–2025: the record the model uses.
Data
export_projections.pyRe-runs the model and rebuilds the site's data from the NOAA file.
Python
projections.jsonAll four scenarios with metadata.
Data
test_ocean_ph_model.py13 tests, run with pytest.
Tests
import ocean_ph_model as m
df = m.project("intermediate")                 # year, co2_ppm, pH, pH_lo, pH_hi, omega_arag …
m.project({2050: 500, 2100: 700})              # your own CO₂ path
m.project("high", m.OceanParams(ta_umol_kg=2250, temp_c=22))   # a different region