{"title":"Using Kgen to Generate Cross-Verified Apparent Equilibrium Constants (K∗’s) for Palaeoseawater Carbonate Chemistry","authors":"Ross Whiteford, Oscar Branson, Dennis Mayk","doi":"10.1029/2023GC011417","DOIUrl":null,"url":null,"abstract":"<p>Quantification of palaeo pH and palaeo CO<sub>2</sub> from marine proxies requires the use of apparent equilibrium constants (K<sup>∗</sup>’s). The K<sup>∗</sup>’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<sup>∗</sup>’s, and each software package for calculating carbonate chemistry separately implements these K<sup>∗</sup> calibrations, which are manually verified against previous implementations. Palaeo applications typically only implement a single calibration for each K<sup>∗</sup>, but have additional complexity from the need to adjust each calibration for changing seawater composition through time. The fragmented approach to K<sup>∗</sup> 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<sup>∗</sup>’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<sup>∗</sup> calculation in this way provides an extensible platform for verifiable K<sup>∗</sup> generation for palaeoseawater, which can be integrated into existing carbon speciation calculators to improve the consistency of results.</p>","PeriodicalId":50422,"journal":{"name":"Geochemistry Geophysics Geosystems","volume":"26 6","pages":""},"PeriodicalIF":2.9000,"publicationDate":"2025-06-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://onlinelibrary.wiley.com/doi/epdf/10.1029/2023GC011417","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Geochemistry Geophysics Geosystems","FirstCategoryId":"89","ListUrlMain":"https://onlinelibrary.wiley.com/doi/10.1029/2023GC011417","RegionNum":2,"RegionCategory":"地球科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"GEOCHEMISTRY & GEOPHYSICS","Score":null,"Total":0}
引用次数: 0
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.
期刊介绍:
Geochemistry, Geophysics, Geosystems (G3) publishes research papers on Earth and planetary processes with a focus on understanding the Earth as a system. Observational, experimental, and theoretical investigations of the solid Earth, hydrosphere, atmosphere, biosphere, and solar system at all spatial and temporal scales are welcome. Articles should be of broad interest, and interdisciplinary approaches are encouraged.
Areas of interest for this peer-reviewed journal include, but are not limited to:
The physics and chemistry of the Earth, including its structure, composition, physical properties, dynamics, and evolution
Principles and applications of geochemical proxies to studies of Earth history
The physical properties, composition, and temporal evolution of the Earth''s major reservoirs and the coupling between them
The dynamics of geochemical and biogeochemical cycles at all spatial and temporal scales
Physical and cosmochemical constraints on the composition, origin, and evolution of the Earth and other terrestrial planets
The chemistry and physics of solar system materials that are relevant to the formation, evolution, and current state of the Earth and the planets
Advances in modeling, observation, and experimentation that are of widespread interest in the geosciences.