Abstract
AquaEnv is an integrated software package for aquatic chemical model generation focused on ocean acidification and antropogenic CO2 uptake. However, the package is not restricted to the carbon cycle or the oceans: it calculates, converts, and visualizes information necessary to describe pH, related CO2 air–water exchange, as well as aquatic acid–base chemistry in general for marine, estuarine or freshwater systems. Due to the fact that it includes the relevant acid–base systems, it can also be applied to pore water systems and anoxic waters. AquaEnv is implemented in the open source programming language R , which allows for a flexible and versatile application: AquaEnv ’s functionality can be used stand-alone as well as seamlessly integrated into reactive-transport models in the R modelling environment. Additionally, AquaEnv provides a routine to simulate and investigate titrations of water samples with a strong acid or base, as well as a routine that allows for a determination of total alkalinity and total carbonate values from recorded titration curves using non-linear curve-fitting.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
With increasing concerns about climate change and ocean acidification (Caldeira and Wickett 2003; Royal Society 2005; IPCC 2007; Gazeau et al. 2007; Guinotte and Fabry 2008; Doney et al. 2009), there is a strong demand for computational tools that enable a quantitative description of the acid–base chemistry of natural waters. These tools are needed from both a modelling point of view as well as from an experimental perspective. Due to increasing complexity in model descriptions of aquatic ecosystems, biogeochemical models now often require the capability of pH prediction and full acid–base speciation (Luff et al. 2001; Caldeira and Wickett 2005; Jourabchi et al. 2005; Vanderborght et al. 2007; Doney et al. 2007; Blackford and Gilbert 2007; Zeebe et al. 2008; Aloisi 2008; Hofmann et al. 2008, 2009a). However, computational tools that describe acid–base speciation are also of interest to observational and experimental scientists: current methods to calculate total alkalinity (and total inorganic carbon) from measured titration curves, are based on fitting numerical models of the acid–base chemistry of the given water sample (Dickson 1981; DOE 1994; Anderson et al. 1999; Dickson et al. 2007).
Currently, there are two computational tools available that describe the acid–base chemistry of natural waters and the ocean carbon system in particular: the CO 2 SYS program (Lewis and Wallace 1998; Pierrot et al. 2006; van Heuven et al. 2009) and the extension package seacarb (Lavigne et al. 2008) for the open-source programming language R (R Development Core Team 2005). Both programs perform two basic tasks:
-
1.
The calculation of various physical parameters (dissociation constants, solubility constants of calcite and aragonite, Henry’s constant of CO2, etc.) as a function of temperature, salinity, and pressure
-
2.
The calculation of pH, the associated acid–base speciation (including the calculation of all parameters of the CO2 system), and the saturation state with respect to calcite and aragonite.
CO 2 SYS is the oldest program, but has a limited scope and is mainly focused on the ocean carbonate system. Although the phosphate and silicate systems are additionally incorporated as acid–base equilibria, only the carbonate speciation is provided in the output. Originally, the CO 2 SYS program was distributed either as a compiled Microsoft DOS program (Lewis and Wallace 1998) or as a Microsoft Excel spreadsheet (Pierrot et al. 2006), which makes the program static and inflexible. This way, CO 2 SYS was difficult to link to an external biogeochemical model code. Recently, a MATLAB version of CO 2 SYS has been released (van Heuven et al. 2009). Although that allows for some flexibility, the core function is still very rigid and tailored to the needs of an ocean researcher measuring properties of samples in the laboratory or in the field: it is a tool for the experimental scientist rather than a modelling tool. Next to the non-intuitive interface of the CO 2 SYS MATLAB function which uses variable types indicated by numbers instead of variable names, the MATLAB routine shares a shortcoming with the other CO 2 SYS versions: it does not provide the dissociation constants as output, they are only calculated and used internally. Furthermore, the user is restricted to MATLAB which is a commercial, proprietary program and might not be at the disposal of every scientist. The package seacarb , however, is implemented in the open-source programming language R . The R framework provides vast capabilities of preprocessing, statistical postprocessing, and visualization of data. Recently, R has also evolved into a suitable platform for biogeochemical and reactive-transport model development (Soetaert and Herman 2009), as powerful packages for numerical integration of differential equations (e.g. deSolve Soetaert et al. 2008), rootfinding (e.g. rootSolve Soetaert 2008), and reactive-transport modelling (Soetaert and Meysman 2009, e.g. ReacTran ) have been developed. The R platform is excellently suited for rapid prototyping of biogeochemical models, since it combines an interpreted programming language with the possibility to embed legacy FORTRAN code that enables fast numerical calculations.
Here, we report on the new R package AquaEnv that substantially extends the capabilities of both CO 2 SYS and seacarb . Compared to the seacarb package, AquaEnv can be applied to hyposaline systems (see Sect. 2), and it calculates a number of additional quantities, such as the buffer factor, various partial derivatives of total alkalinity, and ionization fractions that are useful for studying and modelling the effect of biogeochemical processes on pH (Hofmann et al. 2008, 2009a,b). Compared to CO 2 SYS , AquaEnv additionally includes the \(\left[\sum \hbox{NH}_4^+\right]\), \(\left[\sum \hbox{H}_2{\rm S}\right]\), \(\left[\sum \hbox{H}_3\hbox{PO}_4\right]\), \(\left[\sum \hbox{Si(OH)}_4\right]\), \(\left[\sum \hbox{HNO}_3\right]\), and \(\left[\sum \hbox{HNO}_2\right]\) acid–base systems, which makes it applicable to sediment pore water and anoxic systems. In addition, a number of more advanced applications are included in AquaEnv . These enable the improved interfacing with numerical biogeochemical models, the generation of “in silico” titrations, and the determination of total alkalinity (and total carbonate) values from measured titration curves by non-linear optimization (inverse modelling).
The AquaEnv package can be obtained from the Comprehensive R Archive Network (CRAN): http://cran.r-project.org/package=AquaEnv or from the R -forge website: http://r-forge.r-project.org/projects/aquaenv/. General information and tutorials about R can be found on the R project homepage: http://www.r-project.org/.
Please note that, at appropriate places throughout the paper, we supply boxes with R code fragments illustrating the usage of AquaEnv . These code fragments should serve as starting points for the inclined reader to explore AquaEnv whilst reading this publication. More detailed R scripts using AquaEnv are provided in the electronic appendix.
2 AquaEnv in Mesohaline and Oligohaline Environements
As mentioned above, the main novel features of AquaEnv are the implementation of quantities for the pH modelling approach given by Hofmann et al. (2008, 2009a,b), the titration simulation, and the alkalinity determination routines. Another important advantage of AquaEnv is that it can also be applied to mesohaline and oligohaline environments.
In AquaEnv , salinity (S) and temperature (t) relationships for dissociation constants as given in Table 1 are implemented. If there are multiple relations per dissociation constant implemented, the first one in the list is the default choice in AquaEnv .
This means, in AquaEnv , the default choice of S, t relations for dissociation constants is valid for a salinity range of 0–45, except for the relation for \({\tt K\_HSO4}\). However since DOE (1994), Zeebe and Wolf-Gladrow (2001), and Dickson et al. (2007) all recommend the Dickson (1990b) formulation for \({\tt K\_HSO4}\), we chose to make that our default choice. Applying AquaEnv to salinities below 5 using this default setting is still acceptable, since \({\tt K\_HSO4}\) is mainly needed for pH scale conversions from and to the total and seawater scale. However, in brackish and freshwater (model) applications, the NBS scale and the free scale are normally used, where \({\tt K\_HSO4}\) is less important as it plays no role for conversions between the NBS scale and the free scale. The influence of \({\tt K\_HSO4}\) via association or dissociation of the \(\hbox{HSO}_4^-\rightleftharpoons \hbox{H}^+ + \hbox{SO}_4^{2-}\) system on total alkalinity and pH is minute (free scale pH values differ in the sixth digit if different \({\tt K\_HSO4}\) formulations are used). Nevertheless, the user can choose to use the Khoo et al. (1977) formulation for \({\tt K\_HSO4}\) which is, as can be inferred from Millero (1995), valid down to S = 0.
Most important for the pH chemistry of aquatic systems with a high dissolved inorganic carbon concentration, like many estuaries, is the choice of the S, t relations for the first and the second dissociation constant of the carbonate system. We implement the relation by Roy et al. (1993b), adapted to low salinities as described by Millero (1995) (see caption of Table 1) and the relation by Millero et al. (2006), which are both explicitly valid down to S = 0. seacarb only implements the original version of Roy et al. (1993b), not adapted to low salinities, and the relation of Lueker et al. (2000), which are not valid below S = 5 and S = 19, respectively. Figure 1 plots all four relations against salinity in the oligohaline and mesohaline region.
It becomes clear that in the oligohaline realm (S < 5), there are big differences between the relations that are explicitly defined for low salinities and the ones that are not, this can also be seen in Fig. 2. AquaEnv implements two S, t relations for the first and second dissociation constant of the carbonate system (\({\tt K\_CO2}\) and \({\tt K\_HCO3}\)) that are valid down to S = 0, whilst seacarb implements none.
This means, AquaEnv provides an advantage over seacarb for oligohaline and mesohaline systems, since (1) it implements S, t relations for \({\tt K\_CO2}\) and \({\tt K\_HCO3}\) that are valid down to S = 0 and (2) it implements the conversion from and to the NBS scale for brackish and freshwater, which is not implemented in seacarb . In general, one can choose more S, t relationships in AquaEnv than one can in seacarb . CO 2 SYS can handle low salinities, but, as mentioned above, is restricted to a narrow choice of acid–base systems that are considered in the calculations, making it unsuitable for pore water and anoxic systems. However, CO 2 SYS does provide more choices of S, t relations for the CO2 system, since this is its main focus. It offers the same choice of S, t relations for \({\tt K\_HSO4}\) as does AquaEnv , but less choices for \({\tt K\_HF}\).
3 Structure of the AquaEnv Package and an aquaenv Object
The functionality in the seacarb package is established by calls to separate R functions. Rather than implementing separate functions for each feature, AquaEnv adopts a more integrated approach. Almost all functionality is contained within one generic function, termed aquaenv , which creates structured objects of the aquaenv class (encoded as an R list with multiple components), termed “aquaenv objects” in what follows. Components within an aquaenv object contain all information (physical parameters, acid–base dissociation constants, chemical speciation, partial derivatives, etc.) that can be calculated from the given input parameters. Whilst an underdeterminated system (too few input parameters) prompts an error message, an overdetermined system (too many input parameters) prompts AquaEnv to display a message that informs the user how calculated and suplied values differ. Information is obtained by selecting the appropriate element from the aquaenv object. At the same time, AquaEnv also includes individual functions that calculate quantities like acid–base dissociation constants separately.
Once created, aquaenv objects can be used in generic plotting and data processing commands, that have been specifically created for the aquaenv class. aquaenv objects can be converted to an R data.frame , which can be further postprocessed with standard R routines. Similarly, an R data.frame can be converted to an aquaenv object, for the use of aquaenv object specific plotting facilities provided in AquaEnv . Furthermore, the aquaenv objects can be used as input argument supplying initial conditions in the titration and TAfit functions, which respectively simulate an in silico titration and perform the inverse modelling of titration data to obtain total alkalinity values.
Appendix 7.1 details the complete structure of an aquaenv object. For each component, the name, physical units and a short explanation are listed. Appendix 7.2 gives all relevant mathematical formulae as well as physical and chemical constants, with respective literature references, used for calculation of components of an aquaenv object.
4 Basic Applications
4.1 Physical and Chemical Parameters
AquaEnv provides routines that calculate the key physical and chemical parameters involved in the acid–base chemistry of natural waters. These include the stoichiometric equilibrium constants (K*) for the major acid–base systems (carbonate, ammonia, sulphide, nitrate, nitrite, phosphate, silicate, borate, sulphate, and fluoride), the ion product of water, the Henry’s constants (K0) that govern the solubility of CO2 and O2, as well as the solubility products (Ksp) for calcite and aragonite. These parameters are all calculated according to a standard (S, t, p) format, i.e., as a function of salinity (S), temperature in °C (t), and the gauge pressure or applied pressure (p) which represents the total pressure (P) minus the atmospheric pressure (P a ) (Millero et al. 2008; Feistel 2008). Instead of the gauge pressure p, the total pressure P or the water depth d can also be given as input parameters. All required mathematical expressions were compiled from various sources in literature as discussed in Appendix 7.2.
Note that in AquaEnv , three different S, t dependencies for the first and the second dissociation constant of the carbonate system are implemented: the relation by Roy et al. (1993a) adapted to be also applicable to low salinities as described by Millero (1995); the relation by Lueker et al. (2000) which is recommended by Dickson et al. (2007) but which is not applicable to low salinities; and the relation introduced by Millero et al. (2006) which covers a salinity range from 0 to 40 and which is, amongst other relations, also used in CO 2 SYS . The relation by Roy et al. (1993a) is used by default in AquaEnv , and the other two relations can be employed by setting the flag k1k2 to “ lueker ” or “ millero ”. In the same way, two different relations for the dissociation constant of hydrogen fluoride can be used: the relation by Dickson and Riley (1979a) (default in AquaEnv ) and the relation by Perez and Fraga (1987) (as advised by Dickson et al. (2007); flag khf set to “ perez ” in AquaEnv ). Similarly, two different relations for the dissociation constant of hydrogen sulphate can be used: the relation by Dickson (1990b), as recommended by DOE (1994); Zeebe and Wolf-Gladrow (2001); Dickson et al. (2007) (default in AquaEnv ), and the relation by Khoo et al. (1977) as used in, e.g., Roy et al. (1993b); Millero (1995); Lewis and Wallace (1998) (flag khso4 set to “ khoo ” in AquaEnv ).
Our goal was to arrive at an internally consistent parameter set, where all quantities are expressed using the same concentration units and the same pH scale (molinity and free pH scale: see discussion below). To achieve this, appropriate conversions were applied, using auxiliary variables like seawater density calculated as a function of salinity and temperature, and ionic strength calculated as a function of salinity (see Appendix 7.2). These auxiliary variables are also stored as components in aquaenv objects and can thus be accessed by the user (As mentioned, a full list of names of components contained in aquaenv objects is given in Appendix 7.1).
4.2 Seawater Composition
For some biogeochemical applications, the detailed ionic composition of seawater is required. AquaEnv calculates this composition from salinity (according to DOE 1994; Dickson et al. 2007), determining the total borate concentration (\(\left[\sum \hbox{B(OH)}_3\right]\)), the total sulphate concentration (\(\left[\sum \hbox{H}_2\hbox{SO}_4\right]\)), the total fluoride concentration (\(\left[\sum \hbox{HF}\right]\)), and the ion concentrations of \(\hbox{Cl}^-\), Br−, Na+, Mg2+, Ca2+, K+, and Sr2+. Note that the values for \(\left[\sum \hbox{B(OH)}_3\right]\), \(\left[\sum \hbox{H}_2\hbox{SO}_4\right]\), \(\left[\sum \hbox{HF}\right]\) can also be given as input (in mol/kg-solution) upon construction of an aquaenv object, and in that case, they override the default values calculated from salinity.
4.3 pH Scales and Unit Conversions
Acid–base calculations are always characterized by a specific choice of the concentration unit (molarity = mol/l, molality = mol/kg-H2O, or molinity = mol/kg-solution) and the pH scale (free scale, total scale, seawater scale, and NBS scale, all based on a specific concentration unit: see discussion on pH scales in Dickson (1984), Lewis and Wallace (1998), and Zeebe and Wolf-Gladrow (2001)). To ensure the accuracy and consistency of the calculations, it is vital to consider the issue of concentration units and pH scales. Often, it is only specified that calculations are performed in gravimetric units (i.e., mol/kg). However, with increasing salinity, the difference between the two gravimetric units, molality and molinity, becomes significant, and so, the choice of concentration units must be made explicit. Similarly, the differences between pH scales are significant, especially at higher salinities (Zeebe and Wolf-Gladrow 2001). Each pH scale is linked to its own specific set of values for the stoichiometric equilibrium constants. Using a mixture of pH scales for equilibrium constants (K *) and pH values thus will lead to erroneous speciation calculations.
In AquaEnv , the input, output, and internal calculations are all stated in SI units (except for the pressure unit, which is bar instead of Pascal for the gauge pressure and atm instead of Pascal for the fugacities.), molinity, and on the free pH scale. To be consistent with Lewis and Wallace (1998), the NBS pH scale in AquaEnv is based on the proton concentration in mol/kg-H2O, while all other pH scales are based on mol/kg-soln. Both the input parameters and the components of an aquaenv object can be converted between different concentration units and pH scales using the generic AquaEnv function convert . Furthermore, the factors for conversion between molality and molinity ( molal2molin ) and between the free, total and seawater pH scale ( free2tot , free2sws , etc.) are components of an aquaenv object. The mathematical relations underlying these conversion functions are also detailed in Appendix 7.2.
The conversion from and to the NBS pH scale requires the activity coefficient for protons in solution (Durst 1975; Dickson 1981; Zeebe and Wolf-Gladrow 2001). In AquaEnv , we opted for a simple and direct approach: we implemented the Davies equation (as stated in Zeebe and Wolf-Gladrow 2001) to calculate the proton activity coefficient. Since the NBS scale is mainly used for fresh and brackish waters and not for open ocean waters, we choose not to invest time in the implementation of a detailed and intricate ion-interaction model (Pitzer model) as given by Millero and Pierrot (1998). The Davies equation is valid up to an ionic strength of I = 0.5 mol/kg-H2O (Zeebe and Wolf-Gladrow 2001) and hence, up to a salinity S of ∼25. Above this salinity, the conversion from and to the NBS pH scale as implemented in AquaEnv should be regarded as approximate.
4.4 Acid–Base Speciation Calculations
Given suitable input parameters, AquaEnv calculates the full speciation of all acid–base systems in the solution at hand. As output, one obtains an aquaenv object containing the concentrations of all dissociated species in the system, the related ionization fractions (i.e., the ratios of dissociated concentrations over total concentrations), the fugacity of CO2, as well as the saturation state Ω = [Ca2+][CO 2−3 ]/K sp for calcite and aragonite.
The speciation calculation consists essentially of two steps: the pH is first computed numerically, followed by the analytical calculations that describe the speciation. Numerically, the pH calculation comes down to the solution of a set of non-linear algebraic equations as determined by the mass action equations of the acid–base systems. In AquaEnv , this non-linear system is solved using the iterative approximation approach described by Follows et al. (2006), which is based on the repeated analytical solution of a quadratic equation derived from the mass action equations of the carbonate system only. In cases where this approach does not converge, e.g. in cases with very low or zero total dissolved inorganic carbon concentration \(\left( \left[ \sum \hbox{CO}_{2}\right] \right) \), the R function uniroot is employed which implements an interval based root finding algorithm. If only the pH needs to be calculated without a full speciation, one can set the flag speciation to FALSE .
A full speciation (i.e., all concentrations of the CO2 system as well as of all other acid–base systems) is calculated from salinity, temperature, and pressure (determining the stoichiometric equilibrium constants), the total concentrations associated with acid–base systems present (\(\left[\sum \hbox{CO}_2\right]\), \(\left[\sum \hbox{NH}_4^+\right]\), \(\left[\sum \hbox{H}_2{\rm S}\right]\), \(\left[\sum \hbox{HNO}_3\right]\), \(\left[\sum \hbox{HNO}_2\right]\), \(\left[\sum \hbox{H}_3{\rm PO}_4\right]\), \(\left[\sum \hbox{Si(OH)}_4\right]\), \(\left[\sum \hbox{B(OH)}_3\right]\), \(\left[\sum \hbox{H}_2\hbox{SO}_4\right]\), \(\left[\sum \hbox{HF}\right]\)), as well as total alkalinity ([TA]), or pH, or the carbon dioxide fugacity (fCO2), or the carbon dioxide concentration ([CO2]). Some of the quantities above have default values and do not need to be supplied. That means, for example, the parameter pairs ([TA], \(\left[\sum \hbox{CO}_2\right]\)), ([TA], pH), (pH, \(\left[\sum \hbox{CO}_2\right]\)) (fCO2, \(\left[\sum \hbox{CO}_2\right]\)), ([CO2], [TA]), etc. allow for the calculation of a full speciation. If too much information is provided (i.e. an overdetermined system is created), a message is displayed, stating how calculated and provided numbers differ.
Furthermore, it is possible to calculate \([\sum \hbox{CO}_2]\) and a full speciation from a suitable set of input parameters. To that end, the input value NULL needs to be assigned to the argument SumCO2 and one of the pairs pH and [CO2], pH and fCO2, pH and [TA], [TA] and [CO2], or [TA] and fCO2 needs to be supplied.
4.5 Buffer Factor, Partial Derivatives of Total Alkalinity, and Revelle Factor
Theory states that total alkalinity can be specified as a function of the proton concentration and both the total concentrations and the dissociation constants (K i *) of the various acid–base systems.
Recently, it has been shown that the partial derivativesFootnote 1 of this expression are crucial in the description of pH dynamics and proton cycling in natural waters (a detailed explanation of proton cycling in natural waters is beyond the scope of this publication. The interested reader is referred to our other publications on this subject: Hofmann et al. 2008, 2009a,b). In particular, they play a key role in the construction of pH models. The most important partial derivative is the buffer factor β, which is related to buffer quantities introduced by Morel and Hering (1993), Frankignoulle (1994), and Stumm and Morgan (1996), but which is defined differently
Similarly, the partial derivatives of alkalinity with respect to the concentrations of the other total quantities are important
In AquaEnv , all these partial derivatives are calculated via analytical expressions and are accessible to the user as components of an aquaenv object.
Furthermore, [TA] is a function of the dissociation constants (K i *) of the various acid–base systems which, in turn, are functions of salinity S, temperature t, and pressure p. If these dissociation constants are calculated on one pH scale and then converted to another pH scale, they become functions of \(\left[\sum \hbox{H}_2\hbox{SO}_4\right]\) and \(\left[\sum \hbox{HF}\right]\) as well (see also Hofmann et al. 2009a). In general,
Hofmann et al. (2009a) show that the products of the partial derivatives of [TA] with respect to the dissociation constants K i * and the partial derivative of the dissociation constants K i * with respect to one of their variables are needed for their explicit pH modelling approach. Therefore, AquaEnv numerically calculates
and provides these quantities as components of an aquaenv object.
Furthermore, as a related quantity, the well-known Revelle factor (e.g. Zeebe and WolfGladrow 2001) which is defined as
is numerically calculated in AquaEnv (see Appendix 7.2.12 for details) and provided as component of an aquaenv object.
Details of how to use the partial derivatives of total alkalinity in reactive-transport models are given in (Hofmann et al. 2008, 2009a,b). Furthermore, Sect. 5.1 provides simple example models employing some of these quantities.
4.6 Sensitivity Analysis
One of the input variables for the function aquaenv may be a vector. All other input variables are then assumed to be constant. As a result, an aquaenv object is created which contains vectors of the respective components as functions of the input vector. Together with the plotting functionality specific for aquaenv objects, this enables a simple form of sensitivity analysis and its visualization. Figure 2 shows how AquaEnv can be used to visualize how salinity variations in estuaries change the carbonate speciation (and pH; not shown). The code fragment below produces the three panels of Fig. 2 in separate plot windows.
4.7 Data Visualization
The plot.aquaenv function is the generic plotting method for aquaenv objects (within the R object-oriented programming environment, this function can be called as plot without the .aquaenv suffix). This plotting method visualizes the information contained in an aquaenv object in a multifunctional way. (1) It can be used to visualize the sensitivity of a system with respect to changes in one input parameter (Fig. 2). (2) The plot.aquaenv function can be used to create Bjerrum plots which are the classical textbook way of displaying the speciation of acid–base systems as a function of pH (e.g. Zeebe and Wolf-Gladrow 2001). (3) plot.aquaenv can generate “cumulative” plots that can be used to, e.g., visualize the partitioning of dissolved inorganic carbon into carbon dioxide, bicarbonate, and carbonate, or to partition the total rate of change of protons into contributions by different processes. The usage and syntax of the plot.aquaenv function is detailed in its R help file as well as in the package vignette of AquaEnv . The following code fragment gives an impression of the capability of the plot.aquaenv function. The last two plot calls produce graphs as shown in Fig. 3. Furthermore, Sect. 5.2 provides examples of how Bjerrum plots can be created using the titration function in combination with the plot.aquaenv function, and Sect. 5.1 provides another example for the cumulative plotting functionality.
5 Advanced Applications
5.1 AquaEnv in Reactive-Transport Models
When simulating the biogeochemistry of natural waters, one often needs to explicitly deal with pH dynamics. As a result, the corresponding reactive transport models need to include an acid–base speciation routine as a subcomponent. The function aquaenv fits this purpose. At each timestep of a dynamic model, aquaenv can calculate the desired information related to the “acid–base state” of the system (physical parameters, speciation, buffer capacity, partial derivatives etc.). We will show the use of aquaenv by means of a simple example model of a hypothetical aquatic system. Note that the example is an artificial model which is deliberately kept very simple for didactical reasons. Accordingly, it is not fitted to a particular natural system and it does not produce results relevant in reality. That means the used specific numerical values, selection of processes, and kinetic formulations for processes only serve illustrative purposes here and will not be discussed in detail.
Over a time scale of days, the pH chemistry of a hypothetical water reservoir is known to be influenced by two processes: CaCO3 precipitation and CO2 exchange across the air–water interface. These two dominant processes can be represented by the reaction equations
Note that the second reaction represents CO2 air–sea exchange. It is deliberately written in the style of a chemical reaction here to show that chemical and physical processes can be treated similarly concerning pH modelling according to Hofmann et al. (2008). The associated kinetic rate laws are (Morse 1983; Mucci 1986; Morse et al. 2003; Thomann and Mueller 1987):
In addition, the pH chemistry will also depend on a number of “fast” acid–base dissociation reactions, with characteristic time scales of less than a minute (Zeebe and Wolf-Gladrow 2001). To keep the model suitably simple, only the carbonate system is accounted for
The equilibrium mass action equations for these two acid–base reactions are, respectively:
As detailed by Hofmann et al. (2009b), there are two main model approaches to arrive at the pH evolution of the water reservoir. In the “alkalinity centred” or “implicit pH modelling approach”, one focuses on the effect of the kinetic processes on alkalinity ([TA]) and the total carbonate concentration (\(\left[\sum \hbox{CO}_2\right]\)) in the system. As a result, one obtains two differential equations describing the evolution of [TA] and \(\left[\sum \hbox{CO}_2\right]\)
Since the kinetic rate laws (Eqs. 9 and 10) feature concentrations of dissociated species, the integration of Eqs. 15 and 16 requires a two-step approach (e.g. Luff et al. 2001; Follows et al. 2006). Starting with initial values for [TA] and \(\left[\sum \hbox{CO}_2\right]\), one performs an “equilibration step” that calculates the concentrations of all dissociated species as a function of [TA] and \(\left[\sum \hbox{CO}_2\right]\). Subsequently, an “integration step” is performed: the kinetic rate terms, which feature the concentrations of the dissociated species [CO2] and [CO 2−3 ] are calculated, and the resulting rates of change of [TA] and \(\left[\sum \hbox{CO}_2\right]\) are passed on to the integrator which returns new values for [TA] and \(\left[\sum \hbox{CO}_2\right]\). Those new values, in turn, can be used for another “equilibration step”. By repeating this two-step procedure for a suitable sequence of time steps, one eventually obtains the evolution of [TA], \(\left[\sum \hbox{CO}_2\right]\), pH and all dissociated species over the desired time interval. The function aquaenv can be invoked to conveniently perform the “equilibration step”: with one function call, the pH and a full speciation is calculated. The following code fragment represents part of a simple model function that describes pH implicitly via the rates of changes of [TA] and \(\left[\sum \hbox{CO}_2\right]\). The file “AquaEnv-pHModelling.R” in the electronic appendix contains a model script that employs the respective model function.
An alternative approach to pH modelling was recently proposed (Hofmann et al. 2008, 2009b). The method was termed the “proton-centred” or “explicit” pH modelling approach, as it is based on an explicit evolution equation for the proton concentration. (Note that we are very brief in explaining this method here, since a detailed explanation is given by Hofmann et al. (2008) and (2009b) and is beyond the scope of this publication. However, AquaEnv does implement quantities necessary for this method, so we need to briefly repeat the main ideas.) Rather than using an evolution equation for alkalinity, one integrates following differential equation for the proton concentration
The quantities S P and S C are respectively termed the sensitivities of pH with respect to CaCO3 precipitation and CO2 exchange. They are defined as
These sensitivities thus feature partial derivatives of total alkalinity [TA], which are calculated in a closed analytical form by the function aquaenv . The following code fragment represents part of a simple model function that describes pH explicitly using partial derivatives of [TA]. The file “AquaEnv-pHModelling.R” in the electronic appendix contains a model script that employs the respective model function.
Hofmann et al. (2009b) show that the sensitivities of pH with respect to biogeochemical processes can also be expressed using ionization fractions (Skoog and West 1982; Stumm and Morgan 1996), here of the carbonate system (\(c_1 = [\hbox{CO}_2]/\left[\sum \hbox{CO}_2\right]\), \(c_2 = [\hbox{HCO}_3^-]/\left[\sum \hbox{CO}_2\right]\), \(c_3 = [\hbox{CO}_3^{2-}]/[\sum \hbox{CO}_2]\))
Ionization fractions are calculated by the function aquaenv as well. The following code fragment represents part of a simple model function that describes pH explicitly using ionization fractions. The file “AquaEnv-pHModelling.R” in the electronic appendix contains a model script that employs the respective model function.
As mentioned above, the full implementation of the implicit and explicit pH modelling approaches into R code using the aquaenv function is detailed in the file “AquaEnv-pHModelling.R” in the electronic appendix. The implicit and explicit pH modelling approaches provide exactly the same evolution of pH, alkalinity, the total carbonate concentration, and all other quantities as a function of time (Fig. 4). However, the explicit modelling approach has the important conceptual advantage that it allows a systematic investigation of the sensitivity of pH to the associated biogeochemical processes. Equation 17 specifies that the influence of a given process on pH can always be decomposed as a modulating factor, which is the sensitivity of pH with respect to that process, times the process rate. This way, one can attribute the observed pH changes in a given system to a particular processes. Using the plot.aquaenv function, this can be illustrated in a cumulative plot (Fig. 5). If the result of a model run is stored in the variable output (as done in the respective script provided in the file “AquaEnv-pHModelling.R” in the electronic appendix), the following code fragment creates Fig. 5 and saves it to the file “cumulative.eps”.
5.2 Titration Simulation
In aquatic chemistry, one important experimental procedure is titration. The function titration within AquaEnv provides a tool to simulate titrations, i.e., to perform “in silico” titrations. The archetypal titration procedure involves an initial water sample to which concentrated monoprotic acid or base is added in a stepwise fashion. The titration function in AquaEnv describes how the composition of a water sample changes due to the addition of titrant solution which can be either a strong acid (typically HCl) or a strong base (typically NaOH). Titration with multiprotic acids is not accounted for.
To simulate a titration using AquaEnv , one proceeds in two steps. First, the composition of the initial water sample has to be specified. This is done via creating an aquaenv object by specifying salinity, temperature, and pressure, as well as the initial pH (or equivalently [TA]), and the concentrations of all total quantities. This aquaenv object describing the initial conditions will be the first argument of the function titration . As further arguments, one has to specify the mass of the initial sample solution ( mass_sample ), the concentration of the titrant ( conc_titrant ), the salinity of the titrant solution ( S_titrant ), the total mass of titrant solution added ( mass_titrant ), the number of titration steps ( steps ), and the type of the titrant (either a strong acid indicated by “HCl”, or a strong base indicated by “NaOH” as values for the argument type with the default value “HCl”). Note that the titration simulation accounts for changes in the salinity of the titrated solution due to dilution of the original sample by the titrant (which may influence acid–base equilibria), as well as for volume changes and thus also the dilution of concentrations (\(\left[\sum \hbox{CO}_2\right]\), etc.) due to the addition of titrant. This feature is particularly important for the treatment of pore water samples where typically small volumes and low concentration titrants are used. The logical flag seawater_titrant decides whether the titrant contains borate, sulphate, and fluoride (titration with natural seawater), or not (titration with artificial seawater). Note that, in AquaEnv , only the calculation of [TA] changes due to changes in the total quantities \(\left[\sum \hbox{B(OH)}_3\right]\), \(\left[\sum \hbox{H}_2\hbox{SO}_4\right]\), and \(\left[\sum \hbox{HF}\right]\) when non-seawater concentrations of borate, sulphate, and fluoride are assumed. The S, t, relations of the dissociation constants remain the ones derived for seawater. The usage and syntax of the titration function is detailed in its R help file as well as in the package vignette of AquaEnv . Example titrations expressed in R code are given in the following code fragment and in the file “AquaEnv-TitrationSimulation.R” in the electronic appendix.
Results can be visualized by plotting pH and speciation against the amount of titrant added or any other variable in the aquaenv object (Fig. 6). However, an aquaenv object containing an in silico titration can also be visualized via Bjerrum plots (Fig. 7). The respective calls to the function plot.aquaenv can be found in the file “AquaEnv-TitrationSimulation.R” in the electronic appendix and in the following code fragment: the first block produces the plots in Fig. 6, the second block produces the plots in Fig. 7.
The plots in Fig. 7 differ from the classical textbook Bjerrum graphs (e.g. Zeebe and Wolf-Gladrow 2001) since the effect of dilution due to the addition of titrant is accounted for (this can be seen, for example, in the left panel, in a decrease in [SO 2−4 ] from high to low pH values which is an effect of a decrease in \(\left[\sum \hbox{H}_2\hbox{SO}_4\right]\) due to dilution during the titration which started at a high pH. In the right panel, this can be seen by a decrease in \(\left[\sum \hbox{CO}_2\right]\) (the curves for the three carbonate species added up) from high to low pH values due to dilution). Although one can create a theoretical textbook Bjerrum plot which is not based on a titration experiment by creating an aquaenv object with a vector of [TA] values as input (see Fig. 3 and the corresponding code fragment), creating a textbook Bjerrum plot is also possible based on a virtual titration experiment. When simulating a titration with a rather large volume and a concentrated titrant, the volume and salinity corrections are only minor, and one obtains the classical Bjerrum graphs known from textbooks (see Fig. 8 which is produced by the following code fragment. Note that, within the precision of the plot, the total quantities do not change anymore. Note also, that we changed the list of variables to be displayed from Fig. 7, that we changed the colours for the different variables, and that we zoomed in on an interesting section. We did this to illustrate the plotting capabilities of AquaEnv ).
5.3 Titration Data Analysis: Obtaining Total Alkalinity and Total Carbonate From Titration Data
The function TAfit is based on a method described in DOE (1994) and Dickson et al. (2007), makes use of the in silico titration function titration provided in AquaEnv , and allows for determining total alkalinity ([TA]), the total dissolved inorganic carbon concentrationFootnote 2 (\(\left[\sum \hbox{CO}_2\right]\)), as well as the electrode standard potential (E 0) and the first dissociation constant of the carbonate system (\(K_{\rm{CO2}}^{*}\)) from measured titration curves (pH versus the mass of titrant added) using an inverse modelling procedure. The Levenberg-Marquardt least squares optimization algorithm as provided in the R package minpack.lm (Elzhov and Mullen 2008) is employed to match calculated and measured titration curves.
The underlying principle of TAfit is simple: it generates an in silico titration curve (using an initial aquaenv object and the supplied parameters conc_titrant , mass_sample , S_titrant , and seawater_titrant which are passed on to the function titration ) with arbitrary values for [TA], \(\left[\sum \hbox{CO}_2\right]\), and E 0 (if an electrode potential curve is used). This in silico titration curve is then compared to the measured curve. In an iterative least-squares procedure, the arbitrary values for [TA], \(\left[\sum \hbox{CO}_2\right]\), and E 0 are then refined to the “best-fitting” values by matching the calculated and the measured titration curve (by setting the flag verbose to TRUE , the fitting process can be visualized while it is performed). Note that, although TAfit always returns values for [TA] and \(\left[\sum \hbox{CO}_2\right]\), the \(\left[\sum \hbox{CO}_2\right]\) value only reflects the value of the original sample if the titration is conducted in a closed vessel to prevent equilibration with the air. Due to uncertainties in the first dissociation constant of the carbonate system \(K_{\rm{CO2}}^{*}\), it is sometimes advised to fit this constant in the iterative least-squares procedure as well (this can be specified in TAfit via the logical flag K_CO2fit ). All other dissociation constants are calculated from salinity, temperature, and pressure. This curve fitting procedure was introduced by Dickson (1981), restated in DOE (1994) and Dickson et al. (2007), and mentioned by Anderson et al. (1999) and Zeebe and Wolf-Gladrow (2001). Additionally, Dickson et al. (2007) employ an open-cell variant of this method: a [TA] value is obtained by fitting only a part of the total titration curve after the sample has been acidified to expel all carbonate from the solution. The function TAfit is also capable of fitting only a part of a titration curve: with the argument datxbegin the amount of titrant added to acidify the sample before the actual titration can be specified. The usage and syntax of the TAfit function is detailed in its R help file as well as in the package vignette of AquaEnv .
Here, the functioning of TAfit is illustrated with a simple example. Dickson (1981) provided a benchmark test for total alkalinity fitting programs in the form of a synthetic dataset. This dataset is included in AquaEnv as the object sample_dickson1981 . Dickson (1981) uses fixed values for the equilibrium constants instead of calculating them as functions of salinity and temperature. TAfit allows for providing fixed values for the main dissociation constants, so the values given in Dickson (1981) can be used for the fitting procedure. As shown in the script and associated output in the following code fragment, the values for [TA] and \(\left[\sum \hbox{CO}_2\right]\) returned by the function TAfit are exactly the same as given in Dickson (1981), i.e., the fitting procedure yields the correct values.
Note that, for computational reasons, Johansson and Wedborg (1982) and Anderson et al. (1999) suggested to switch the dependent and independent variables, i.e., to calculate a theoretical vector of titrant masses instead of a vector of theoretical pH or E values while calculating the in silico titration curve. This has the advantage that one does not need to solve a non-linear equation system for the pH at every point of every in silico titration. However, due to the fact that in curve fitting algorithms the sum of squares of errors in the dependent variable is minimized, while errors in the independent variable are disregarded, Anderson et al. (1999) concluded that in principle the pH (or E) values would be the best choice as dependent variable, as their associated measurement uncertainty is larger than the measurement uncertainty for the amount of titrant added. Since nowadays computational power is not limiting anymore, we implemented the TAfit function of AquaEnv such that pH or E serve as dependent variables.
6 Summary
The R -package AquaEnv provides an integrated framework for acid–base speciation calculations and pH modelling. AquaEnv extends the functionality and application domain of packages like CO 2 SYS (Lewis and Wallace 1998; Pierrot et al. 2006) and seacarb (Lavigne et al. 2008). The package is not only applicable to seawater, but also to brackish and freshwater environments, and it not only deals with carbonate chemistry, but also includes a large selection of other relevant acid–base systems in natural waters. We adopted an integrated programming style by letting the function aquaenv create objects of a certain class which then can be visualized and processed with the functions plot and convert , but can also be exported to an R data.frame for further processing. AquaEnv cannot only be used as a stand-alone tool for quick calculations or rapid prototyping of models, but it can also be seamlessly integrated with complex biogeochemical models in the R modelling environment. Furthermore, it provides functions that allow to simulate titrations and to calculate alkalinity and total carbonate values from measured titration data.
Notes
Note that it is not necessary to indicate which variables are held constant when specifying a partial derivative if an exhaustive list of independent variables is given for the dependent variable, as it is the case here.
Although it is possible to also determine total dissolved inorganic carbonate concentrations from closed-cell titration data analysis, Dickson et al. (2007) recommend a more accurate method of determining the total dissolved inorganic carbon concentration, not based on titration, but based on expelling all dissolved inorganic carbon in a sample as gaseous CO2 via acidification and subsequent gas analysis. In that case, total alkalinity can be determined from open-cell titration data (see also the next paragraph).
Note that the given values do not sum up to 1, since chlorinity is originally defined as grams of chloride equivalents per kg of sample (which is the same as “‰” see Kremling 1999), i.e., it expresses the amount of only the anions converted to the molecular mass of chloride. Here, however, both anions and cations are listed, and the given values are related to their true molecular weight.
Note that the solution must have seawater composition, otherwise the relation given here is void.
Note that in Lewis and Wallace (1998), it is stated that the a values for H2O and H2S are freshwater values. And that the coefficients for the silicate species are assumed to be the same as the ones for the borate species.
References
Aloisi G (2008) The calcium carbonate saturation state in cyanobacterial mats throughout Earth’s history. Geochim Cosmochim Acta 72:6037–6060
Anderson LG, Turner DR, Wedborg M, Dyrssen D (1999) Determination of total alkalinity and total dissolved inorganic carbon. In: Grasshoff K, Gremling K, Ehrhardt M (eds) Methods of seawater analysis. Wiley-VCH, New York
Atkins PW (1996) Physikalische Chemie, 2nd edn. VCH, Weinheim
Blackford JC, Gilbert FJ (2007) pH variability and CO2 induced acidification in the North Sea. J Mar Syst 64:229–241
Boudreau BP (1996) Diagenetic models and their implementation. Springer, Berlin
Caldeira K, Wickett ME (2003) Anthropogenic carbon and ocean pH. Nature 425:365–365
Caldeira K, Wickett ME (2005) Ocean model predictions of chemistry changes from carbon dioxide emissions to the atmosphere and ocean. J Geophys Research-Oceans 110:C09S04
Dickson AG (1981) An exact definition of total alkalinity and a procedure for the estimation of alkalinity and total inorganic carbon from titration data. Deep-Sea Res Part A: Oceanogr Res Pap 28:609–623
Dickson AG (1984) pH scales and proton-transfer reactions in saline media such as sea-water. Geochim Cosmochim Acta 48:2299–2308
Dickson AG (1990a) Thermodynamics of the dissociation of boric-acid in synthetic seawater from 273.15 to 318.15 K. Deep-Sea Res Part A: Oceanogr Res Pap 37:755–766
Dickson AG (1990b) Standard potential of the reaction AgCl(s) + \({\frac{1}{2}}\)H2 (g) = Ag(s) + HCl(aq) and the standard acidity constant of the ion HSO −4 in synthetic sea-water from 273.15 to 318.15 K. J Chem Thermodyn 22:113–127
Dickson AG, Millero FJ (1987) A comparison of the equilibrium-constants for the dissociation of carbonic-acid in seawater media. Deep-Sea Res Part A: Oceanogr Res Pap 34:1733–1743
Dickson AG, Riley JP (1979a) Estimation of acid dissociation-constants in seawater media from potentiometric titrations with strong base. 1. Ionic product of water—Kw. Mar Chem 7:89–99
Dickson AG, Riley JP (1979b) Estimation of acid dissociation-constants in seawater media from potentiometric titrations with strong base. 2. Dissociation of phosphoric-acid. Mar Chem 7:101–109
Dickson AG, Sabine C, Christian JR (2007) Guide to best practices for ocean CO2 measurements. PICES special publications 1–191
DOE (1994) Handbook of methods for the analysis of the various parameters of the carbon dioxide system in sea water, ORNL/CDIAC-74
Doney SC, Mahowald N, Lima I, Feely RA, Mackenzie FT, Lamarque J-F, Rasch PJ (2007) Impact of anthropogenic atmospheric nitrogen and sulfur deposition on ocean acidification and the inorganic carbon system. Proc Natl Acad Sci 104:14580–14585
Doney SC, Fabry VJ, Feely RA, Kleypas JA (2009) Ocean acidification: the other CO2 problem. Annu Rev Mar Sci 1:169–192
Durst R (1975) Standard reference materials: standardisation of pH measurements. NBS Special Publications 260-53
Elzhov TV, Mullen KM (2008) minpack.lm: R interface to the Levenberg-Marquardt non-linear least-squares algorithm found in the MINPACK Fortran library, http://cran.r-project.org/package=minpack.lm, R package version 1.1-1
Feistel R (2008) A Gibbs function for seawater thermodynamics for 6 to 80°C and salinity up to 120 g kg−1. Deep-Sea Res Part I: Oceanogr Res Pap 55:1639–1671
Fofonoff NP, Millard RCJ (1983) Algorithms for computation of fundamental properties of seawater. UNESCO technical papers in marine science 44: 55 pp
Follows MJ, Ito T, Dutkiewicz S (2006) On the solution of the carbonate chemistry system in ocean biogeochemistry models. Ocean Model 12:290–301
Frankignoulle MA (1994) Complete set of buffer factors for acid–base CO2 system in seawater. J Mar Syst 5:111–118
Gazeau F, Quiblier C, Jansen JM, Gattuso JP, Middelburg JJ, Heip CHR (2007) Impact of elevated CO2 on shellfish calcification. Geophys Res Lett 34:L07603
Guinotte JM, Fabry VJ (2008) Ocean acidification and its potential effects on marine ecosystems. Year in Ecology and Conservation Biology 320–342
Harned HS, Davis R (1943) The ionization constant of carbonic acid in water and the solubility of carbon dioxide in water and aqueous salt solutions from 0 to 50°C. J Am Chem Soc 65:2030–2037
Harned HS, Scholes SR (1941) The ionization constant of HCO −3 from 0 to 50°C. J Am Chem Soc 63:1706–1709
Hofmann AF, Meysman FJR, Soetaert K, Middelburg JJ (2008) A step-by-step procedure for pH model construction in aquatic systems. Biogeosciences 5:227–251
Hofmann AF, Soetaert K, Middelburg JJ, Meysman FJR (2009a) pH modelling in aquatic systems with time-variable acid–base dissociation constants applied to the turbid, tidal Scheldt estuary. Biogeosciences 6:1539–1561
Hofmann AF, Middelburg JJ, Soetaert K, Wolf-Gladrow DA, Meysman FJR (2009b) Buffering, stoichiometry and the sensitivity of pH to biogeochemical and physical processes: a proton-based model perspective, in: Quantifying the influences of biogeochemical processes on pH of natural waters, A.F. Hofmann, PhD thesis, 129–151, http://igitur-archive.library.uu.nl/dissertations/2009-0513-200343/UUindex.html
IPCC (2007) Climate Change 2007: Synthesis Report. Contributions of working groups I, II, and III to the fourth assessment report of the intergovernmental panel on climate change [Core Writing team, Pachauri RK, Reisinger A (eds)], IPCC, Geneva, Switzerland
Johansson O, Wedborg M (1982) On the evaluation of potentiometric titrations of sea-water with hydrochloric-acid. Oceanol Acta 5:209–218
Jourabchi P, Van Cappellen P, Regnier P (2005) Quantitative interpretation of pH distributions in aquatic sediments: a reaction-transport modeling approach. Am J Sci 305:919–956
Khoo KH, Ramette RW, Culberson CH, Bates RG (1977) Determination of hydrogen ion concentrations in seawater from 5 to 40°C: standard potentials at salinities from 20 to 45%. Anal Chem 49:29–34
Kremling K (1999) Determination of the major constituents, In: Grasshoff K, Gremling K, Ehrhardt M (eds) Methods of seawater analysis. Wiley-VCH, New York
Lavigne H, Proye A, Gattuso J-P, Epitalon J-M, Gentili B, Orr J, Soetaert K (2008) seacarb: calculates parameters of the seawater carbonate system, http://cran.r-project.org/package=seacarb, R package version 2.1.4
Lewis EL, Wallace DWR (1998) Program developed for CO2 system calculations, ORNL/CDIAC-105. Carbon dioxide information analysis center, Oak Ridge National Laboratory, U.S. Department of Energy, Oak Ridge
Lueker TJ, Dickson AG, Keeling CD (2000) Ocean pCO2 calculated from dissolved inorganic carbon, alkalinity, and equations for K 1 and K 2: validation based on laboratory measurements of CO2 in gas and seawater at equilibrium. Mar Chem 70:105–119
Luff R, Haeckel M, Wallmann K (2001) Robust and fast FORTRAN and MATLAB® libraries to calculate pH distributions in marine systems. Comput Geosci 27:157–169
Millero FJ (1979) Thermodynamics of the carbonate system in seawater. Geochim Cosmochim Acta 43:1651–1661
Millero FJ (1982) The thermodynamics of seawater, Part 1. The PVT properties. Ocean Sci Eng 7:403–460
Millero FJ (1995) Thermodynamics of the carbon-dioxide system in the oceans. Geochim Cosmochim Acta 59:661–677
Millero FJ, Pierrot DA (1998) Chemical equilibrium model for natural waters. Aquat Geochem 4:153–199
Millero FJ, Poisson A (1981) International one-atmosphere equation of state of seawater. Deep-Sea Res Part A: Oceanogr Res Pap 28:625–629
Millero FJ, Plese T, Fernandez M (1988) The dissociation of hydrogen-sulphide in seawater. Limnol Oceanogr 33:269–274
Millero FJ, Yao WS, Aicher J (1995) The speciation of Fe(II) and Fe(III) in natural-waters. Mar Chem 50:21–39
Millero FJ, Graham TB, Huang F, Bustos-Serrano H, Pierrot D (2006) Dissociation constants of carbonic acid in seawater as a function of salinity and temperature. Mar Chem 100:80–94
Millero FJ, Feistel R, Wright DG, McDougall TJ (2008) The composition of standard seawater and the definition of the reference-composition salinity scale. Deep-Sea Res Part I: Oceanogr Res Pap 55:50–72
Morel FM, Hering JG (1993) Principles and applications of aquatic chemistry. John Wiley & sons, New York
Morse JW (1983) The kinetics of calcium carbonate dissolution and precipitation. In: Reeder RJ (eds) Carbonates: mineralogy and chemistry, 227–264. Mineral Soc Am
Morse JW, Gledhill DK, Millero FJ (2003) CaCO3 precipitation kinetics in waters from the great bahama bank: implications for the relationship between bank hydrochemistry and whitings. Geochim Cosmochim Acta 67:2819–2826
Mucci A (1983) The solubility of calcite and aragonite in seawater at various salinities, temperatures, and one atmosphere total pressure. Am J Sci 283:780–799
Mucci A (1986) Growth-kinetics and composition of magnesian calcite overgrowths precipitated from seawater—quantitative influence of ortho-phosphate ions. Geochim Cosmochim Acta 50:2255–2265
Murray CN, Riley JP, Wilson TRS (1969) Solubility of gases in distilled water and sea water. I. Nitrogen. Deep-Sea Res 16:297–310
Perez FF, Fraga F (1987) Association constant of fluoride and hydrogen-ions in seawater. Mar Chem 21:161–168
Pierrot D, Lewis E, Wallace DWR (2006) MS Excel Program Developed for CO2 system calculations, ORNL/CDIAC-105a. Carbon dioxide information analysis center, Oak Ridge National Laboratory, U.S. Department of Energy, Oak Ridge
R Development Core Team (2005) R: A language and environment for statistical computing, R Foundation for Statistical Computing, Vienna, Austria, http://www.r-project.org, ISBN 3-900051-07-0
Riordan E, Minogue N, Healy D, O’Driscoll P, Sodeau JR (2005) Spectroscopic and optimization modeling study of nitrous acid in aqueous solution. J Phys Chem A 109:779–786
Roy RN, Roy LN, Lawson M, Vogel KM, Moore CP, Davis W, Millero FJ (1993a) Thermodynamics of the dissociation of boric-acid in seawater at S = 35 from 0 to 55°C. Mar Chem 44:243–248
Roy RN, Roy LN, Vogel KM, PorterMoore C, Pearson T, Good CE, Millero FJ, Campbell DM (1993b) The dissociation constants of carbonic acid in seawater at salinities 5 to 45 and temperatures 0 to 45°C (see also erratum: Mar Chem 52:183, 1996). Mar Chem 44:249–267
Royal Society (2005) Ocean acidification due to increasing atmospheric carbon doxide. Policy Document 12/05, The Royal Society, London, UK
Skoog DA, West DM (1982) Fundamentals of analytical chemistry. Holt-Saunders International Editions, Philadelphia
Soetaert K (2008) rootSolve: Non-linear root finding, equilibrium and steady-state analysis of ordinary differential equations, http://cran.r-project.org/package=rootSolve, Rpackage version 1.2
Soetaert K, Herman PMJ (2009) A practical guide to ecological modelling. Springer, Berlin
Soetaert K, Meysman FJR (2009) ReacTran: reactive-transport modelling in 1D, 2D and 3D, http://cran.r-project.org/package=ReacTran, R package version 1.1
Soetaert K, Hofmann AF, Middelburg JJ, Meysman FJR, Greenwood J (2007) The effect of biogeochemical processes on pH. Mar Chem 105:30–51
Soetaert K, Petzold T, Setzer RW (2008) deSolve: general solvers for (ordinary) differential (algebraic) equations, http://cran.r-project.org/package=deSolve, R package version 1.1
Soetaert K, Petzoldt T, Meysman FJR (2009) marelac: Constants, conversion factors, utilities for the MArine, Riverine, Estuarine, LAcustrine and Coastal sciences, http://cran.r-project.org/package=marelac, R package version 1.4
Stumm W, Morgan JJ (1996) Aquatic chemistry: chemical equilibria and rates in natural waters. Wiley Interscience, New York
Thomann RV, Mueller JA (1987) Principles of surface water quality modeling and control. Harper & Row, New York
van Heuven S, Pierrot D, Lewis E, Wallace DWR (2009) MATLAB Program developed for CO2 system calculations, ORNL/CDIAC-105b. Carbon dioxide information analysis center, Oak Ridge National Laboratory, U.S. Department of Energy, Oak Ridge
Vanderborght J-P, Folmer IM, Aguilera DR, Uhrenholdt T, Regnier P (2007) Reactive-transport modelling of C, N, and O2 in a river-estuarine-coastal zone system: Application to the Scheldt estuary, marine chemistry special issue: dedicated to the memory of Professor Roland Wollast 106:92–110
Weiss RF (1970) Solubility of nitrogen, oxygen and argon in water and seawater. Deep-Sea Res 17:721–735
Weiss RF (1974) Carbon dioxide in water and seawater: the solubility of a non-ideal gas. Mar Chem 2:203–215
Williams DR (2004) NASA earth fact sheet, http://nssdc.gsfc.nasa.gov/planetary/factsheet/earthfact.html
Wischmeyer AG, Del Amo Y, Brzezinski M, Wolf-Gladrow DA (2003) Theoretical constraints on the uptake of silicic acid species by marine diatoms, Mar Chem 82:13–29
Zeebe RE, Wolf-Gladrow D (2001) CO2 in seawater: equilibrium, kinetics, isotopes, no. 65 in Elsevier Oceanography Series, 1st edn. Elsevier, Amsterdam
Zeebe RE, Zachos JC, Caldeira K, Tyrrell T (2008) Oceans-Carbon emissions and acidification. Science 321:51–52
Acknowledgments
The first author thanks Jan Peene, Anna de Kluijver, Ilse Kamerling, and Sarah Fiorini, for support in obtaining laboratory data for an earlier version of AquaEnv as well as beta testing the package. We furthermore thank two anonymous reviewers for constructive criticism. This research was supported by the EU (Carbo-Ocean, 511176-2) and the Netherlands Organization for Scientific Research (833.02.2002). This is publication number 4663 of the Netherlands Institute of Ecology (NIOO-KNAW), Centre for Estuarine and Marine Ecology, P.O. Box 140, 4400 AC Yerseke, The Netherlands. Filip Meysman is supported by an Odysseus research grant from F.W.O. (Research Foundation Flanders).
Open Access
This article is distributed under the terms of the Creative Commons Attribution Noncommercial License which permits any noncommercial use, distribution, and reproduction in any medium, provided the original author(s) and source are credited.
Author information
Authors and Affiliations
Corresponding author
Electronic supplementary material
Below is the link to the electronic supplementary material.
Appendix
Appendix
1.1 Components of an aquaenv Object
Maximally, i.e., if enough input data is supplied to define the pH of the system and the flags speciation , dsa , and revelle are set to TRUE , while the flag skeleton is set to FALSE upon calling the aquaenv function, an aquaenv object can contain the following components
Element | Unit | Explanation |
---|---|---|
S | “psu” (no unit) | Salinity |
t | °C | Temperature |
p | bar | Gauge pressure (total pressure minus atmospheric pressure Feistel, 2008) |
T | K | Absolute temperature |
Cl | ‰ | Chlorinity |
I | mol/kg-H2O | Ionic strength |
P | bar | Total pressure |
Pa | bar | Atmospheric pressure |
d | m | Depth |
density | kg/m3 | (Seawater) density |
\({\tt SumCO2}\) | mol/kg-soln | \([\sum\hbox{CO}_2]\), total dissolved inorganic carbon concentration |
\({\tt SumNH4}\) | mol/kg-soln | \([\sum \hbox{NH}_4^+]\), total ammonium concentration |
\({\tt SumH2S }\) | mol/kg-soln | \([\sum \hbox{H}_2\hbox{S}]\), total sulfide concentration |
\({\tt SumHNO3 }\) | mol/kg-soln | \([\sum \hbox{HNO}_3]\), total nitrate concentration |
\({\tt SumHNO2}\) | mol/kg-soln | \([\sum \hbox{HNO}_2]\), total nitrite concentration |
\({\tt SumH3PO4}\) | mol/kg-soln | \([\sum \hbox{H}_3\hbox{PO}_4]\), total phosphate concentration |
\({\tt SumSiOH4}\) | mol/kg-soln | \([\sum \hbox{Si(OH)}_4]\), total silicate concentration |
\({\tt SumBOH3}\) | mol/kg-soln | \([\sum \hbox{B(OH)}_3]\), total borate concentration |
\({\tt SumH2SO4}\) | mol/kg-soln | \([\sum \hbox{H}_2\hbox{SO}_4]\), total sulfate concentration |
\({\tt SumHF}\) | mol/kg-soln | \([\sum \hbox{HF}]\), total fluoride concentration |
Br | mol/kg-soln | [Br−], total bromide concentration |
ClConc | mol/kg-soln | [Cl−], chloride concentration |
Na | mol/kg-soln | [Na+], sodium concentration |
Mg | mol/kg-soln | [Mg2+], magnesium concentration |
Ca | mol/kg-soln | [Ca2+], calcium concentration |
K | mol/kg-soln | [K+], potassium concentration |
Sr | mol/kg-soln | [Sr2+], strontium concentration |
molal2molin | (mol/kg-soln)/(mol/kg-H2O) | concentration conversion factor: from molality to molinity |
free2tot | – | pH conversion factor: free scale to total scale |
free2sws | – | pH conversion factor: free scale to seawater scale |
tot2free | – | pH conversion factor: total scale to free scale |
tot2sws | – | pH conversion factor: total scale to seawater scale |
sws2free | – | pH conversion factor: seawater scale to free scale |
sws2tot | – | pH conversion factor: seawater scale to total scale |
\({\tt K0\_CO2}\) | mol/(kg-soln*atm) | Henry’s constant for CO2 |
\({\tt K0\_O2}\) | mol/(kg-soln*atm) | Henry’s constant for O2 |
fCO2atm | atm | Atmospheric fugacity of CO2 |
fO2atm | atm | Atmospheric fugacity of O2 |
CO2_sat | mol/kg-soln | CO2 saturation concentration at an atmospheric fugacity of fCO2atm |
O2_sat | mol/kg-soln | O2 saturation concentration at an atmospheric fugacity of fO2atm |
\({\tt K\_W}\) | (mol/kg-soln)2, free pH scale | stoichiometric equilibrium ion product of \(\hbox{H}_2\hbox{O:} {K}_{W}^*=[\hbox{H}^+][\hbox{OH}^-]\) |
\({\tt K\_HSO4}\) | mol/kg-soln, free pH scale | Stoichiometric equilibrium constant \({K}_{{\rm HSO}_4^-}^* =[\hbox{H}^+][\hbox{SO}_4^{2-}]/[\hbox{HSO}_4^-]\) |
\({\tt K\_HF}\) | mol/kg-soln, free pH scale | Stoichiometric equilibrium constant \({K}_{\rm HF}^*=[\hbox{H}^+][\hbox{F}^{-}]/[\hbox{HF}]\) |
\({\tt K\_CO2}\) | mol/kg-soln, free pH scale | Stoichiometric equilibrium constant \({K}_{{\rm CO}_2}^* =[\hbox{H}^+][\hbox{HCO}_3^{-}]/[\hbox{CO}_2]\) |
\({\tt K\_HCO3}\) | mol/kg-soln, free pH scale | Stoichiometric equilibrium constant \({K}_{{\rm HCO}_3^{-}}^* =[\hbox{H}^+][\hbox{CO}_3^{2-}]/[\hbox{HCO}_3^{-}]\) |
\({\tt K\_BOH3}\) | mol/kg-soln, free pH scale | Stoichiometric equilibrium constant \({K}_{{\rm B(OH)}_3}^* =[\hbox{H}^+][\hbox{B(OH)}_4^-]/[\hbox{B(OH)}_3]\) |
\({\tt K\_NH4}\) | mol/kg-soln, free pH scale | Stoichiometric equilibrium constant \({K}_{{\rm NH}_4^+}^* =[\hbox{H}^+][\hbox{NH}_3]/[\hbox{NH}_4^+]\) |
\({\tt K\_H2S}\) | mol/kg-soln, free pH scale | Stoichiometric equilibrium constant \({K}_{{\rm H}_2{\rm S}}^* =[\hbox{H}^+][\hbox{HS}^-]/[\hbox{H}_2{\rm S}]\) |
\({\tt K\_H3PO4}\) | mol/kg-soln, free pH scale | Stoichiometric equilibrium constant \({K}_{{\rm H}_3{\rm PO}_4}^* =[\hbox{H}^+][\hbox{H}_2{\rm PO}_4^-]/[\hbox{H}_3\hbox{PO}_4]\) |
\({\tt K\_H2PO4}\) | mol/kg-soln, free pH scale | Stoichiometric equilibrium constant \({K}_{{\rm H}_2{\rm PO}_4^-}^* =[\hbox{H}^+][\hbox{HPO}_4^{2-}]/[\hbox{H}_2\hbox{PO}_4^-]\) |
\({\tt K\_HPO4}\) | mol/kg-soln, free pH scale | Stoichiometric equilibrium constant \({K}_{{\rm HPO}_4^{2-}}^* =[\hbox{H}^+][\hbox{PO}_4^{3-}]/[\hbox{HPO}_4^{2-}]\) |
\({\tt K\_SiOH4}\) | mol/kg-soln, free pH scale | Stoichiometric equilibrium constant \({K}_{{\rm Si(OH)}_4}^* =[\hbox{H}^+][\hbox{SiO(OH)}_3^-]/[\hbox{Si(OH)}_4]\) |
\({\tt K\_SiOOH3}\) | mol/kg-soln, free pH scale | Stoichiometric equilibrium constant \({K}_{{\rm SiO(OH)}_3^-}^* =[\hbox{H}^+][\hbox{SiO}_2\hbox{(OH)}_2^{2-}]/[\hbox{SiO(OH)}_3^-]\) |
\({\tt K\_HNO2}\) | mol/kg-soln; mol/kg-H2O; mol/l | Approximate value for equilibrium constant \({K}_{{\rm HNO}_2}^* =[\hbox{H}^+][\hbox{NO}_2^-]/[\hbox{HNO}_2]\) |
\({\tt K\_HNO3}\) | mol/kg-soln; mol/kg-H2O; mol/l | Approximate value for equilibrium constant \({K}_{{\rm HNO}_3}^* =[\hbox{H}^+][\hbox{NO}_3^-]/[\hbox{HNO}_3]\) |
\({\tt K\_H2SO4}\) | mol/kg-soln; mol/kg-H2O; mol/l | Approximate value for equilibrium constant \({K}_{{\rm H}_2{\rm SO}_4}^* =[\hbox{H}^+][\hbox{HSO}_4^-]/[\hbox{H}_2\hbox{SO}_4]\) |
\({\tt K\_HS}\) | mol/kg-soln; mol/kg-H2O; mol/l | Approximate value for equilibrium constant \({K}_{{\rm HS}^-}^* =[\hbox{H}^+][\hbox{S}^{2-}]/[\hbox{HS}^-]\) |
Ksp_calcite | (mol/kg-soln)2 | Stoichiometric equilibrium solubility product of calcite Ksp *cal = [Ca2+][CO 2−3 ]eq |
Ksp_aragonite | (mol/kg-soln)2 | Stoichiometric equilibrium solubility product of aragonite \(\hbox{Ksp}_{\rm ara}^* =[\hbox{Ca}^{2+}][\hbox{CO}_3^{2-}]_{\rm eq}\) |
TA | mol/kg-soln | [TA], total alkalinity |
pH | -, free scale, based on mol/kg-soln | pH |
fCO2 | atm, | Fugacity of CO2 in the water |
CO2 | mol/kg-soln | [CO2] |
HCO3 | mol/kg-soln | [HCO −3 ] |
CO3 | mol/kg-soln | [CO 2−3 ] |
BOH3 | mol/kg-soln | [B(OH)3] |
BOH4 | mol/kg-soln | [B(OH) −4 ] |
OH | mol/kg-soln | [OH−] |
H3PO4 | mol/kg-soln | [H3PO4] |
H2PO4 | mol/kg-soln | [H2PO −4 ] |
HPO4 | mol/kg-soln | [HPO 2−4 ] |
PO4 | mol/kg-soln | [PO 3−4 ] |
SiOH4 | mol/kg-soln | [Si(OH)4] |
SiOOH3 | mol/kg-soln | [SiO(OH) −3 ] |
SiO2OH2 | mol/kg-soln | [SiO2(OH) 2−2 ] |
H2S | mol/kg-soln | [H2S] |
HS | mol/kg-soln | [HS−] |
S2min | mol/kg-soln | [S2−] |
NH4 | mol/kg-soln | [NH +4 ] |
NH3 | mol/kg-soln | [NH3] |
H2SO4 | mol/kg-soln | [H2SO4] |
HSO4 | mol/kg-soln | [HSO −4 ] |
SO4 | mol/kg-soln | [SO 2−4 ] |
HF | mol/kg-soln | [HF] |
F | mol/kg-soln | [F−] |
HNO3 | mol/kg-soln | [HNO3] |
NO3 | mol/kg-soln | [NO −3 ] |
HNO2 | mol/kg-soln | [HNO2] |
NO2 | mol/kg-soln | [NO −2 ] |
omega_calcite | – | Saturation state Ω with respect to calcite |
omega_aragonite | – | Saturation state Ω with respect to aragonite |
revelle | – | Revelle factor RF0 |
c1 | – | Ionization fraction \(c_1 = [\hbox{CO}_2]/[\sum \hbox{CO}_2]\) |
c2 | – | Ionization fraction \(c_2 = [\hbox{HCO}_3^-]/[\sum \hbox{CO}_2]\) |
c3 | – | Ionization fraction \(c_3 = [\hbox{CO}_3^{2-}]/[\sum \hbox{CO}_2]\) |
dTAdSumCO2 | – | \( \frac{\partial [{\rm TA}]}{\partial \left[ \sum \hbox{CO}_2\right]}\) with \([{\rm TA}] = f([\hbox{H}^+], [\sum \hbox{CO}_2], ...)\) |
b1 | – | Ionization fraction \(b_1 = [\hbox{B(OH)}_3]/[\sum \hbox{B(OH)}_3]\) |
b2 | – | Ionization fraction \(b_2 = [\hbox{B(OH)}_4^-]/[\sum \hbox{B(OH)}_3]\) |
dTAdSumBOH3 | – | \(\frac{\partial [{\rm TA}]}{\partial \left[\sum B(OH)_3\right]}\) with \([{\rm TA}] = \hbox{f}([\hbox{H}^+], [\sum \hbox{CO}_2], ...)\) |
so1 | – | Ionization fraction \(so_1 = [\hbox{H}_2\hbox{SO}_4]/[\sum \hbox{H}_2\hbox{SO}_4]\) |
so2 | – | Ionization fraction \(so_2 = [\hbox{HSO}_4^-]/[\sum \hbox{H}_2\hbox{SO}_4]\) |
so3 | – | Ionization fraction \(so_3 = [\hbox{SO}_4^{2-}]/[\sum \hbox{H}_2\hbox{SO}_4]\) |
dTAdSumH2SO4 | – | \(\frac{\partial [{\rm TA}]}{\partial \left[\sum \hbox{H}_2\hbox{SO}_4\right]}\) with \([{\rm TA}] = \hbox{f}([\hbox{H}^+], [\sum \hbox{CO}_2], ...)\) |
f1 | – | Ionization fraction \(f_1 = [\hbox{HF}]/[\sum \hbox{HF}]\) |
f2 | – | Ionization fraction \(f_2 = [\hbox{F}^-]/[\sum \hbox{HF}]\) |
dTAdSumHF | – | \(\frac{\partial [{\rm TA}]}{\partial \left[\sum \hbox{HF}\right]}\) with \([{\rm TA}] = \hbox{f}([\hbox{H}^+], [\sum \hbox{CO}_2], ...)\) |
p1 | – | Ionization fraction \(p_1 = [\hbox{H}_3\hbox{PO}_4]/[\sum \hbox{H}_3\hbox{PO}_4]\) |
p2 | – | Ionization fraction \(p_2 = [\hbox{H}_2\hbox{PO}_4^-]/[\sum \hbox{H}_3\hbox{PO}_4]\) |
p3 | – | Ionization fraction \(p_3 = [\hbox{HPO}_4^{2-}]/[\sum \hbox{H}_3\hbox{PO}_4]\) |
p4 | – | Ionization fraction \(p_4 = [\hbox{PO}_4^{3-}]/[\sum \hbox{H}_3\hbox{PO}_4]\) |
dTAdSumH3PO4 | – | \(\frac{\partial [{\rm TA}]}{\partial \left[\sum \hbox{H}_3\hbox{PO}_4\right]}\) with \(\rm [{\rm TA}] = f([H^+], [\sum CO_2], ...)\) |
si1 | – | Ionization fraction \(si_1 = [\hbox{Si(OH)}_4] / [\sum \hbox{Si(OH)}_4]\) |
si2 | – | Ionization fraction \(si_2 =[\hbox{SiO(OH})_3] / [\sum \hbox{Si(OH)}_4]\) |
si3 | – | Ionization fraction \(si_3 =[\hbox{SiO}_2\hbox{(OH)}_2] / [\sum \hbox{Si(OH)}_4]\) |
dTAdSumSumSiOH4 | – | \(\frac{\partial [{\rm TA}]}{\partial \left[\sum \hbox{Si(OH)}_4\right]}\) with \([{\rm TA}] = \hbox{f}([\hbox{H}^+], [\sum \hbox{CO}_2], ...)\) |
s1 | – | Ionization fraction \(s_1 = [\hbox{H}_2\hbox{S}] / [\sum \hbox{H}_2\hbox{S}]\) |
s2 | – | Ionization fraction \(s_2 = [\hbox{HS}^-] / [\sum \hbox{H}_2\hbox{S}]\) |
s3 | – | Ionization fraction \(s_3 = [\hbox{S}^{2-}] / [\sum \hbox{H}_2\hbox{S}]\) Note that we do assume S2− does exist. However, s 3 is very small. |
dTAdSumH2S | – | \(\frac{\partial [{\rm TA}]}{\partial \left[\sum \hbox{H}_2\hbox{S}\right]}\) with \([{\rm TA}] = \hbox{f}([\hbox{H}^+], [\sum \hbox{CO}_2], ...)\) |
n1 | – | Ionization fraction \(n_1 = [\hbox{NH}_4^+] / [\sum \hbox{NH}_4^+]\) |
n2 | – | Ionization fraction \(n_2 = [\hbox{NH}_3] / [\sum \hbox{NH}_4^+]\) |
dTAdSumNH4 | – | \(\frac{\partial [{\rm TA}]}{\partial \left[\sum \hbox{NH}_4^+\right]}\) with \([{\rm TA}] = \hbox{f}([\hbox{H}^+], [\sum \hbox{CO}_2], ...)\) |
na1 | – | Ionization fraction \(na_1 = [\hbox{HNO}_3] / [\sum \hbox{HNO}_3]\) |
na2 | – | Ionization fraction \(na_2 = [\hbox{NO}_3^-] / [\sum \hbox{HNO}_3]\) |
dTAdSumHNO3 | – | \(\rm \frac{\partial [{\rm TA}]}{\partial \left[\sum \hbox{HNO}_3\right]}\) with \([{\rm TA}] = \hbox{f}([\hbox{H}^+], [\sum \hbox{CO}_2], ...)\) |
ni1 | – | Ionization fraction \(ni_1 = [\hbox{HNO}_2] / [\sum \hbox{HNO}_2]\) |
ni2 | – | Ionization fraction \(ni_2 = [\hbox{NO}_2^-] / [\sum \hbox{HNO}_2]\) |
dTAdSumHNO2 | – | \(\frac{\partial [{\rm TA}]}{\partial \left[\sum \hbox{HNO}_2\right]}\) with \([{\rm TA}] = \hbox{f}([\hbox{H}^+], [\sum \hbox{CO}_2], ...)\) |
dTAdH | – | \(\frac{\partial [{\rm TA}]}{\partial \left[\hbox{H}^+\right]}\): buffer factor with \([{\rm TA}] = \hbox{f}([\hbox{H}^+], [\sum \hbox{CO}_2], ...)\) |
dTAdKdKdS | – | \(\sum_{i} \frac{\partial [{\rm TA}]}{\partial {K}^*_{ i}} \frac{\partial {K}^*_{i}}{\partial S}\) with \([{\rm TA}] = \hbox{f}([\hbox{H}^+], [\sum \hbox{CO}_2], ..., {K}^*_{i})\) |
dTAdKdKdT | – | \(\sum_{ i} \frac{\partial [{\rm TA}]}{\partial {K}^*_{i}} \frac{\partial K^*_{ i}}{\partial t}\) with \([{\rm TA}] = \hbox{f}([\hbox{H}^+], [\sum \hbox{CO}_2], ..., {K}^*_{i})\) |
dTAdKdKdp | – | \(\sum_{ i} \frac{\partial [{\rm TA}]}{\partial K^*_{ i}} \frac{\partial K^*_{ i}}{\partial p}\) with \([{\rm TA}] = \hbox{f}([\hbox{H}^+], [\sum \hbox{CO}_2], ..., K^*_{i})\) |
dTAdKdKdSumH2SO4 | – | \(\sum_{ i} \frac{\partial [{\rm TA}]}{\partial K^*_{ i}} \frac{\partial K^*_{ i}}{\partial [\sum \hbox{H}_2\hbox{SO}_{\rm 4}]}\) with \([{\rm TA}] = \hbox{f}([\hbox{H}^+], [\sum \hbox{CO}_2], ..., K^*_{i})\) |
dTAdKdKdSumHF | – | \(\sum_{i} \frac{\partial [{\rm TA}]}{\partial K^*_{i}} \frac{\partial K^*_{i}}{\partial [\sum \hbox{HF}]}\) with \([{\rm TA}] = \hbox{f}([\hbox{H}^+], [\sum \hbox{CO}_2], ..., K^*_{i})\) |
While all important references used to calculate single components of an aquaenv object are given in Appendix 7.2, the vignette of the AquaEnv package contains a table with more detailed information. It is listed which is the original reference, how certain formulae changed throughout different papers that reference each other, in which reference the concentration unit and the pH scale are stated, where typograpical errors have been corrected, and where certain properties needed to be inferred. Including this information, here would unnecessary lengthen this appendix.
Note that the components revelle , dTAdKdKdS , dTAdKdKdT , dTAdKdKdp , dTAdKdKdSumH2SO4 , and dTAdKdKdSumHF are calculated numerically, and therefore, their calculation (induced via the flags revelle and dsa ) is computationally intense. Similarly, calculating \({\tt K\_CO2}\) and \({\tt K\_HCO3}\) according to Roy et al. (1993b) which means that the intersection of the formulae for high and low salinity as a function of temperature needs to be calculated, is computationally intense.
1.2 Constants and Formulae
1.2.1 Chemical Constants Used in AquaEnv
Components of list PhysChemConst
absZero | −273.15 | °C | (Dickson et al. 2007) | Absolute zero |
R | 83.14472 | \(\frac{{\rm bar*cm}^3}{{\rm mol*K}}\) | (Dickson et al. 2007) | Ideal gas constant (=8.314472 \(\frac{\rm J}{{\rm mol\,K}}\), but the formulae used here (from Millero 1995), need R in \(\frac{\rm bar*cm^3}{\rm mol*K}\) |
F | 96485.3399 | C/mol | (Dickson et al. 2007) | Faraday constant |
e | 79 | – | (Zeebe and Wolf-Gladrow 2001) | Relative dielectric constant of seawater |
\({\tt K\_HNO2}\) | 1.584893e-3 | mol/l | (Riordan et al. 2005) | Approximate dissociation constant of HNO2, NBS pH scale, hybrid constant |
\({\tt K\_HNO3}\) | 23.44 | mol/kg-soln | Approximate dissociation constant of HNO3, assumed on mol/kg-soln and free pH scale, stoichiometric constant | |
\({\tt K\_H2SO4}\) | 100 | mol/kg-soln | (Atkins 1996) | Approximate dissociation constant of H2SO4, assumed on mol/kg-soln and free pH scale, stoichiometric constant |
\({\tt K\_HS}\) | 1.1e-12 | mol/kg-soln | (Atkins 1996) | Approximate dissociation constant of HS, assumed on mol/kg-soln and free pH scale, stoichiometric constant |
Components of list MeanMolecularMass and of list ConcRelCl
The list MeanMolecularMass contains mean molecular masses in g/mol. The list is taken from Dickson et al. (2007, Chap. 5, p. 4), values are shown to 5 significant digits where available. The list ConcRelCl contains relative concentrations of key chemical species in seawater with respect to chlorinityFootnote 3 (DOE (1994, Chap. 5, p. 11) and Dickson et al. (2007, Chap. 5, p. 10)).
MeanMolecularMass | ConcRelCl | |
---|---|---|
Cl | 35.453 | 0.99889 |
SO4 | 96.061 | 0.1400 |
Br | 79.904 | 0.003473 |
F | 18.998 | 0.000067 |
Na | 22.990 | 0.55661 |
Mg | 24.305 | 0.06626 |
Ca | 40.078 | 0.02127 |
K | 39.098 | 0.0206 |
Sr | 87.62 | 0.00041 |
B | 10.811 | 0.000232 |
1.2.2 Chlorinity Cl as a Function of Salinity S
Chlorinity Cl (in ‰) is calculated from salinity S using a relation given in DOE (1994, Chap. 5, p. 11) and Zeebe and Wolf-Gladrow (2001, p. 100)
1.2.3 Total Concentrations of Key Chemical Species in Seawater as a Function of Chlorinity Cl
As described in DOE (1994, Chap. 5, p. 11) and Dickson et al. (2007, Chap. 5, p. 10), values in lists MeanMolecularMass and ConcRelCl are used to calculate the total concentration [X] (in mol/kg-soln) of chemical species X in seawaterFootnote 4 according to the relation
1.2.4 Ionic Strength I as Function of Salinity S
According to DOE (1994, Chap. 5, p. 13, 15), Zeebe and Wolf-Gladrow (2001, p. 12), and Roy et al. (1993b, p. 257), I (in mol/kg-H2O) is calculated as
Note that the approximation I/(mol/kg-solution) ≈ 0.0199201 S is given in Millero (1982, p. 428.). This relationship converted into mol/kg-H2O, and the last digits adjusted (from 0.0199201 to 0.019924) results in the formula used here.
1.2.5 Relation Between Water Depth d and Gauge Pressure p
Although the relation between gauge pressure p (total pressure minus atmospheric pressure, see Feistel (2008)) and water depth d can be approximated by p = 0.101325 d in most cases, since p increases per m of water depth d by approximately \(\frac{1}{10}\) of 1 atm (=1.01325 bar Dickson et al. (2007, Chap. 5, p. 3)), here, the more accurate relation given by Fofonoff and Millard (1983) as implemented in Soetaert et al. (2009) is used
where p is the gauge pressure in dbar (decibar), and g the earth’s gravity in m/s2 g is calculated from the latitude lat (in degrees, −90 to 90, if not given, lat = 0 is assumed) as given in Fofonoff and Millard (1983) and implemented in Soetaert et al. (2009)
1.2.6 Seawater density as Function of Salinity S and Temperature t
According to (Millero and Poisson 1981) as reprinted in DOE (1994, Chap. 5, p. 6f) the density of seawater ρ SeaWater (in \(\frac{kg}{m^3}\); density in an aquaenv object) can be calculated as
with t representing the temperature in °C and ρ Water the density of fresh water in kg/m3.
1.2.7 Gas-Exchange Constants, Dissociation Constant, and Solubility Products as Functions of Salinity S , (absolute) Temperature T , and Gauge Pressure p
Empirical formulations for the temperature and salinity dependence of all gas-exchange constants, equilibrium constants, and solubility products calculated in AquaEnv can be brought into the generic forms
or
or
with T being the temperature in Kelvin, k °0 the concentration unit of the constant, and A, B, C, D, E, and the respective variables with a prime (′) or two primes (″) being functions of salinity S . In the following we will give A, B, C, D, and E, or A′, B′, C′, D′, and E′, or A″, B″, C″, D″, and E″ for each calculated constant.
1.2.7.1 Gas-exchange constants (Henry’s constants) as functions of salinity S and temperature T
The following table shows the coefficients for Eq. 34 of gas-exchange constants in AquaEnv , with fCO2 being the fugacity of CO2.
\({\tt K\_CO2}\): solubility of CO2 in seawater | |
---|---|
\(A = 0.023517\,{\tt S}- 167.81077\) | CO2_sat = fCO2\({\tt K\_CO2}\) |
B = 9345.17 | |
C = 23.3585 | \(k_0^{\circ}= \left[\frac{mol}{kg-solution \, atm}\right]\) |
D = −2.3656 × 10−4 S | |
E = 4.7036 × 10−7 S | |
References: Weiss (1974) (original), DOE (1994, Chap. 5, p. 13), Millero (1995, p. 663), Zeebe and Wolf-Gladrow (2001, p. 257), and Dickson et al. (2007, Chap. 5, p. 12) |
\({\tt K0\_O2 }\): solubility of O2 in seawater (micro mol per kg-soln and atm) | |
---|---|
A = − 846.9978 − 0.037362 S | O2_sat = fO2 K0_O2 |
B = 25559.07 | |
C = 146.4813 | \({k_0^{\circ}}= \left[\frac{\mu mol}{kg-solution\, atm}\right]\) |
D = − 0.22204 + 0.00016504 S | |
E = − 2.0564 × 10−7 S | |
References: derived from Weiss (1970) agrees with data in Murray et al. (1969) |
Note that the formulation for K0_O2 has been derived using the formulation for a gravimetric O2 saturation concentration given in Weiss (1970). It has been converted from ml-O2/kg-soln to μmol-O2/kg-soln using the molar volume of O2 calculated with the virial equation using a first virial coefficient for oxygen at 273.15 Kelvin of −22 cm3/mol Atkins (1996), a value of 8.314472 Nm/(Kelvin mol) for the gas constant R , and an ambient pressure of 101325 N/m2. The expression for the Henry’s constant has then been created by dividing the expression for the saturation concentration by fO2 = 0.20946 atm (Williams 2004).
1.2.7.2 Stoichiometric acid–base dissociation constants as functions of salinity S and temperature T
The following table gives the coefficients for Eqs. 34, or 35, or 36 of stoichiometric acid–base dissociation constants in AquaEnv . Note that if some of the coefficients A to E are not listed, they are to be considered zero. Note also that given references sometimes contain the formulae in different units or on different pH scales. The formulae provided in this table yield the dissociation constants on different pH scales and concentration units. In AquaEnv , constants that are not already on the free pH scale and in mol/kg-soln are converted to the free pH scale and mol/kg-soln.
\({\tt K\_HSO4}\): \(\hbox{HSO}_4^- \rightleftharpoons \hbox{H}^+ +\hbox{SO}_4^{2-}\) (“dickson”) | Free pH scale |
---|---|
A = \(324.57 \sqrt{\left(\frac{\tt I}{m^{\circ}}\right)} - 771.54 \, \frac{\tt I}{m^{\circ}}+ 141.328\) | \({\tt K\_HSO4}=\frac{[\hbox{H}^+]_F \, [\hbox{SO}_4^{2-}]}{[\hbox{HSO}_4^-]}\) |
B = \(35474 \frac{\tt I}{m^{\circ}}+ 1776\,{\left(\frac{\tt I}{m^{\circ}}\right)}^2-13856\, \sqrt{\left(\frac{\tt I}{m^{\circ}}\right)}-2698\left(\frac{\tt I}{m^{\circ}}\right)^{\frac{3}{2}}-4276.1\) | \(k^{\circ}=\frac{\hbox{mol}}{\hbox{kg}-\hbox{H}_2\hbox{O}}\) |
C = \(114.723 \, \frac{\tt I}{m^{\circ}}-47.986\sqrt{\left(\frac{\tt I}{m^{\circ}}\right)} - 23.093\) | \(m^{\circ}=\frac{\hbox{mol}}{\hbox{kg}-\hbox{H}_2\hbox{O}}\) |
References: DOE (1994, c. 5, p. 13), Zeebe and Wolf-Gladrow (2001, p. 260), Dickson (1990b) (original) |
\({\tt K\_{HSO4:}} \hbox{HSO}_4^- \rightleftharpoons \hbox{H}^+ + \hbox{SO}_4^{2-}\) (“khoo”) | Free pH scale |
---|---|
\({A} = 6.3451 + 0.5208\, \sqrt{\left(\frac{\tt I} {m^{\circ}}\right)}\) | \({\tt K\_HSO4}=\frac{[\hbox{H}^+]_F \, [\hbox{SO}_4^{2-}]}{[\hbox{HSO}_4^-]}\) |
B = − 647.59 | \(k^{\circ}=\frac{\hbox{mol}}{\hbox{kg}-\hbox{H}_2\hbox{O}}\) |
D = − 0.019085 | \(m^{\circ}=\frac{\hbox{mol}}{\hbox{kg}-\hbox{H}_2\hbox{O}}\) |
References: Khoo et al. (1977) (original), Roy et al. (1993b), Millero (1995), Lewis and Wallace (1998) |
\({\tt K\_{HF:}} \hbox{HF} \rightleftharpoons \hbox{H}^+ + \hbox{F}^-\) (“dickson”) | Free pH scale |
---|---|
A = \(1.525 \, \sqrt{\frac{\tt I}{m^{\circ}}}- 12.641\) | \({\tt K\_HF}=\frac{[\hbox{H}^+]_{\rm F}\, [\hbox{F}^-]}{[\hbox{HF}]}\) |
B = 1590.2 | \(k^{\circ}=m^{\circ}=\frac{\hbox{mol}}{\hbox{kg}-\hbox{H}_2\hbox{O}}\) |
References: Dickson and Riley (1979a, p. 91) (original), Dickson and Millero (1987, p. 1783), Roy et al. (1993b, p. 257), DOE (1994, c. 5, p. 15), Millero (1995, p. 664), Zeebe and Wolf-Gladrow (2001, p. 260) |
\({\tt K\_{HF:}} \hbox{HF}\rightleftharpoons \hbox{H}^+ + \hbox{F}^-\) (“perez”) | Total pH scale |
---|---|
\({A} =-9.68 + 0.111\sqrt{S}\) | \({\tt K\_HF}=\frac{[\hbox{H}^+]_{F}\,[{\rm F}^-]}{[\hbox{HF}]}\) |
B = 874 | \(k^{\circ}= \frac{\hbox{mol}}{\hbox{kg}-\hbox{solution}}\) |
References: Perez and Fraga (1987, p. 91) (original), Dickson et al. (2007, Chap. 5, p. 14) |
\({\tt K\_{CO2:}} \hbox{CO}_2(aq)+\hbox{H}_2\hbox{O}(\rightleftharpoons \hbox{H}_2\hbox{CO}_3)\rightleftharpoons \hbox{H}^+ + \hbox{HCO}_3^-\) (“roy”; high salinities: S > 5) | Total pH scale |
---|---|
A = \(2.83655 -0.20760841\,\sqrt{{\tt S}} + 0.08468345\,{\tt S} - 0.00654208\,{\tt S}^{\frac{3}{2}}\) | |
B = \(- 2307.1266 - 4.0484\,\sqrt{{{\tt S}}}\) | \({\tt K\_CO2}=\frac{[\hbox{H}^+][\hbox{HCO}_3^-]}{[\hbox{CO}_2\hbox{(aq)}]}\) |
C = − 1.5529413 | \(k^{\circ}=\frac{\hbox{mol}}{\hbox{kg}-\hbox{H}_2\hbox{O}}\) |
References: Roy et al. (1993b, p. 254) (original), DOE (1994, c. 5, p. 14), Millero (1995, p. 664), Zeebe and Wolf-Gladrow (2001, p. 255) |
\({\tt K\_{CO2:}} \hbox{CO}_2\hbox{(aq)} + \hbox{H}_2\hbox{O}(\rightleftharpoons \hbox{H}_2\hbox{CO}_3) \rightleftharpoons \hbox{H}^+ + \hbox{HCO}_3^-\) (“roy”; low salinities: \({\tt S} \leq 5\)) | Total pH scale |
---|---|
A = \(290.9097 - 228.39774\,\sqrt{{\tt S}} + 54.20871\,{\tt S} - 3.969101\,{\tt S}^{\frac{3}{2}}- 0.00258768\,{\tt S}^2\) | |
B = \(-14554.21 + 9714.36839\,\sqrt{{\tt S}} - 2310.48919\,{\tt S}+ 170.22169\,{\tt S}^{\frac{ 3}{2}}\) | \({\tt K\_CO2} =\frac{[\hbox{H}^+] [\hbox{HCO}_3^-]}{[\hbox{CO}_2\hbox{(aq)}]}\) |
C = \(- 45.0575+ 34.485796\,\sqrt{{\tt S}}- 8.19515\,{{\tt S}}+ 0.60367\,{{\tt S}}^{\frac{3}{2}}\) | \(k^{\circ}=\frac{\hbox{mol}}{\hbox{kg}-\hbox{H}_2\hbox{O}}\) |
References: Roy et al. (1993b, p. 256) (original, based on a temperature dependence restated in Millero (1979), originally given in Harned and Davis (1943). Note that there is a typesetting error in Roy et al. (1993b): the third value for B is 2310.48919, not 310.48919) Millero (1995, p. 664) (the typesetting error is corrected here). Also, here, it is mentioned that this formula should be used for \({\tt S} \leq 5\) . Note that both functions do not always intersect at S = 5. The true intersection, a function of t , is calculated and used in AquaEnv |
\({\tt K\_{CO2:}} \hbox{CO}_2\hbox{(aq)} + \hbox{H}_2\hbox{O} (\rightleftharpoons \hbox{H}_2\hbox{CO}_3) \rightleftharpoons \hbox{H}^+ + \hbox{HCO}_3^-\) (“lueker”) | Total pH scale |
---|---|
\({A}^{\prime\prime} = 61.2172 + 0.011555\,{\tt S} - 0.0001152\,{\tt S}^2\) | \({\tt K\_CO2}=\frac{[\hbox{H}^+] [\hbox{HCO}_3^-]} {[ \hbox{CO}_2\hbox{(aq)}]}\) |
B′′ = − 3633.86 | \(k^{\circ}=\frac{\hbox{mol}}{\hbox{kg}-\hbox{solution}}\) |
C′′ = − 9.67770 | |
References: Lueker et al. (2000) (original), Dickson et al. (2007, Chap. 5, pp. 13–14) |
\({\tt K\_{CO2:}} \hbox{CO}_2\hbox{(aq)} + \hbox{H}_2\hbox{O}\,(\rightleftharpoons \hbox{H}_2\hbox{CO}_3) \rightleftharpoons \hbox{H}^+ + \hbox{HCO}_3^-\) (“millero”) | SW pH scale |
---|---|
\(A^{\prime\prime} = 126.34048 - 0.0331\,{\tt S} + 0.0000533\,{\tt S}^2 - 13.4191\,\sqrt{\tt S}\) | \({\tt K\_CO2}=\frac{[\hbox{H}^+] [\hbox{HCO}_3^-]}{[\hbox{CO}_2\hbox{(aq)}]}\) |
\(B^{\prime\prime} = -6320.813 + 6.103\,{{\tt S}} + 530.123\,\sqrt{{{\tt S}}}\) | \(k^{\circ}=\frac{\hbox{mol}}{\hbox{kg}-\hbox{solution}}\) |
\(C^{\prime\prime} = -19.568224 + 2.06950\,\sqrt{{{\tt S}}}\) | |
References: Millero et al. (2006) (original) |
\({\tt K\_{HCO3:}} \hbox{HCO}_3^- \rightleftharpoons \hbox{H}^+ + \hbox{CO}_3^{2-}\) (“roy”; high salinities: \({{\tt S}} > 5\)) | Total pH scale |
---|---|
\({A} = -9.226508 -0.106901773\,\sqrt{{{\tt S}}} + 0.1130822\,{{\tt S}} - 0.00846934\,{{\tt S}}^{\frac{3}{2}}\) | \({\tt K\_HCO3} =\frac{[\hbox{H}^+][\hbox{CO}_3^{2-}]}{[\hbox{HCO}_3^-]}\) |
\(B = -3351.6106 - 23.9722\,\sqrt{{{\tt S}}}\) | \(k^{\circ}=\frac{\hbox{mol}}{\hbox{kg}-\hbox{H}_2\hbox{O}}\) |
\({C} = - 0.2005743\) | |
References: Roy et al. (1993b, p. 254) (original), DOE (1994, c. 25, p. 15), Millero (1995, p. 664), Zeebe and Wolf-Gladrow (2001, p. 255) |
\({\tt K\_{HCO3:}} \hbox{HCO}_3^- \rightleftharpoons \hbox{H}^+ + \hbox{CO}_3^{2-}\) (“roy”; low salinities: \({\tt S} \leq 5\)) | Total pH scale |
---|---|
\({A} = 207.6548 -167.69908\,\sqrt{{{\tt S}}} + 39.75854\,{{\tt S}}-2.892532\,{\tt S}^{\frac{3}{2}} - 0.00613142\,{\tt S}^2\) | |
\({B} = -11843.79 + 6551.35253\,\sqrt{\tt S} - 1566.13883\,{\tt S}+ 116.270079 \,{{\tt S}}^{\frac{3}{2}}\) | \({\tt K\_HCO3}= \frac{[\hbox{H}^+][\hbox{CO}_3^{2-}]}{[\hbox{HCO}_3^-]}\) |
\({C} = - 33.6485 + 25.928788\,\sqrt{{{\tt S}}} - 6.171951\,{{\tt S}} + 0.45788501\,{{\tt S}}^{\frac{3}{2}}\) | \(k^{\circ}=\frac{\hbox{mol}}{\hbox{kg}-\hbox{H}_2\hbox{O}}\) |
References: Roy et al. (1993b, p. 256) (original, based on a temperature depencence restated in Millero (1979), originally given in Harned and Scholes (1941)), Millero (1995, p. 664) (here, it is mentioned that this formula should be used for \({\tt S} \leq 5\). Note that both functions do not always intersect at S = 5. The true intersection is a function of t , is calculated in AquaEnv , and is used to decide which formula to use) |
\({\tt K\_{HCO3:}} \hbox{HCO}_3^- \rightleftharpoons \hbox{H}^+ + \hbox{CO}_3^{2-}\) (“lueker”) | Total pH scale |
---|---|
\({A}^{\prime\prime} = -25.9290 + 0.01781\,{\tt S} - 0.0001122\,{\tt S}^2\) | \({\tt K\_HCO3}= \frac{[\hbox{H}^+] [\hbox{CO}_3^{2-}]} {[\hbox{HCO}_3^-]}\) |
B′′ = − 471.78 | \(k^{\circ}=\frac{\hbox{mol}}{\hbox{kg}-\hbox{solution}}\) |
C′′ = 3.16967 | |
References: Lueker et al. (2000) (original), Dickson et al. (2007, Chap. 5, p. 14) |
\({\tt K\_{HCO3:}} \hbox{HCO}_3^- \rightleftharpoons \hbox{H}^+ + \hbox{CO}_3^{2-}\) (“millero”) | SW pH scale |
---|---|
\({A}^{\prime\prime} =90.18333 - 0.1248\,{\tt S} + 0.0003687\,{\tt S}^2 - 21.0894 \,\sqrt{{\tt S}}\) | \({\tt K\_HCO3}= \frac{[\hbox{H}^+] [\hbox{CO}_3^{2-}]}{[\hbox{HCO}_3^-]}\) |
\({B}^{\prime\prime} =-5143.692 + 20.051\,{\tt S} + 772.483\,\sqrt{\tt S}\) | \(k^{\circ}=\frac{\hbox{mol}}{\hbox{kg}-\hbox{solution}}\) |
\({C}'' =-14.613358+3.3336\,\sqrt{{{\tt S}}}\) | |
References: Millero et al. (2006) (original) |
\({\tt K\_{W:}} \hbox{H}_2\hbox{O} \rightleftharpoons \hbox{H}^+ + \hbox{OH}^-\) | Total pH scale |
---|---|
\({A} = 148.9652 - 5.977\,\sqrt{{\tt S}} - 0.01615\,{\tt S}\) | \({\tt K\_W} =[\hbox{H}^+] [ \hbox{OH}^-]\) |
\({B}= - 13847.26 + 118.67\,\sqrt{{\tt S}}\) | \(k^{\circ}={\left(\frac{\rm mol}{\rm kg-solution}\right)}^2\) |
\({C}=- 23.6521+ 1.0495\,\sqrt{{\tt S}}\) | |
References: Millero (1995, p. 670) (original), DOE (1994, c. 5, p. 18) (update 1997 cites Millero (1995)), Zeebe and Wolf-Gladrow (2001, p. 258), Dickson et al. (2007, Chap. 5, p. 16) |
\({\tt K\_{BOH3:}} \hbox{B}\hbox{(OH)}_3 \rightleftharpoons\hbox{H}^+ +\hbox{ B(OH)}_4^-\) | Total pH scale |
---|---|
\({A} = 148.0248 + 137.1942\,\sqrt{{\tt S}} + 1.62142\,{\tt S}\) | \({\tt K\_BOH3}=\frac{[\hbox{H}^+] [\hbox{B(OH)}_4^-]}{[\hbox{B(OH)}_3]}\) |
\({B} =-8966.90 - 2890.53\,\sqrt{{{\tt S}}} - 77.942\,{\tt S} +1.728\,{\tt S}^{\frac{3}{2}} -0.0996\,{\tt S}^2\) | \(k^{\circ}=\frac{\hbox{mol}}{\hbox{kg}-\hbox{solution}}\) |
\({C}=-24.4344 - 25.085\,\sqrt{\tt S} - 0.2474\,{\tt S}\) | |
\({D}=0.053105\,\sqrt{{\tt S}}\) | |
References: Dickson (1990a, p. 763) (or.), DOE (1994, c. 5, p. 14), Millero (1995, p. 669), Zeebe and Wolf-Gladrow (2001, p. 262), agrees with data in Roy et al. (1993a) |
\({\tt K\_{NH4:}} \hbox{NH}_4^+ \rightleftharpoons \hbox{H}^+ +\hbox{NH}_3\) | SW pH scale |
---|---|
\({A} = -0.25444 + 0.46532\,\sqrt{{\tt S}} -0.01992\,{\tt S}\) | \({\tt K\_NH4}=\frac{[\hbox{H}^+] [ \hbox{NH}_3]}{[\hbox{NH}_4^+]}\) |
\({B} = -6285.33 - 123.7184\,\sqrt{{{\tt S}}} + 3.17556\,{{\tt S}}\) | \(k^{\circ} =\frac{\hbox{mol}}{\hbox{kg}-\hbox{solution}}\) |
D = 0.0001635 | |
References: Millero (1995, p. 671),Millero et al. (1995) (original), References: corrections of Millero (1995) in Lewis and Wallace (1998) give pH scale |
\({\tt K\_{H2S:}} \hbox{H}_2\hbox{S} \rightleftharpoons \hbox{H}^+ + \hbox{HS}^-\) | Total pH scale |
---|---|
\({A} =225.838 + 0.3449\,\sqrt{{{\tt S}}} - 0.0274\,{{\tt S}}\) | \({\tt K\_H2S}=\frac{ [\hbox{H}^+] [\hbox{HS}^-]} {[\hbox{H}_2\hbox{S}]}\) |
B = − 13275.3 | \(k^{\circ}=\frac{\hbox{mol}}{\hbox{kg}-\hbox{solution}}\) |
C = − 34.6435 | |
References: Millero (1995, p. 671), Millero et al. (1988) (original), corrections of Millero (1995) in Lewis and Wallace (1998) give pH scale |
\({\tt K\_{H3PO4:}} \hbox{H}_3\hbox{PO}_4 \rightleftharpoons \hbox{H}^+ + \hbox{H}_2\hbox{PO}_4^-\) | Total pH scale |
---|---|
\({A} = 115.525 + 0.69171\,\sqrt{{\tt S}} - 0.01844\,{\tt S}\) | \({\tt K\_H3PO4}=\frac{[\hbox{H}^+] [\hbox{H}_2\hbox{PO}_4^-]}{[\hbox{H}_3\hbox{PO}_4]}\) |
\({B} = - 4576.752 -106.736\,\sqrt{{\tt S}}- 0.65643\,{\tt S}\) | \(k^{\circ}=\frac{\hbox{mol}}{\hbox{kg}-\hbox{solution}}\) |
C = − 18.453 | |
References: DOE (1994, Chap. 5, p. 16),Millero (1995, p. 670), (original) Dickson et al. (2007, Chap. 5, p. 15) agrees with data in Dickson and Riley (1979b) |
\({\tt K\_{H2PO4:}} \hbox{H}_2\hbox{PO}_4^- \rightleftharpoons \hbox{H}^+ + \hbox{HPO}_4^{2-}\) | Total pH scale |
---|---|
\({A} =172.0883 + 1.3566\,\sqrt{{\tt S}} - 0.05778\,{{\tt S}}\) | \({\tt K\_H2PO4} =\frac{[\hbox{H}^+] [\hbox{HPO}_4^{2-}]} {[\hbox{H}_2\hbox{PO}_4^-]}\) |
\(B = - 8814.715 - 160.340\,\sqrt{{{\tt S}}} + 0.37335\,{{\tt S}}\) | \(k^{\circ}=\frac{\hbox{mol}}{\hbox{kg}-\hbox{solution}}\) |
C = −27.927 | |
References: DOE (1994, Chap. 5, p. 16), Millero (1995, p. 670) (original), Dickson et al. (2007, Chap. 5, p. 15), agrees with data in Dickson and Riley (1979b) |
\({\tt K\_{HPO4:}} \hbox{HPO}_4^{2-} \rightleftharpoons \hbox{H}^+ + \hbox{PO}_4^{3-}\) | Total pH scale |
---|---|
\({A} = - 18.141 + 2.81197\,\sqrt{{{\tt S}}} - 0.09984\,{\tt S}\) | \({\tt K\_HPO4}=\frac{[\hbox{H}^+] [PO_4^{3-}]}{[\hbox{HPO}_4^{2-}]}\) |
\({B} = - 3070.75 + 17.27039\, \sqrt{{{\tt S}}} - 44.99486\,{{\tt S}}\) | \(k^{\circ}=\frac{\hbox{mol}}{\hbox{kg}-\hbox{solution}}\) |
References: DOE (1994, Chap. 5, p. 17), Millero (1995, p. 670) (original), Dickson et al. (2007, Chap. 5, p. 15), agrees with data in Dickson and Riley (1979b) |
\({\tt K\_{SiOH4:}} \hbox{Si(OH)}_4 \rightleftharpoons \hbox{H}^+ + \hbox{SiO(OH)}_3^-\) | Total pH scale |
---|---|
\({A} = 117.385+ 3.5913 \sqrt{\frac{\tt I}{m^{\circ}}}- 1.5998\frac{\tt I}{m^{\circ}}+ 0.07871 \left(\frac{\tt I} {m^{\circ}}\right)^2\) | \({\tt K\_SiOH4}= \frac{[\hbox{H}^+] [\hbox{SiO(OH)}_3^-]}{[\hbox{Si(OH)}_4]}\) |
\({B} = -8904.2-458.79 \sqrt{\frac{\tt I} {m^{\circ}}} +188.74\frac{\tt I}{m^{\circ}} - 12.1652 \left(\frac{\tt I}{m^{\circ}}\right)^2\) | \(k^{\circ}=\frac{\hbox{mol}}{\hbox{kg}-\hbox{H}_2\hbox{O}}\) |
C = − 19.334 | \(m^{\circ}=\frac{\hbox{mol}}{\hbox{kg}-\hbox{H}_2\hbox{O}}\) |
References: Millero et al. (1988) (original), DOE (1994, Chap. 5, p. 17), References: Millero (1995, p. 671) |
\({\tt K\_{SiOOH3:}} \hbox{SiO(OH)}_3^- \rightleftharpoons \hbox{H}^+ + \hbox{SiO}_2\hbox{(OH)}_2^{2-}\) | Total pH scale |
---|---|
A = 8.96 | \({\tt K\_SiOOH3}=\frac{[\hbox{H}^+] [\hbox{SiO}_2(\hbox{OH})_2^{2-}]}{[\hbox{SiO(OH)}_3^-]}\) |
B = − 4465.18 | \(k^{\circ}=\frac{\hbox{mol}}{\hbox{kg}-\hbox{H}_2\hbox{O}}\) |
D = 0.021952 | |
References: Wischmeyer et al. (2003) (original; incl. errata by D. Wolf-Gladrow) |
1.2.8 Stoichiometric Solubility Products as Functions of Salinity S and Temperature T
The following table shows the coefficients for Eq. 35 for the stoichiometric solubility products for calcite and aragonite in AquaEnv .
Ksp_calcite : solubility product of calcite | |
---|---|
\(A' = -171.9065 - 0.77712\,\sqrt{{\tt S}} -0.07711\,S + 0.0041249\,S^{1.5}\) | \({\tt Ksp\_cal}= [\hbox{CO}_3^{2-}]\, [\hbox{Ca}^{2+}]\) |
\(B' = 2839.319 + 178.34\,\sqrt{{\tt S}}\) | |
C′ = 71.595 | \({k_0^{\circ}}=\left[\left(\frac{mol}{kg-solution}\right)^2\right]\) |
\(D' = -0.077993 + 0.0028426\,\sqrt{{\tt S}}\) | |
References: Mucci (1983) (original), Boudreau (1996, p. 160), (note that the second value for A′ is −0.77712 not −0.7712 as cited in Boudreau (1996)) |
Ksp_aragonite : solubility product of aragonite | |
---|---|
\(A' = -171.945 - 0.068393\, \sqrt{{\tt S}} - 0.10018\,S + 0.0059415\,S^{1.5}\) | \({\tt Ksp\_ara}=[\hbox{CO}_3^{2-}] \, [\hbox{Ca}^{2+}]\) |
\(B' = 2903.293 + 88.135\,\sqrt{{\tt S}}\) | |
C′ = 71.595 | \(k_0^{\circ}=\left[\left(\frac{mol}{kg-solution}\right)^2\right]\) |
\(D' = -0.077993 + 0.0017276\, \sqrt{{\tt S}}\) | |
References: Mucci (1983) (original), Boudreau (1996, p. 160), (note that the second value for D′ is 0.0017276 not 0.001727 as cited in Boudreau (1996)) |
1.2.9 Pressure Correction of Dissociation Constants and Solubility Products
Pressure has an effect on the stoichiometric acid–base dissociation constants, and the stoichiometric solubility products given in the previous sections. As described in Millero (1995, p. 675) using corrections and assumptions from Lewis and Wallace (1998, p. A-7), the effect of pressure can be accounted for by the equation
where K corr is the pressure corrected constant, and K is the uncorrected constant, both on matching units, e.g., mol/kg-soln, T is the absolute temperature in Kelvin, t is the temperature in °C, R is the ideal gas constant in (bar cm3)/(mol Kelvin), and p is the gauge pressure (total pressure minus one atm, see Feistel (2008) for a definition) in bar. The a and b coefficients (according to Millero (1995) which is partly a restatement of Millero (1979), corrected by Lewis and Wallace (1998)) for constants in AquaEnv (stored in the data frame DeltaPcoeffs ) are given in the following tableFootnote 5.
| a 0 | a 1 | a 2 | b 0 | b 1 | b 2 |
---|---|---|---|---|---|---|
\({\tt K\_HSO4}\) | −18.03 | 0.0466 | 0.3160 × 10−3 | −4.53 | 0.0900 | 0 |
\({\tt K\_HF}\) | −9.78 | −0.0090 | −0.9420 × 10−3 | −3.91 | 0.0540 | 0 |
\({\tt K\_CO2}\) | −25.50 | 0.1271 | 0.0000 × 10−3 | −3.08 | 0.0877 | 0 |
\({\tt K\_HCO3}\) | −15.82 | −0.0219 | 0.0000 × 10−3 | 1.13 | −0.1475 | 0 |
\({\tt K\_W}\) | −25.60 | 0.2324 | −3.6246 × 10−3 | −5.13 | 0.0794 | 0 |
\({\tt K\_BOH3}\) | −29.48 | 0.1622 | 2.6080 × 10−3 | −2.84 | 0.0000 | 0 |
\({\tt K\_NH4}\) | −26.43 | 0.0889 | −0.9050 × 10−3 | −5.03 | 0.0814 | 0 |
\({\tt K\_H2S}\) | −14.80 | 0.0020 | −0.4000 × 10−3 | 2.89 | 0.0540 | 0 |
\({\tt K\_H3PO4}\) | −14.51 | 0.1211 | −0.3210 × 10−3 | −2.67 | 0.0427 | 0 |
\({\tt K\_H2PO4}\) | −23.12 | 0.1758 | −2.6470 × 10−3 | −5.15 | 0.0900 | 0 |
\({\tt K\_HPO4}\) | −26.57 | 0.2020 | −3.0420 × 10−3 | −4.08 | 0.0714 | 0 |
\({\tt K\_SiOH4}\) | −29.48 | 0.1622 | 2.6080 × 10−3 | −2.84 | 0.0000 | 0 |
\({\tt K\_SiOOH3}\) | −29.48 | 0.1622 | 2.6080 × 10−3 | −2.84 | 0.0000 | 0 |
Ksp_calcite | −48.76 | 0.5304 | 0.0000 × 10−3 | −11.76 | 0.3692 | 0 |
Ksp_aragonite | −45.96 | 0.5304 | 0.0000 × 10−3 | −11.76 | 0.3692 | 0 |
Note that, while not stated in Millero (1995), it can be inferred from Lewis and Wallace (1998) and the code given by van Heuven et al. (2009) that the pressure correction is valid for \({\tt K\_HF}\) and \({\tt H\_H2SO4}\) on the free scale and for all other dissociation constants on the seawater pH scale. To be consistent with Lewis and Wallace (1998) and van Heuven et al. (2009), in AquaEnv , all dissociation constants obtained from the original formulae are first converted to the free or seawater scale, respectively, using scale conversion factors with \({\tt K\_HF}\) and \({\tt H\_H2SO4}\) being not pressure corrected. Then, the pressure correction is applied. Subsequently, the dissociation constants are converted to the desired pH scale with scale conversion factors with \({\tt K\_HF}\) and \({\tt H\_H2SO4}\) being pressure corrected.
1.2.10 Conversion Factors
The following list gives the basic concentration and pH scale conversion factors used in AquaEnv . All other conversion factors in the function convert are calculated from the factors given here. Note that the factors given below are multiplicative factors that can be used to convert dissociation constants or proton concentration values. To convert pH values, one needs to use the negative decadal logarithm of the factors below as an additive term. molal2molin denotes conversion from mol/kg-H2O to mol/kg-soln, free2tot denotes conversion from the free to the total pH scale, free2sws denotes conversion from the free to the seawater pH scale (for a general treatment of the free, total and seawater pH scale see Dickson (1984) and Zeebe and Wolf-Gladrow (2001)), and free2nbs denotes conversion from the free to the NBS pH scale (Durst 1975).
molal2molin | (1 − 0.001005 S) | |
free2tot | \((1 + \frac{S_T}{\tt K\_HSO4})\) | Dickson (1984, p. 2302), DOE (1994, Chap. 5, p. 16), Zeebe and Wolf-Gladrow (2001, p. 57, p. 261) |
free2sws | \((1 + \frac{S_T}{{{\tt K\_HSO4}}}+ \frac{F_T}{{\tt K\_HF}})\) | |
free2nbs | γ +H / molal2molin | Dickson (1984), Lewis and Wallace (1998), Zeebe and Wolf-Gladrow (2001) |
In the previous table, S is salinity, \({S}_{T}=[\hbox{SO}_4^{2-}]+[\hbox{HSO}_4^-] \approx[\hbox{SO}_4^{2-}]\), \({F}_{T}= [\hbox{HF}]+ [\hbox{F}^-] \approx [\hbox{F}^-]\), both in mol/kg-soln, and γ +H is the activity coefficient for the proton. The dissociation constants \({\tt K\_HSO4}\) and \({\tt K\_HF}\) are on the free pH scale and in mol/kg-soln as well. Note that, as given in Dickson (1984, p. 2303) and Dickson and Riley (1979a, p. 91f), all concentrations appearing in the definition for the total and the seawater pH scale are molal, i.e. mol/kg-H2O, concentrations. But in Roy et al. (1993b, p. 257) and in DOE (1994, Chap. 4, SOP 6, p. 1), it is stated that concentrations for the seawater and total pH scale are molin, i.e., mol/kg-soln. To be consistent with DOE (1994) and Dickson et al. (2007), mol/kg-soln is chosen here for the free, total, and seawater scale. To be consistent with Lewis and Wallace (1998), the NBS scale in AquaEnv is based on the proton concentration in mol/kg-H2O.
1.2.11 Activity Coefficient for the Proton
In AquaEnv , a complex ion-interaction model like, e.g., Millero and Pierrot (1998), is not implemented. According to Zeebe and Wolf-Gladrow (2001), the activity coefficient for the proton γ +H can be approximated by the Davies equation as long as the ionic strength of the solution in question remains below 0.5 mol/kg-H2O. This means for solutions with a salinity of less than 24.48. Since NBS scale pH values are normally not used for open ocean applications but mainly in brackish and fresh waters, the Davies equation has been assumed to be a sufficient approximation for γ +H . Important to note, however, is that the conversion from and to the NBS pH scale in AquaEnv for salinities above 24.48 is only an approximation. The Davies equation is used as given in Zeebe and Wolf-Gladrow (2001)
where e is the relative dielectric constant of seawater ( PhysChemConst$e in AquaEnv ), T is the temperature in Kelvin, and I is the ionic strength in mol/kg-H2O. Note that the squared charge of the ion before the brackets with the ionic strength terms which is present in the generic form of the Davies equation has been omitted here since for the proton, this factor is 1.
1.2.12 The Revelle Factor
In Zeebe and Wolf-Gladrow (2001, p. 73), the revelle factor is given as
The subscript “[TA] = const.” indicates that this expression is not based on a function of the form
which would have analytical expressions for the partial derivatives \(\frac{\partial [\hbox{CO}_2]}{\partial\left[\sum \hbox{CO}_2\right]}_{\left[\hbox{H}^+\right]=const}\) and \(\frac{\partial \left[\hbox{CO}_2\right]}{\partial\left[\hbox{H}^+\right]}_{\left[\sum \hbox{CO}_2\right]=const}\) (note that the subscripts indicating which variable is held constant can be omitted since an exhaustive list of variables is given), but on a function of the form
which does not have an analytical form (since it involves the solution of a non linear system of equations to calculate \(\left[\hbox{H}^+\right]\) and thus \(\left[\hbox{CO}_2\right]\)), and therefore, there is also no analytical expression for \(\frac{\partial [\hbox{CO}_2]}{\partial\left[\sum \hbox{CO}_2\right]}_{[\rm TA]={\rm const}}\).
For this reason, in AquaEnv , the Revelle factor (aquaenv object component revelle ) is calculated numerically by slightly disturbing \(\left[\sum \hbox{CO}_2\right]\) and calculating [CO2] for the disturbed and the undisturbed case.
1.2.13 Partial Derivatives of Total Alkalinity
The values for dTAdKdKdS , dTAdKdKdT , dTAdKdKdd , dTAdKdKdSumH2SO4 , and dTAdKdKdSumHF are calculated numerically as described in Hofmann et al. (2009a).
The values for dTAdH , dTAdSumCO2 , dTAdSumBOH3 , dTAdSumH2SO4 , and dTAdSumHF are calculated analytically as given in Hofmann et al. (2008).
Rights and permissions
Open Access This is an open access article distributed under the terms of the Creative Commons Attribution Noncommercial License (https://creativecommons.org/licenses/by-nc/2.0), which permits any noncommercial use, distribution, and reproduction in any medium, provided the original author(s) and source are credited.
About this article
Cite this article
Hofmann, A.F., Soetaert, K., Middelburg, J.J. et al. AquaEnv : An Aqua tic Acid–Base Modelling Env ironment in R . Aquat Geochem 16, 507–546 (2010). https://doi.org/10.1007/s10498-009-9084-1
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10498-009-9084-1