EGU General Assembly 2021
© Author(s) 2021. This work is distributed under
the Creative Commons Attribution 4.0 License.

SolveSAPHE-r2: a new versatile 4x4 engine for carbonate system pH calculations

Guy Munhoven
Guy Munhoven
  • Université de Liège, Astrophysique/Géophysique/Océanographie, Liège, Belgium (

SolveSAPHE, the Solver Suite for Alkalinity-PH Equations (Munhoven, 2013, DOI:10.5194/gmd-6-1367-2013), hereafter SolveSAPHE v.1, was the first carbonate chemistry speciation package that was able to securely and reliably calculate pH for any physically meaningful pair of total alkalinity (AlkT) and dissolved inorganic carbon (CT) values. We have now revised and extended the solution approach developed for SolveSAPHE v.1 so that AlkT & CO2, AlkT & HCO3 and AlkT & CO3 problems can be processed as well.

The mathematical analysis of the modified alkalinity-pH equations reveals that the AlkT & CO2 and AlkT & HCO3 problems have one and only one positive root for any physically sensible pair of data (i.e., such that, resp., [CO2] > 0 and [HCO3] > 0). For AlkT & CO3 the situation is completely different: there are pairs of data values for which there is no solution, others for which there is one and still others for which there are two. Similarly to its predecessor, the new SolveSAPHE-r2 offers automatic root bracketing and efficient initialisation schemes for the iterative solvers. The AlkT & CO3 problem is furthermore autonomously and completely characterised: for any given pair of data values, the number of solutions is determined and non-overlapping bracketing intervals are calculated.

The numerical solution of the alkalinity-pH equations for the three new pairs is far more difficult than for the AlkT & CT pair. The Newton-Raphson and the secant based solvers from SolveSAPHE v.1 had to be reworked in depth to reliably process the three additional data input pairs. The AlkT & CO2 pair is computationally the most demanding. With the Newton-Raphson based solver, it takes about five times as long to solve as the companion AlkT & CT pair, while AlkT & CO32– requires about four times as much time. All in all, the secant based solver offers the best performances. It outperforms the Newton-Raphson based one by up to a factor of four and leads to equation residuals that are up to seven orders of magnitude lower. For carbonate speciation problems posed by AlkT and either one of [CO2], [HCO3] or [CO32–] the secant based routine from SolveSAPHE-r2 is clearly the method of choice; for calculations with AlkT & CT, the SolveSAPHE v.1 solvers will perform better, due to the mathematically favourable characteristics of the alkalinity-pH equation for that pair.

How to cite: Munhoven, G.: SolveSAPHE-r2: a new versatile 4x4 engine for carbonate system pH calculations, EGU General Assembly 2021, online, 19–30 Apr 2021, EGU21-9477,, 2021.


Display file

Comments on the display

to access the discussion