SolveSAPHE-r2: revisiting and extending the Solver Suite for Alkalinity-PH Equations for usage with CO2, HCO3− or CO32− input data
- Dépt. d’Astrophysique, Géophysique et Océanographie, Université de Liège, B–4000 Liège, Belgium
Abstract. The successful and efficient approach at the basis of SolveSAPHE (Munhoven, 2013), which determines the carbonate system speciation by calculating pH from total alkalinity (AlkT) and dissolved inorganic carbon (CT), and which converges from any physically sensible pair of such data, has been adapted and further developed for work with AlkT & CO2, AlkT & HCO3− and AlkT & CO32−. The mathematical properties of the three modified alkalinity-pH equations are explored. It is shown 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). The space of AlkT & CO32− 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-pH equations is far more demanding than that for the original AlkT-CT 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 AlkT & CO2 pair is numerically the most challenging. With the Newton-Raphson based solver, it takes about five times as long to solve as the companion AlkT & CT pair, while AlkT & CO2 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 pH solvers from routines from the v.1 series, SolveSAPHE v.2 includes automatic root bracketing and efficient initialisation schemes for the iterative solvers. For AlkT & CO32− 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.
Viewed (geographical distribution)