Software Open Access
SolveSAPHE (Solver Suite for Alkalinity-PH Equations) provides a collection of Fortran 90 routines to solve the total alkalinity–pH equation, which relates total alkalinity and pH for a given set of total concentrations of the acid–base systems that contribute to total alkalinity in a given water sample.
This version is a bug fix release of the previous versions. The original package (version 1.0.1) was published as a supplement to the paper:
Guy Munhoven (2013) Mathematics of the total alkalinity-pH equation – pathway to robust and universal solution algorithms:the SolveSAPHE package v1.0.1. Geosci. Model Dev., 6, 1367–1388, 2013 (URL: https://www.geosci-model-dev.net/6/1367/2013 or doi:10.5194/gmd-6-1367-2013).
During extension works on SolveSAPHE, limitations in the bracketing procedure of successive iterates for safeguarding solvers have been made out (in
mod_phsolvers_logging.F90). With the AlkT - DIC pair used in the published version of SolveSAPHE, these limitations did not have any effect; with DIC replaced by CO2, the mathematical properties of the underlying fundamental equation change (the carbonate alkalinity term is not bounded any more), which causes problems with Newton iterates when the given CO2 concentration is high. With this pair, the following shortcomings were diagnosed:
Although we have not observed any similar effects during the stress-tests of SolveSAPHE with the AlkT - DIC pair, the affected procedures have been amended to avoid these problems from showing up in the future: