Submitted as: development and technical paper 22 Feb 2021

Submitted as: development and technical paper | 22 Feb 2021

Review status: this preprint is currently under review for the journal GMD.

SolveSAPHE-r2: revisiting and extending the Solver Suite for Alkalinity-PH Equations for usage with CO2, HCO3 or CO32− input data

Guy Munhoven Guy Munhoven
  • 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.

Guy Munhoven

Status: final response (author comments only)

Comment types: AC – author | RC – referee | CC – community | EC – editor | CEC – chief editor | : Report abuse
  • AC1: 'Figure 1 reprocessed', Guy Munhoven, 09 Mar 2021
  • RC1: 'Comment on gmd-2020-447', Anonymous Referee #1, 24 Mar 2021
  • RC2: 'Comment on gmd-2020-447', Anonymous Referee #2, 12 Apr 2021
  • AC2: 'Reply to the referees' comments', Guy Munhoven, 06 May 2021

Guy Munhoven


Total article views: 334 (including HTML, PDF, and XML)
HTML PDF XML Total Supplement BibTeX EndNote
263 59 12 334 24 1 1
  • HTML: 263
  • PDF: 59
  • XML: 12
  • Total: 334
  • Supplement: 24
  • BibTeX: 1
  • EndNote: 1
Views and downloads (calculated since 22 Feb 2021)
Cumulative views and downloads (calculated since 22 Feb 2021)

Viewed (geographical distribution)

Total article views: 207 (including HTML, PDF, and XML) Thereof 207 with geography defined and 0 with unknown origin.
Country # Views %
  • 1


Latest update: 11 May 2021
Short summary
SolveSAPHE (Munhoven, 2013) was the first package to calculate pH reliably from any physically sensible pair of total alkalinity (AlkT) and dissolved inorganic carbon (CT) data and to do so in an autonomous and efficient way. Here, we extend it to use CO2, HCO3 or CO3 instead of CT. For each one of these pairs, the new SolveSAPHE calculates all of the possible pH values (0, 1, or 2), again without any prior knowledge of the solutions.