^{1}

<p>The successful and efficient approach at the basis of SolveSAPHE (Munhoven, 2013), which determines the carbonate system speciation by calculating <i>p</i>H from total alkalinity (Alk<sub>T</sub>) and dissolved inorganic carbon (<i>C</i><sub>T</sub>), and which converges from any physically sensible pair of such data, has been adapted and further developed for work with Alk<sub>T</sub> & CO<sub>2</sub>, Alk<sub>T</sub> & HCO<sub>3</sub><sup>−</sup> and Alk<sub>T</sub> & CO<sub>3</sub><sup>2−</sup>. The mathematical properties of the three modified alkalinity-<i>p</i>H equations are explored. It is shown that the Alk<sub>T</sub> & CO<sub>2</sub> and Alk<sub>T</sub> & HCO<sub>3</sub><sup>−</sup> problems have one and only one positive root for any physically sensible pair of data (i.e., such that, resp., [CO<sub>2</sub>] > 0 and [HCO<sub>3</sub><sup>−</sup>] > 0). The space of Alk<sub>T</sub> & CO<sub>3</sub><sup>2−</sup> pairs is partitioned into regions where there is either no solution, one solution or where there are two. The numerical solution of the modified alkalinity-<i>p</i>H equations is far more demanding than that for the original Alk<sub>T</sub>-<i>C</i><sub>T</sub> pair as they exhibit strong gradients and are not always monotonous. The two main algorithms used from SolveSAPHE v.1 had to be revised in depth to reliably process the three additional data input pairs. The Alk<sub>T</sub> & CO<sub>2</sub> pair is numerically the most challenging. With the Newton-Raphson based solver, it takes about five times as long to solve as the companion Alk<sub>T</sub> & <i>C</i><sub>T</sub> pair, while Alk<sub>T</sub> & CO<sub>2</sub> requires about four times as much time. All in all, it is nevertheless the secant based solver that offers the best performances. It outperforms the Newton-Raphson based one by up to a factor of four, to reach equation residuals that are up to seven orders of magnitude lower. Just like the <i>p</i>H solvers from routines from the v.1 series, SolveSAPHE v.2 includes automatic root bracketing and efficient initialisation schemes for the iterative solvers. For Alk<sub>T</sub> & CO<sub>3</sub><sup>2−</sup> pairs of data, it also determines the number of roots and calculates non-overlapping bracketing intervals. An open source reference implementation in Fortran 90 of the new algorithms is made publicly available for usage under the GNU Lesser General Public Licence v.3 or later.</p>