Preprints
https://doi.org/10.5194/gmd-2020-447
https://doi.org/10.5194/gmd-2020-447

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: open (until 19 Apr 2021)

Comment types: AC – author | RC – referee | CC – community | EC – editor | CEC – chief editor | : Report abuse

Guy Munhoven

Viewed

Total article views: 162 (including HTML, PDF, and XML)
HTML PDF XML Total Supplement BibTeX EndNote
136 22 4 162 14 1 0
  • HTML: 136
  • PDF: 22
  • XML: 4
  • Total: 162
  • Supplement: 14
  • BibTeX: 1
  • EndNote: 0
Views and downloads (calculated since 22 Feb 2021)
Cumulative views and downloads (calculated since 22 Feb 2021)

Viewed (geographical distribution)

Total article views: 69 (including HTML, PDF, and XML) Thereof 69 with geography defined and 0 with unknown origin.
Country # Views %
  • 1
1
 
 
 
 
Latest update: 05 Mar 2021
Download
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.