Using Kgen to generate cross-verified apparent equilibrium constants (K∗’s) for palaeoseawater carbonate chemistry

Ross Whiteford*, Oscar Branson, Dennis Mayk

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

Abstract

Quantification of palaeo pH and palaeo CO2 from marine proxies requires the use of apparent equilibrium constants (K∗’s). The K∗’s required to calculate seawater carbonate chemistry are described by empirically determined calibrations, and for palaeoseawater these calibrations must be adjusted to account for changes in seawater composition. There are a number of possible calibrations that can be used to calculate K∗’s, and each software package for calculating carbonate chemistry separately implements these K∗ calibrations, which are manually verified against previous implementations. Palaeo applications typically only implement a single calibration for each K∗, but have additional complexity from the need to adjust each calibration for changing seawater composition through time. The fragmented approach to K∗ calculation can result in unintended and difficult to resolve discrepancies between outputs calculated by different pieces of software. We present “Kgen,” a synchronised collection of three pieces of software to consistently calculate palaeoseawater K∗’s in Python, R, and Matlab. Kgen provides a simple, and nearly identical interface in each language. Through use of a Continuous Integration/Continuous Delivery (CI/CD) pipeline, Kgen guarantees consistent outputs between languages by automatically cross-checking results from all three implementations. Unifying the approach to K∗ calculation in this way provides an extensible platform for verifiable K∗ generation for palaeoseawater, which can be integrated into existing carbon speciation calculators to improve the consistency of results.
Original languageEnglish
Article numbere2023GC011417
Pages (from-to)1-18
Number of pages18
JournalGeochemistry, Geophysics, Geosystems
Volume26
Issue number6
Early online date9 Jun 2025
DOIs
Publication statusPublished - Jun 2025

Keywords

  • Equilibrium constants
  • K*'s
  • Carbonate chemistry

Fingerprint

Dive into the research topics of 'Using Kgen to generate cross-verified apparent equilibrium constants (K∗’s) for palaeoseawater carbonate chemistry'. Together they form a unique fingerprint.

Cite this