Package 'seacarb'

Title: Seawater Carbonate Chemistry
Description: Calculates parameters of the seawater carbonate system and assists the design of ocean acidification perturbation experiments.
Authors: Jean-Pierre Gattuso [aut, cre, cph], Jean-Marie Epitalon [aut], Heloise Lavigne [aut], James Orr [aut], Bernard Gentili [ctb], Mathilde Hagens [ctb], Andreas Hofmann [ctb], Jens-Daniel Mueller [ctb], Aurélien Proye [ctb], James Rae [ctb], Karline Soetaert [ctb]
Maintainer: Jean-Pierre Gattuso <[email protected]>
License: GPL (>= 2)
Version: 3.3.3
Built: 2024-11-23 05:03:18 UTC
Source: https://github.com/jpgattuso/seacarb-git

Help Index


Example data file for function at

Description

The variables are:

  • volume: Volume of acid added to the sample in ml

  • E: Potential measured during the titration in mV

  • temperature: Temperature in degrees Celsius

  • weight: Weight of the sample in g

  • S: Salinity

  • normality : Normality of the acid

  • ETris: Potential used for the calibration of the electrode in mV

  • pHTris: pH used for the calibration of the electrode with the TRIS buffer

Usage

alkalinity

Format

A data frame with 29 rows and 8 variables

Source

Data come from a potentiometric titration performed by Steeve Comeau.


pH value of the AMP buffer

Description

pH value of the AMP buffer (on the total scale in mol/kg)

Usage

amp(S=35,T=25)

Arguments

S

Salinity, default is 35

T

Temperature in degrees Celsius, default is 25oC

Details

Note that the arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It can therefore be critical to use vectors of the same length.

Value

AMP

pH value of the AMP buffer (on the total scale in mol/kg)

Author(s)

Jean-Pierre Gattuso [email protected]

References

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

See Also

tris, pHslope, pH.

Examples

##Example from Dickson et al. (2007)
	amp(S=35,T=25)

Bjerrum plot

Description

Plot the concentration of the various ionic forms of a molecule as a function of pH

Usage

bjerrum(K1=K1(), K2=NULL, K3=NULL, phmin=2, phmax=12, by=0.1, conc=1, 
     type="l", col="black",  ylab="Relative concentration (%)", add=FALSE, ...)

Arguments

K1

First dissociation constant

K2

Second dissociation constant, default is NULL

K3

Third dissociation constant, default is NULL

phmin

Minimum pH value, default is 2

phmax

Maximum pH value, default is 12

by

Increment on the pH axis, default is 0.1

conc

concentration of molecule, default is 1

type

Type of plot, default is line

col

Color of plot, default is black

ylab

Label of Y axis, default is (mol/kg)

add

false:start new, true: add to current, default is false

...

Graphical parameters (see par) and any further arguments of plot, typically plot.default, may also be supplied as arguments to this function. Hence, the high-level graphics control arguments described under par and the arguments to title may be supplied to this function.

Details

Note that the concentration is plotted in mol/kg only if conc is given is mol/kg

Author(s)

Karline Soetaert [email protected]

References

Zeebe, R. E. and Wolf-Gladrow D. A., 2001 CO2 in seawater: equilibrium, kinetics, isotopes. Amsterdam: Elsevier, 346 pp.

See Also

matplot, par, speciation.

Examples

## Plot the bjerrum plot for the carbonate system using the default values
bjerrum(K1(),K2(),main="DIC speciation",lwd=2) 
abline(v=-log10(K1()),col="grey")
mtext(side=3,at=-log10(K1()),"pK1")
abline(v=-log10(K2()),col="grey")
mtext(side=3,at=-log10(K2()),"pK2")
legend("left",lty=1:3,lwd=2,legend=c(expression(CO[2]),expression(HCO[3]^"-"),
	expression(CO[3]^"2-")))

## Plot the bjerrum plot for phosphate using the default values
bjerrum(K1p(),K2p(),K3p(),main="phosphate speciation",lwd=2)
legend("left",lty=1:4,lwd=2,legend=c(expression(H[3]~PO[4]),
	expression(H[2]~PO[4]^"-"),
expression(HPO[4]^"2-"),expression(PO[4]^"3-")))

## Plot the bjerrum plot for the carbonate system using the values other 
##	than the default ones, showing the effect of temperature
bjerrum(K1(T=25,S=35),K2(T=25,S=35),conc=1.3,main="effect of temperature" )
bjerrum(K1(T=0,S=35),K2(T=0,S=35),conc=1.3,add=TRUE,col="red")
legend("left",lty=1,col=c("black","red"),legend=c("T=25 oC","T=0 oC"))
legend("right",lty=1:3,legend=c(expression(CO[2]),expression(HCO[3]^"-"),
	expression(CO[3]^"2-")))

## Plot the bjerrum plot for the carbonate system using the values other 
##	than the default ones, showing the effect of salinity
bjerrum(K1(T=25,S=35),K2(T=25,S=35),conc=1.3,main="effect of salinity" )
bjerrum(K1(T=25,S=5),K2(T=25,S=5),conc=1.3,add=TRUE,col="blue")
legend("left",lty=1,col=c("black","blue"),legend=c("S=35","S=5"))
legend("right",lty=1:3,legend=c(expression(CO[2]),expression(HCO[3]^"-"),
	expression(CO[3]^"2-")))

## Plot the bjerrum plot for the carbonate system using the values other 
##	than the default ones, showing the effect of pressure
bjerrum(K1(P=0),K2(P=0),conc=1.3,main="effect of pressure" )
bjerrum(K1(P=300),K2(P=300),conc=1.3,add=TRUE,col="green")
legend("left",lty=1,col=c("black","green"),legend=c("P=0","P=300"),title="atm")
legend("right",lty=1:3,legend=c(expression(CO[2]),expression(HCO[3]^"-"),
	expression(CO[3]^"2-")))

Total boron concentration (mol/kg)

Description

total boron concentration (mol kg1mol\ kg^{-1})

Usage

bor(S, b)

Arguments

S

Salinity, default is 35

b

"l10" for using the formulation of Lee et al. (2010), "u74" for using the Uppstrom (1974), or "k18" for using the Kulinski et al. (2018), default is "u74"

Details

Note that the formulation of Kulinski et al. (2018) is specifically designed for the Baltic Sea. Three formulations are described in their paper:

  • based on their measurements: TB = [umol/kg] = 10.838 * S + 13.821

  • based on Kremling (1970 and 1972): TB [umol/kg] = 11.44 * S + 12.6; R2 = 0.95

  • consensus regression (Kremling + their data): TB [umol/kg] = 11.405 * S + 11.869; R2 = 0.97s

The latter formulation is used here.

Value

bor

total boron concentration (mol kg1mol\ kg^{-1}))

Author(s)

Heloise Lavigne, Aurelien Proye and Jean-Pierre Gattuso [email protected]

References

DOE 1994 Handbook of methods for the analysis of the various parameters of the carbon dioxide system in sea water. ORNL/CDIAC-74. Oak Ridge,Tenn.: Carbon Dioxide Information Analysis Center, Oak Ridge National Laboratory.

Kulinski K., Szymczycha B., Koziorowska K., Hammer K. & Schneider B., 2018. Anomaly of total boron concentration in the brackish waters of the Baltic Sea and its consequence for the CO2 system calculations. Marine Chemistry. doi:s10.1016/j.marchem.2018.05.007.

Lee K., Tae-Wook K., Byrne R.H., Millero F.J., Feely R.A. and Liu Y-M, 2010 The universal ratio of the boron to chlorinity for the North Pacific and North Atlantic oceans. Geochimica et Cosmochimica Acta 74 1801-1811.

Uppstrom L.R., 1974 The boron/chlorinity ratio of the deep-sea water from the Pacific Ocean. Deep-Sea Research I 21 161-162.

Examples

bor(35, "l10")

Buffer parameters of the seawater carbonate system

Description

Returns buffer parameters of the seawater carbonate system.

Usage

buffer(flag, var1, var2, S = 35, T = 25, Patm = 1, P = 0, Pt = 0, Sit = 0, 
  k1k2 = "x", kf = "x", ks = "d", pHscale = "T", b = "u74", warn = "y", 
  eos = "eos80", long = 1e+20, lat = 1e+20)

Arguments

flag

select the couple of variables available. The flags which can be used are:

flag = 1 pH and CO2 given

flag = 2 CO2 and HCO3 given

flag = 3 CO2 and CO3 given

flag = 4 CO2 and ALK given

flag = 5 CO2 and DIC given

flag = 6 pH and HCO3 given

flag = 7 pH and CO3 given

flag = 8 pH and ALK given

flag = 9 pH and DIC given

flag = 10 HCO3 and CO3 given

flag = 11 HCO3 and ALK given

flag = 12 HCO3 and DIC given

flag = 13 CO3 and ALK given

flag = 14 CO3 and DIC given

flag = 15 ALK and DIC given

flag = 21 pCO2 and pH given

flag = 22 pCO2 and HCO3 given

flag = 23 pCO2 and CO3 given

flag = 24 pCO2 and ALK given

flag = 25 pCO2 and DIC given

var1

enter value of the first variable in mol/kg, except for pH and for pCO2 in μ\muatm

var2

enter value of the second variable in mol/kg, except for pH

S

Salinity

T

Temperature in degrees Celsius

Patm

Surface atmospheric pressure in atm

P

Hydrostatic pressure in bar (surface = 0)

Pt

Concentration of total phosphate in mol/kg; set to 0 if NA

Sit

Concentration of total silicate in mol/kg; set to 0 if NA

k1k2

"cw" for using K1 and K2 from Cai & Wang (1998), "l" from Lueker et al. (2000), "m02" from Millero et al. (2002), "m06" from Millero et al. (2006), "m10" from Millero (2010), "mp2" from Mojica Prieto et al. (2002), "p18" from Papadimitriou et al. (2018), "r" from Roy et al. (1993), "sb21" from Shockman & Byrne (2021), "s20" from Sulpis et al. (2020), and "w14" from Waters et al. (2014). "x" is the default flag; the default value is then "l", except if T is outside the range 2 to 35oC and/or S is outside the range 19 to 43. In these cases, the default value is "w14".

kf

"pf" for using Kf from Perez and Fraga (1987) and "dg" for using Kf from Dickson and Riley (1979 in Dickson and Goyet, 1994). "x" is the default flag; the default value is then "pf", except if T is outside the range 9 to 33oC and/or S is outside the range 10 to 40. In these cases, the default is "dg".

ks

"d" for using Ks from Dickon (1990), "k" for using Ks from Khoo et al. (1977), default is "d"

pHscale

choice of pH scale: "T" for the total scale, "F" for the free scale and "SWS" for using the seawater scale, default is "T" (total scale)

b

Concentration of total boron. "l10" for the Lee et al. (2010) formulation or "u74" for the Uppstrom (1974) formulation, default is "u74"

warn

"y" to show warnings when T or S go beyond the valid range for constants; "n" to supress warnings. The default is "y".

eos

"teos10" to specify T and S according to Thermodynamic Equation Of Seawater - 2010 (TEOS-10); "eos80" to specify T and S according to EOS-80.

long

longitude of data point, used when eos parameter is "teos10" as a conversion parameter from absolute to practical salinity.

lat

latitude of data point, used when eos parameter is "teos10".

Details

The Lueker et al. (2000) constants for K1 and K2, the Perez and Fraga (1987) constant for Kf and the Dickson (1990) constant for Ks are recommended by Dickson et al. (2007). It is, however, critical to consider that each formulation is only valid for specific ranges of temperature and salinity:

For K1 and K2:

  • Cai and Wang (1998): S ranging between 0 and 40 and T ranging between 0.2 and 30oC.

  • Lueker et al. (2000): S ranging between 19 and 43 and T ranging between 2 and 35oC.

  • Millero et al. (2002): S ranging from 34 to 37 and T ranging between -1.6 and 35oC.

  • Millero et al. (2006): S ranging between 0.1 and 50 and T ranging between 1 and 50oC.

  • Millero (2010): S ranging between 1 and 50 and T ranging between 0 and 50oC. Millero (2010) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

  • Mojica Prieto et al. (2002): S ranging from 5 to 42 and T ranging between 0 and 45oC.

  • Papadimitriou et al. (2018): S ranging from 33 to 100 and T ranging between -6 to 25oC.

  • Roy et al. (1993): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Shockman & Byrne (2021): for K2, S ranging from 19.6 to 41 and T ranging between 15 to 35oC. For K1, formulation is that of Waters et al.

  • Sulpis et al. (2020): S ranging from 30.7 to 37.6 and T ranging between -1.7 to 31.8oC.

  • Waters et al.(2014): S ranging between 1 and 50 and T ranging between 0 and 50oC. Waters (2014) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

For Kf:

  • Perez and Fraga (1987): S ranging between 10 and 40 and T ranging between 9 and 33oC.

  • Dickson and Riley (1979 in Dickson and Goyet, 1994): S ranging between 0 and 45 and T ranging between 0 and 45oC.

For Ks:

  • Dickson (1990): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Khoo et al. (1977): S ranging between 20 and 45 and T ranging between 5 and 40oC.

The arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It is recommended to use either vectors with the same dimension or one vector for one argument and numbers for the other arguments.

Pressure corrections and pH scale:

  • For K0, the pressure correction term of Weiss (1974) is used.

  • For K1, K2, pK1, pK2, pK3, Kw, Kb, Khs and Ksi, the pressure correction was applied on the seawater scale. Hence, if needed, values were first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kf, the pressure correction was applied on the free scale. The formulation of Dickson and Riley (1979 in Dickson and Goyet, 1994) provides Kf on the free scale but that of Perez and Fraga (1987) provides it on the total scale. Hence, in that case, Kf was first transformed from the total scale to the free scale. With both formulations, the pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Ks, the pressure correction was applied on the free scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kn, The pressure correction was applied on the seawater scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

long and lat are used as conversion parameters from absolute to practical salinity: when seawater is not of standard composition, practical salinity alone is not sufficient to compute absolute salinity and vice-versa. One needs to know the density. When long and lat are given, density is inferred from WOA silicate concentration at given location. When they are not, an arbitrary geographic point is chosen: mid equatorial Atlantic. Note that this implies an error on computed salinity up to 0.02 g/kg.

Value

The function returns a data frame containing the following columns:

PhiD

PhiD, chemical buffer factor (dpH/d[DIC]); input/output of dissolved CO2 (unit pH per mol/kg)

BetaD

BetaD, homogeneous or Revelle buffer factor (dln(pCO2)/dln[DIC]); input/output of dissolved CO2

PiD

PiD, chemical buffer factor (dpCO2/d[DIC]); input/output of dissolved CO2 (μatm\mu atm per mol/kg)

PhiB

PhiB, chemical buffer factor (dpH/d[DIC]); from input/output of bicarbonate (unit pH per mol/kg)

BetaB

BetaB, homogeneous buffer factor (dln(pCO2)/dln[DIC]); input/output of bicarbonate

PiB

PiB, chemical buffer factor (dpCO2/d[DIC]); input/output of dissolved CO2 (μatm\mu atm per mol/kg)

PhiC

PhiC, chemical buffer factor (dpH/d[DIC]); input/output of carbonate (unit pH per mol/kg)

BetaC

BetaC, homogeneous buffer factor (dln(pCO2)/dln[DIC]); input/output of carbonate

PiC

PiC, chemical buffer factor (dpCO2/d[DIC]); input/output of carbonate (μatm\mu atm per mol/kg)

PhiH

PhiH, chemical buffer factor (dpH/d[ALK]); input/output of strong acid (unit pH per mol/kg)

PiH

PiH, chemical buffer factor (dpCO2/d[ALK]); input/output of strong acid (μatm\mu atm per mol/kg)

Author(s)

Heloise Lavigne, Aurelien Proye and Jean-Pierre Gattuso [email protected]

References

Cai W. J., and Wang Y., 1998. The chemistry, fluxes, and sources of carbon dioxide in the estuarine waters of the Satilla and Altamaha Rivers, Georgia. Limnology and Oceanography 43, 657-668.

Dickson A. G., 1990 Standard potential of the reaction: AgCI(s) + 1/2H2(g) = Ag(s) + HCI(aq), and the standard acidity constant of the ion HSO4 in synthetic sea water from 273.15 to 318.15 K. Journal of Chemical Thermodynamics 22, 113-127.

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Khoo H. K., Ramette R. W., Culberson C. H. and Bates R. G., 1977 Determination of Hydrogen Ion Concentration in Seawater from 5 to 40oC: Standard Potentials at Salinities from 20 to 45. Analytical Chemistry 49, 29-34.

Frankignoulle M., 1994 A complete set of buffer factors for acid/base CO2 system in seawater. Journal of Marine Systems 5, 111-118.

Lee K., Tae-Wook K., Byrne R.H., Millero F.J., Feely R.A. and Liu Y-M, 2010 The universal ratio of the boron to chlorinity for the North Pacific and North Atlantoc oceans. Geochimica et Cosmochimica Acta 74 1801-1811.

Lueker T. J., Dickson A. G. and Keeling C. D., 2000 Ocean pCO2 calculated from dissolved inorganic carbon, alkalinity, and equations for K1 and K2: validation based on laboratory measurements of CO2 in gas and seawater at equilibrium. Marine Chemistry 70 105-119.

Millero F. J., 2010 Carbonate constant for estuarine waters. Marine and Freshwater Research 61: 139-142.

Millero F. J., Graham T. B., Huang F., Bustos-Serrano H. and Pierrot D., 2006 Dissociation constants of carbonic acid in seawateras a function of salinity and temperature. Marine Chemistry 100, 80-84.

Perez F. F. and Fraga F., 1987 Association constant of fluoride and hydrogen ions in seawater. Marine Chemistry 21, 161-168.

Roy R. N., Roy L. N., Vogel K. M., Porter-Moore C., Pearson T., Good C. E., Millero F. J. and Campbell D. M., 1993. The dissociation constants of carbonic acid in seawater at salinities 5 to 45 and temperatures 0 to 45oC. Marine Chemistry 44, 249-267.

Schockman, K.M., Byrne, R.H., 2021. Spectrophotometric determination of the bicarbonate dissociation constant in seawater, Geochimica et Cosmochimica Acta.

Uppstrom L.R., 1974 The boron/chlorinity ratio of the deep-sea water from the Pacific Ocean. Deep-Sea Research I 21 161-162.

Examples

## Computation with a couple of variables
buffer(flag=8, var1=8.2, var2=0.00234, S=35, T=25, Patm=1, P=0, Pt=0, 
	Sit=0, pHscale="T", kf="pf", k1k2="l", b="u74")

## Using vectors as arguments
flag <- c(8, 2, 8)
var1 <- c(8.2, 7.477544e-06, 8.2)
var2 <- c(0.002343955, 0.001649802, 2400e-6)
S <- c(35, 35, 30)
T <- c(25, 25, 30)
P <- c(0, 0, 0)
Pt <- c(0, 0, 0)
Sit <- c(0, 0, 0)
kf <- c("pf", "pf", "pf")
k1k2 <- c("l", "l", "l")
pHscale <- c("T", "T", "T")
b <- c("l10", "l10", "l10")
buffer(flag=flag, var1=var1, var2=var2, S=S, T=T, P=P, Pt=Pt, 
	Sit=Sit, kf=kf, k1k2=k1k2, pHscale=pHscale, b=b)


## Test for all flags 

flag <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 21, 22, 23, 24, 25)

var1 <- c(8.200000, 7.477544e-06, 7.477544e-06, 7.477544e-06, 7.477544e-06, 8.2, 
	8.2, 8.2, 8.2, 0.001685024, 0.001685024, 0.001685024,  0.0002888382, 
	0.0002888382, 0.002391252, 264.2008, 264.2008, 264.2008, 264.2008, 264.2008)

var2 <- c(7.477544e-06, 0.001685024, 0.0002888382, 0.002391252, 0.001981340, 
	0.001685024, 0.0002888382, 0.002391252, 0.001981340, 0.0002888382, 0.002391252,
	0.001981340,  0.002391252, 0.001981340, 0.001981340, 8.2, 0.001685024, 
	0.0002888382, 0.002391252, 0.001981340)

buffer(flag=flag, var1=var1, var2=var2)

Buffer factors of the seawater carbonate system as defined by Hagens and Middelburg (2016)

Description

Returns the suite of buffer factors presented in Table 3 of Hagens and Middelburg (2016), as well as the proton concentration buffer factor (beta.H of Hofmann et al, 2010) and the classic Revelle factor. For practical purposes, this function excludes the nitrate and nitrite acid-base systems presented in this paper, as well as the fully protonoted form of sulfate (H2SO4) and fully deprotonated form of sulfide (S2-), as their contributions to total alkalinity under natural seawater conditions are negligible. Its input arguments are identical to those in the carbfull function of seacarb.

Usage

buffergen(flag, var1, var2, S=35, T=25, Patm=1, P=0, Pt=0, Sit=0, k1k2="x", kf="x",
                 ks="d", pHscale="T", b="u74", gas="potential", NH4t=0, HSt=0)

Arguments

flag

select the couple of variables available. The flags which can be used are:

flag = 1 pH and CO2 given

flag = 2 CO2 and HCO3 given

flag = 3 CO2 and CO3 given

flag = 4 CO2 and ALK given

flag = 5 CO2 and DIC given

flag = 6 pH and HCO3 given

flag = 7 pH and CO3 given

flag = 8 pH and ALK given

flag = 9 pH and DIC given

flag = 10 HCO3 and CO3 given

flag = 11 HCO3 and ALK given

flag = 12 HCO3 and DIC given

flag = 13 CO3 and ALK given

flag = 14 CO3 and DIC given

flag = 15 ALK and DIC given

flag = 21 pCO2 and pH given

flag = 22 pCO2 and HCO3 given

flag = 23 pCO2 and CO3 given

flag = 24 pCO2 and ALK given

flag = 25 pCO2 and DIC given

var1

Value of the first variable in mol/kg, except for pH and for pCO2 in μ\muatm

var2

Value of the second variable in mol/kg, except for pH

S

Salinity

T

Temperature in degrees Celsius

Patm

Surface atmospheric pressure in atm, default is 1 atm

P

Hydrostatic pressure in bar (surface = 0)

Pt

Concentration of total phosphate in mol/kg; set to 0 if NA

Sit

Concentration of total silicate in mol/kg; set to 0 if NA

k1k2

"cw" for using K1 and K2 from Cai & Wang (1998), "l" from Lueker et al. (2000), "m02" from Millero et al. (2002), "m06" from Millero et al. (2006), "m10" from Millero (2010), "mp2" from Mojica Prieto et al. (2002), "p18" from Papadimitriou et al. (2018), "r" from Roy et al. (1993), "sb21" from Shockman & Byrne (2021), "s20" from Sulpis et al. (2020), and "w14" from Waters et al. (2014). "x" is the default flag; the default value is then "l", except if T is outside the range 2 to 35oC and/or S is outside the range 19 to 43. In these cases, the default value is "w14".

kf

"pf" for using Kf from Perez and Fraga (1987) and "dg" for using Kf from Dickson and Riley (1979 in Dickson and Goyet, 1994). "x" is the default flag; the default value is then "pf", except if T is outside the range 9 to 33oC and/or S is outside the range 10 to 40. In these cases, the default is "dg".

ks

"d" for using Ks from Dickson (1990) and "k" for using Ks from Khoo et al. (1977), default is "d"

pHscale

"T" for the total scale, "F" for the free scale and "SWS" for using the seawater scale, default is "T" (total scale)

b

Concentration of total boron. "l10" for the Lee et al. (2010) formulation or "u74" for the Uppstrom (1974) formulation, default is "u74"

gas

used to indicate the convention for INPUT pCO2, i.e., when it is an input variable (flags 21 to 25): "insitu" indicates it is referenced to in situ pressure and in situ temperature; "potential" indicates it is referenced to 1 atm pressure and potential temperature; and "standard" indicates it is referenced to 1 atm pressure and in situ temperature. All three options should give identical results at surface pressure. This option is not used when pCO2 is not an input variable (flags 1 to 15). The default is "potential" and should be a unique value..

NH4t

Concentration of total ammonium in mol/kg; set to 0 if NA

HSt

Concentration of total hydrogen sulfide in mol/kg; set to 0 if NA

Details

The Lueker et al. (2000) constants for K1 and K2, the Perez and Fraga (1987) constant for Kf and the Dickson (1990) constant for Ks are recommended by Dickson et al. (2007). It is, however, critical to consider that each formulation is only valid for specific ranges of temperature and salinity:

For K1 and K2:

  • Cai and Wang (1998): S ranging between 0 and 40 and T ranging between 0.2 and 30oC.

  • Lueker et al. (2000): S ranging between 19 and 43 and T ranging between 2 and 35oC.

  • Millero et al. (2002): S ranging from 34 to 37 and T ranging between -1.6 and 35oC.

  • Millero et al. (2006): S ranging between 0.1 and 50 and T ranging between 1 and 50oC.

  • Millero (2010): S ranging between 1 and 50 and T ranging between 0 and 50oC. Millero (2010) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

  • Mojica Prieto et al. (2002): S ranging from 5 to 42 and T ranging between 0 and 45oC.

  • Papadimitriou et al. (2018): S ranging from 33 to 100 and T ranging between -6 to 25oC.

  • Roy et al. (1993): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Shockman & Byrne (2021): for K2, S ranging from 19.6 to 41 and T ranging between 15 to 35oC. For K1, formulation is that of Waters et al.

  • Sulpis et al. (2020): S ranging from 30.7 to 37.6 and T ranging between -1.7 to 31.8oC.

  • Waters et al.(2014): S ranging between 1 and 50 and T ranging between 0 and 50oC. Waters (2014) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

For Kf:

  • Perez and Fraga (1987): S ranging between 10 and 40 and T ranging between 9 and 33oC.

  • Dickson and Riley (1979 in Dickson and Goyet, 1994): S ranging between 0 and 45 and T ranging between 0 and 45oC.

For Ks:

  • Dickson (1990): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Khoo et al. (1977): S ranging between 20 and 45 and T ranging between 5 and 40oC.

The arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It is recommended to use either vectors with the same dimension or one vector for one argument and numbers for the other arguments.

Pressure corrections and pH scale:

  • For K0, the pressure correction term of Weiss (1974) is used.

  • For K1, K2, pK1, pK2, pK3, Kw, Kb, Khs, Ksi and K2si, the pressure correction was applied on the seawater scale. Hence, if needed, values were first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kf, the pressure correction was applied on the free scale. The formulation of Dickson and Riley (1979 in Dickson and Goyet, 1994) provides Kf on the free scale but that of Perez and Fraga (1987) provides it on the total scale. Hence, in that case, Kf was first transformed from the total scale to the free scale. With both formulations, the pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Ks, the pressure correction was applied on the free scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kn, the pressure correction was applied on the seawater scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

Value

The function returns a list containing the following matrices:

Carbfull

Output of the carbfull function that is used within buffergen

dALK.dH

Sensitivity of ALK to a change in proton concentration (dimensionless). Species-specific.

dtotX.dH

Sensitivity of an acid-base species to a change in proton concentration (dimensionless). Species-specific.

dALK.dX

Sensitivity of ALK to a change in an acid-base species (dimensionless). Species-specific.

dtotX.dX

Sensitivity of an acid-base species to a change in its total concentration (dimensionless). Species-specific.

dALK.dpH

Sensitivity of ALK to a change in pH (mol/kg-soln). Species-specific.

dtotX.dpH

Sensitivity of an acid-species to a change in pH (mol/kg-soln). Species-specific.

dH.dALK

Sensitivity of proton concentration to a change in ALK (dimensionless). Values are the same for all species and all acid-base systems, except for the fluoride and sulfate acid-base systems, which slightly deviate due to pH scale conversion effects.

dH.dtotX

Sensitivity of an acid-species to a change in its total concentration (dimensionless). Values are the same for all species of a specific acid-base system.

dX.dALK

Sensitivity of an acid-species to a change in its total concentration (dimensionless). Species-specific.

dX.dtotX

Sensitivity of an acid-species to a change in its total concentration (dimensionless). Species-specific.

dpH.dALK

Sensitivity of pH due to a change in ALK ((mol/kg-soln)-1). Values are the same for all species and all acid-base systems, except for the fluoride and sulfate acid-base systems, which slightly deviate due to pH scale conversion effects.

dpH.dtotX

Sensitivity of pH due to a change in the total concentration of an acid-base system ((mol/kg-soln)-1). Values are the same for all species of a specific acid-base system.

beta.H

proton concentration buffer factor (Eq.4 of Hagens and Middelburg (2016), dimensionless)

RF

Revelle factor (dimensionless)

If the total concentration of an acid-base system is 0, the values of the buffer factors corresponding to all species of that acid-base system return NA.

Author(s)

Mathilde Hagens [email protected]

References

Hagens M. and Middelburg J. J., 2016 Generalised expressions for the response of pH to changes in ocean chemistry. Geochimica et Cosmochimica Acta 187 334-349.

Examples

## With a couple of variables
buffergen(flag=8, var1=8.2, var2=0.00234, S=35, T=25, P=0, Patm=1.0, Pt=0, Sit=0,
	pHscale="T", kf="pf", k1k2="l", ks="d", b="u74", gas="potential", NH4t=0, HSt=0)

## With a couple of variables and non-zero nutrient concentrations
buffergen(flag=8, var1=8.2, var2=0.00234, S=35, T=25, P=0, Patm=1.0, Pt=5e-6, Sit=2e-6,
	pHscale="T", kf="pf", k1k2="l", ks="d", b="u74", gas="potential", NH4t=10e-6, HSt=0.1e-6)

## Using vectors as arguments
flag <- c(8, 2, 8)
var1 <- c(8.2, 7.477544e-06, 8.2)
var2 <- c(0.002343955, 0.001649802, 2400e-6)
S <- c(35, 35, 30)
T <- c(25, 25, 30)
P <- c(0, 0, 0)
Pt <- c(0, 0, 0)
Sit <- c(0, 0, 0)
kf <- c("pf", "pf", "pf")
k1k2 <- c("l", "l", "l")
pHscale <- c("T", "T", "T")
b <- c("l10", "l10", "l10")
gas <- c("potential")
NH4t <- c(0, 0, 0)
HSt <- c(0, 0, 0)
buffergen(flag=flag, var1=var1, var2=var2, S=S, T=T, P=P, Pt=Pt, Sit=Sit, 
  kf=kf, k1k2=k1k2, pHscale=pHscale, b=b, gas=gas, NH4t=NH4t, HSt=HSt)

## Test with all flags 
flag <- c((1:15), (21:25))
var1 <- c(8.200000, 7.308171e-06, 7.308171e-06, 7.308171e-06, 7.308171e-06, 
	8.2, 8.2, 8.2, 8.2, 0.001646857, 0.001646857, 0.001646857, 0.0002822957, 
	0.0002822957, 0.00234, 258.2164, 258.2164, 258.2164, 258.2164, 258.2164 )
var2 <- c(7.308171e-06, 0.001646857, 0.0002822957, 0.00234, 0.001936461, 
	0.001646857, 0.0002822957, 0.00234, 0.001936461, 0.0002822957, 
	0.00234, 0.001936461,  0.00234, 0.001936461, 0.001936461, 8.2, 
	0.001646857, 0.0002822957, 0.00234, 0.001936461)
buffergen(flag=flag, var1=var1, var2=var2)

Buffer capacities of the seawater carbonate system from Egleston et al. (2010), corrected and enhanced

Description

Returns the six buffer factors of the seawater carbonate system as defined by Egleston, Sabine and Morel (2010), denoted here as ESM. Also returns the classic Revelle factor (relative change in pCO2 over that for DIC). In ESM, there are errors in the equations in Table 1 for SS, ΩDIC\Omega_{DIC}, and ΩAlk\Omega_{Alk}. These errors have been corrected here. The results of this routine have been validated: when input concentrations of Pt and Sit are set to zero, they produce results that are identical to those shown in ESM's Fig. 2. But when Pt and Sit are nonzero, contributions from phosphoric and silicic acid systems are taken into account, an improvement to the Egleston et al. (2010) approach. This routine was inspired and adapted from seacarb's “buffer” function. Its input arguments are indentical to those in the “buffer” and “carb” functions of seacarb.

Usage

buffesm(flag, var1, var2, S = 35, T = 25, Patm = 1, P = 0, Pt = 0, Sit = 0, 
  k1k2 = "x", kf = "x", ks = "d", pHscale = "T", b = "u74", warn = "y", 
  eos = "eos80", long = 1e+20, lat = 1e+20)

Arguments

flag

select the couple of variables available. The flags which can be used are:

flag = 1 pH and CO2 given

flag = 2 CO2 and HCO3 given

flag = 3 CO2 and CO3 given

flag = 4 CO2 and ALK given

flag = 5 CO2 and DIC given

flag = 6 pH and HCO3 given

flag = 7 pH and CO3 given

flag = 8 pH and ALK given

flag = 9 pH and DIC given

flag = 10 HCO3 and CO3 given

flag = 11 HCO3 and ALK given

flag = 12 HCO3 and DIC given

flag = 13 CO3 and ALK given

flag = 14 CO3 and DIC given

flag = 15 ALK and DIC given

flag = 21 pCO2 and pH given

flag = 22 pCO2 and HCO3 given

flag = 23 pCO2 and CO3 given

flag = 24 pCO2 and ALK given

flag = 25 pCO2 and DIC given

var1

enter value of the first variable in mol/kg, except for pH and for pCO2 in μ\muatm

var2

enter value of the second variable in mol/kg, except for pH

S

Salinity

T

Temperature in degrees Celsius

Patm

Surface atmospheric pressure in atm, default 1 atm

P

Hydrostatic pressure in bar (surface = 0)

Pt

Concentration of total phosphate in mol/kg; set to 0 if NA; when nonzero, account for phosphoric acid system, unlike in Egleston et al. (2010).

Sit

Concentration of total silicate in mol/kg; set to 0 if NA; when nonzero, account for silicic acid system, unlike in Egleston et al. (2010).

k1k2

"cw" for using K1 and K2 from Cai & Wang (1998), "l" from Lueker et al. (2000), "m02" from Millero et al. (2002), "m06" from Millero et al. (2006), "m10" from Millero (2010), "mp2" from Mojica Prieto et al. (2002), "p18" from Papadimitriou et al. (2018), "r" from Roy et al. (1993), "sb21" from Shockman & Byrne (2021), "s20" from Sulpis et al. (2020), and "w14" from Waters et al. (2014). "x" is the default flag; the default value is then "l", except if T is outside the range 2 to 35oC and/or S is outside the range 19 to 43. In these cases, the default value is "w14".

kf

"pf" for using Kf from Perez and Fraga (1987) and "dg" for using Kf from Dickson and Riley (1979 in Dickson and Goyet, 1994). "x" is the default flag; the default value is then "pf", except if T is outside the range 9 to 33oC and/or S is outside the range 10 to 40. In these cases, the default is "dg".

ks

"d" for using Ks from Dickon (1990), "k" for using Ks from Khoo et al. (1977), default is "d"

pHscale

choice of pH scale: "T" for the total scale, "F" for the free scale and "SWS" for using the seawater scale, default is "T" (total scale)

b

Concentration of total boron. "l10" for the Lee et al. (2010) formulation or "u74" for the Uppstrom (1974) formulation, default is "u74"

warn

"y" to show warnings when T or S go beyond the valid range for constants; "n" to supress warnings. The default is "y".

eos

"teos10" to specify T and S according to Thermodynamic Equation Of Seawater - 2010 (TEOS-10); "eos80" to specify T and S according to EOS-80.

long

longitude of data point, used when eos parameter is "teos10" as a conversion parameter from absolute to practical salinity.

lat

latitude of data point, used when eos parameter is "teos10".

Details

The Lueker et al. (2000) constants for K1 and K2, the Perez and Fraga (1987) constant for Kf and the Dickson (1990) constant for Ks are recommended by Dickson et al. (2007). It is, however, critical to consider that each formulation is only valid for specific ranges of temperature and salinity:

For K1 and K2:

  • Cai and Wang (1998): S ranging between 0 and 40 and T ranging between 0.2 and 30oC.

  • Lueker et al. (2000): S ranging between 19 and 43 and T ranging between 2 and 35oC.

  • Millero et al. (2002): S ranging from 34 to 37 and T ranging between -1.6 and 35oC.

  • Millero et al. (2006): S ranging between 0.1 and 50 and T ranging between 1 and 50oC.

  • Millero (2010): S ranging between 1 and 50 and T ranging between 0 and 50oC. Millero (2010) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

  • Mojica Prieto et al. (2002): S ranging from 5 to 42 and T ranging between 0 and 45oC.

  • Papadimitriou et al. (2018): S ranging from 33 to 100 and T ranging between -6 to 25oC.

  • Roy et al. (1993): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Shockman & Byrne (2021): for K2, S ranging from 19.6 to 41 and T ranging between 15 to 35oC. For K1, formulation is that of Waters et al.

  • Sulpis et al. (2020): S ranging from 30.7 to 37.6 and T ranging between -1.7 to 31.8oC.

  • Waters et al.(2014): S ranging between 1 and 50 and T ranging between 0 and 50oC. Waters (2014) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

For K0:

  • Perez and Fraga (1987): S ranging between 10 and 40 and T ranging between 9 and 33oC.

  • Dickson and Riley (1979 in Dickson and Goyet, 1994): S ranging between 0 and 45 and T ranging between 0 and 45oC.

For Ks:

  • Dickson (1990): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Khoo et al. (1977): S ranging between 20 and 45 and T ranging between 5 and 40oC.

The arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It is recommended to use either vectors with the same dimension or one vector for one argument and numbers for the other arguments.

Pressure corrections and pH scale:

  • For K0, the pressure correction term of Weiss (1974) is used.

  • For K1, K2, pK1, pK2, pK3, Kw, Kb, Khs and Ksi, the pressure correction was applied on the seawater scale. Hence, if needed, values were first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kf, the pressure correction was applied on the free scale. The formulation of Dickson and Riley (1979 in Dickson and Goyet, 1994) provides Kf on the free scale but that of Perez and Fraga (1987) provides it on the total scale. Hence, in that case, Kf was first transformed from the total scale to the free scale. With both formulations, the pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Ks, the pressure correction was applied on the free scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kn, The pressure correction was applied on the seawater scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

long and lat are used as conversion parameters from absolute to practical salinity: when seawater is not of standard composition, practical salinity alone is not sufficient to compute absolute salinity and vice-versa. One needs to know the density. When long and lat are given, density is inferred from WOA silicate concentration at given location. When they are not, an arbitrary geographic point is chosen: mid equatorial Atlantic. Note that this implies an error on computed salinity up to 0.02 g/kg.

Value

The function returns a data frame containing the following columns:

gammaDIC

γDIC\gamma_{DIC}, ocean's capacity to buffer changes in [CO2] due to accumulation of CO2 from the atmosphere (ln[CO2]/DIC)1(\partial ln[CO_2]/\partial DIC)^{-1} (units = mol/kg; multiply by 1000 to get mmol/kg, i.e., the units presented in Egleston et al., 2010)

betaDIC

βDIC\beta_{DIC}, ocean's capacity to buffer changes in [H+] due to accumulation of CO2 from the atmosphere (ln[H+]/DIC)1(\partial ln[H^+]/\partial DIC)^{-1} (units = mol/kg)

omegaDIC

ΩDIC\Omega_{DIC}, ocean's capacity to buffer changes in [CO32][CO_3^{2-}] due to accumulation of CO2 from the atmosphere (ln[CO32]/DIC)1(\partial ln[CO_3^{2-}]/\partial DIC)^{-1}; same as (lnΩA/DIC)1(\partial ln \Omega_A / \partial DIC)^{-1} and (lnΩC/DIC)1(\partial ln \Omega_C / \partial DIC)^{-1} (units= mol/kg)

gammaALK

γAlk\gamma_{Alk}, ocean's capacity to buffer changes in [CO2] due to changes in alkalinity (ln[CO2]/ALK)1(\partial ln[CO_2]/\partial ALK)^-1 (units = mol/kg)

betaALK

βAlk\beta_{Alk}, ocean's capacity to buffer changes in [H+] due to changes in alkalinity (ln[H+]/ALK)1(\partial ln[H^+]/\partial ALK)^{-1} (units = mol/kg)

omegaALK

ΩAlk\Omega_{Alk}, ocean's capacity to buffer changes in [CO32][CO_3^{2-}] due to changes in alkalinity (ln[CO32]/ALK)1(\partial ln[CO_3^{2-}]/\partial ALK)^{-1}; same as (lnΩA/ALK)1(\partial ln \Omega_A / \partial ALK)^{-1} and (lnΩC/ALK)1(\partial ln \Omega_C / \partial ALK)^{-1} (units = mol/kg)

R

Revelle factor, relative change in [CO2][CO_2] or pCO2pCO_2 over the relative change in DIC (ln[CO2]/lnDIC)1(\partial ln[CO_2]/\partial ln DIC)^{-1} (unitless)

Author(s)

James Orr [email protected]

References

Cai W. J., and Wang Y., 1998. The chemistry, fluxes, and sources of carbon dioxide in the estuarine waters of the Satilla and Altamaha Rivers, Georgia. Limnology and Oceanography 43, 657-668.

Dickson A. G., 1990 Standard potential of the reaction: AgCI(s) + 1/2H2(g) = Ag(s) + HCI(aq), and the standard acidity constant of the ion HSO4 in synthetic sea water from 273.15 to 318.15 K. Journal of Chemical Thermodynamics 22, 113-127.

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Egleston, E. S., Sabine, C. L. and Morel, F. M. M., 2010 Revelle revisited: Buffer factors that quantify the response of ocean chemistry to changes in DIC and alkalinity, Global Biogeochem. Cycles 24, GB1002, doi:10.1029/2008GB003407.

Khoo H. K., Ramette R. W., Culberson C. H. and Bates R. G., 1977 Determination of hydrogen ion concentration in seawater from 5 to 40oC: standard potentials at salinities from 20 to 45. Analytical Chemistry 49, 29-34.

Frankignoulle M., 1994 A complete set of buffer factors for acid/base CO2 system in seawater. Journal of Marine Systems 5, 111-118.

Lee K., Tae-Wook K., Byrne R.H., Millero F.J., Feely R.A. and Liu Y-M, 2010 The universal ratio of the boron to chlorinity for the North Pacific and North Atlantoc oceans. Geochimica et Cosmochimica Acta 74 1801-1811.

Lueker T. J., Dickson A. G. and Keeling C. D., 2000 Ocean pCO2 calculated from dissolved inorganic carbon, alkalinity, and equations for K1 and K2: validation based on laboratory measurements of CO2 in gas and seawater at equilibrium. Marine Chemistry 70 105-119.

Millero F. J., 2010 Carbonate constant for estuarine waters. Marine and Freshwater Research 61: 139-142.

Millero F. J., Graham T. B., Huang F., Bustos-Serrano H. and Pierrot D., 2006 Dissociation constants of carbonic acid in seawateras a function of salinity and temperature. Marine Chemistry 100, 80-84.

Perez F. F. and Fraga F., 1987 Association constant of fluoride and hydrogen ions in seawater. Marine Chemistry 21, 161-168.

Roy R. N., Roy L. N., Vogel K. M., Porter-Moore C., Pearson T., Good C. E., Millero F. J. and Campbell D. M., 1993. The dissociation constants of carbonic acid in seawater at salinities 5 to 45 and temperatures 0 to 45oC. Marine Chemistry 44, 249-267.

Schockman, K.M., Byrne, R.H., 2021. Spectrophotometric determination of the bicarbonate dissociation constant in seawater, Geochimica et Cosmochimica Acta.

Uppstrom L.R., 1974 The boron/chlorinity ratio of the deep-sea water from the Pacific Ocean. Deep-Sea Research I 21 161-162.

Examples

## Computation with a couple of variables
buffesm(flag=8, var1=8.2, var2=0.00234, S=35, T=25, P=0, Pt=0, 
	Sit=0, pHscale="T", kf="pf", k1k2="l", b="u74")

## Using vectors as arguments
flag <- c(8, 2, 8)
var1 <- c(8.2, 7.477544e-06, 8.2)
var2 <- c(0.002343955, 0.001649802, 2400e-6)
S <- c(35, 35, 30)
T <- c(25, 25, 30)
P <- c(0, 0, 0)
Pt <- c(0, 0, 0)
Sit <- c(0, 0, 0)
kf <- c("pf", "pf", "pf")
k1k2 <- c("l", "l", "l")
pHscale <- c("T", "T", "T")
b <- c("l10", "l10", "l10")
buffesm(flag=flag, var1=var1, var2=var2, S=S, T=T, P=P, Pt=Pt, 
	Sit=Sit, kf=kf, k1k2=k1k2, pHscale=pHscale, b=b)

## Test for all flags 
flag <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 21, 22, 23, 24, 25)

var1 <- c(8.200000, 7.477544e-06, 7.477544e-06, 7.477544e-06, 7.477544e-06, 8.2, 
	8.2, 8.2, 8.2, 0.001685024, 0.001685024, 0.001685024,  0.0002888382, 
	0.0002888382, 0.002391252, 264.2008, 264.2008, 264.2008, 264.2008, 264.2008)
var2 <- c(7.477544e-06, 0.001685024, 0.0002888382, 0.002391252, 0.001981340, 
	0.001685024, 0.0002888382, 0.002391252, 0.001981340, 0.0002888382, 0.002391252,
	0.001981340,  0.002391252, 0.001981340, 0.001981340, 8.2, 0.001685024, 
	0.0002888382, 0.002391252, 0.001981340)
buffesm(flag=flag, var1=var1, var2=var2)

## Compute 2 additional factors of interest (ratios of relative changes)
be <- buffesm(flag=flag, var1=var1, var2=var2, S=S, T=T, P=P, Pt=Pt, 
	Sit=Sit, kf=kf, k1k2=k1k2, pHscale=pHscale, b=b)
#     Ratio of gammaDIC/betaDIC = d ln [H+] / d ln pCO2
      Hfac <- (be$gammaDIC/be$betaDIC)                         #H+ factor
#     Ratio of gammaDIC/omegaDIC = d ln [CO32-] / d ln pCO2
      Satfac <- (be$gammaDIC/be$omegaDIC)                      #Saturation factor

Parameters of the seawater carbonate system

Description

Returns parameters of the seawater carbonate system.

Usage

carb(flag, var1, var2, S=35, T=25, Patm=1, P=0, Pt=0, Sit=0,
        k1k2="x", kf="x", ks="d", pHscale="T", b="u74", gas="potential", 
        warn="y", eos="eos80", long=1.e20, lat=1.e20)

Arguments

flag

select the couple of variables available. The flags which can be used are:

flag = 1 pH and CO2 given

flag = 2 CO2 and HCO3 given

flag = 3 CO2 and CO3 given

flag = 4 CO2 and ALK given

flag = 5 CO2 and DIC given

flag = 6 pH and HCO3 given

flag = 7 pH and CO3 given

flag = 8 pH and ALK given

flag = 9 pH and DIC given

flag = 10 HCO3 and CO3 given

flag = 11 HCO3 and ALK given

flag = 12 HCO3 and DIC given

flag = 13 CO3 and ALK given

flag = 14 CO3 and DIC given

flag = 15 ALK and DIC given

flag = 21 pCO2 and pH given

flag = 22 pCO2 and HCO3 given

flag = 23 pCO2 and CO3 given

flag = 24 pCO2 and ALK given

flag = 25 pCO2 and DIC given

var1

Value of the first variable in mol/kg, except for pH and for pCO2 in μ\muatm

var2

Value of the second variable in mol/kg, except for pH

S

Salinity

T

Temperature in degrees Celsius

Patm

Surface atmospheric pressure in atm, default is 1 atm

P

Hydrostatic pressure in bar (surface = 0)

Pt

Concentration of total phosphate in mol/kg; set to 0 if NA

Sit

Concentration of total silicate in mol/kg; set to 0 if NA

k1k2

"cw" for using K1 and K2 from Cai & Wang (1998), "l" from Lueker et al. (2000), "m02" from Millero et al. (2002), "m06" from Millero et al. (2006), "m10" from Millero (2010), "mp2" from Mojica Prieto et al. (2002), "p18" from Papadimitriou et al. (2018), "r" from Roy et al. (1993), "sb21" from Shockman & Byrne (2021), "s20" from Sulpis et al. (2020), and "w14" from Waters et al. (2014). "x" is the default flag; the default value is then "l", except if T is outside the range 2 to 35oC and/or S is outside the range 19 to 43. In these cases, the default value is "w14".

kf

"pf" for using Kf from Perez and Fraga (1987) and "dg" for using Kf from Dickson and Riley (1979 in Dickson and Goyet, 1994). "x" is the default flag; the default value is then "pf", except if T is outside the range 9 to 33oC and/or S is outside the range 10 to 40. In these cases, the default is "dg".

ks

"d" for using Ks from Dickson (1990) and "k" for using Ks from Khoo et al. (1977), default is "d"

pHscale

"T" for the total scale, "F" for the free scale and "SWS" for using the seawater scale, default is "T" (total scale)

b

Concentration of total boron. "l10" for the Lee et al. (2010) formulation or "u74" for the Uppstrom (1974) formulation, default is "u74"

gas

used to indicate the convention for INPUT pCO2, i.e., when it is an input variable (flags 21 to 25): "insitu" indicates it is referenced to in situ pressure and in situ temperature; "potential" indicates it is referenced to 1 atm pressure and potential temperature; and "standard" indicates it is referenced to 1 atm pressure and in situ temperature. All three options should give identical results at surface pressure. This option is not used when pCO2 is not an input variable (flags 1 to 15). The default is "potential".

warn

"y" to show warnings when T or S go beyond the valid range for constants; "n" to supress warnings. The default is "y".

eos

"teos10" to specify T and S according to Thermodynamic Equation Of Seawater - 2010 (TEOS-10); "eos80" to specify T and S according to EOS-80.

long

longitude of data point, used when eos parameter is "teos10" as a conversion parameter from absolute to practical salinity.

lat

latitude of data point, used when eos parameter is "teos10".

Details

The Lueker et al. (2000) constants for K1 and K2, the Perez and Fraga (1987) constant for Kf and the Dickson (1990) constant for Ks are recommended by Dickson et al. (2007). It is, however, critical to consider that each formulation is only valid for specific ranges of temperature and salinity:

For K1 and K2:

  • Cai and Wang (1998): S ranging between 0 and 40 and T ranging between 0.2 and 30oC.

  • Lueker et al. (2000): S ranging between 19 and 43 and T ranging between 2 and 35oC.

  • Millero et al. (2002): S ranging from 34 to 37 and T ranging between -1.6 and 35oC.

  • Millero et al. (2006): S ranging between 0.1 and 50 and T ranging between 1 and 50oC.

  • Millero (2010): S ranging between 1 and 50 and T ranging between 0 and 50oC. Millero (2010) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

  • Mojica Prieto et al. (2002): S ranging from 5 to 42 and T ranging between 0 and 45oC.

  • Papadimitriou et al. (2018): S ranging from 33 to 100 and T ranging between -6 to 25oC.

  • Roy et al. (1993): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Shockman & Byrne (2021): for K2, S ranging from 19.6 to 41 and T ranging between 15 to 35oC. For K1, formulation is that of Waters et al.

  • Sulpis et al. (2020): S ranging from 30.7 to 37.6 and T ranging between -1.7 to 31.8oC.

  • Waters et al.(2014): S ranging between 1 and 50 and T ranging between 0 and 50oC. Waters (2014) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

For Kf:

  • Perez and Fraga (1987): S ranging between 10 and 40 and T ranging between 9 and 33oC.

  • Dickson and Riley (1979 in Dickson and Goyet, 1994): S ranging between 0 and 45 and T ranging between 0 and 45oC.

For Ks:

  • Dickson (1990): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Khoo et al. (1977): S ranging between 20 and 45 and T ranging between 5 and 40oC.

The arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It is recommended to use either vectors with the same dimension or one vector for one argument and numbers for the other arguments.

Pressure corrections and pH scale:

  • For K0, the pressure correction term of Weiss (1974) is used.

  • For K1, K2, pK1, pK2, pK3, Kw, Kb, Khs and Ksi, the pressure correction was applied on the seawater scale. Hence, if needed, values were first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kf, the pressure correction was applied on the free scale. The formulation of Dickson and Riley (1979 in Dickson and Goyet, 1994) provides Kf on the free scale but that of Perez and Fraga (1987) provides it on the total scale. Hence, in that case, Kf was first transformed from the total scale to the free scale. With both formulations, the pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Ks, the pressure correction was applied on the free scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kn, The pressure correction was applied on the seawater scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

long and lat are used as conversion parameters from absolute to practical salinity: when seawater is not of standard composition, practical salinity alone is not sufficient to compute absolute salinity and vice-versa. One needs to know the density. When long and lat are given, density is inferred from WOA silicate concentration at given location. When they are not, an arbitrary geographic point is chosen: mid equatorial Atlantic. Note that this implies an error on computed salinity up to 0.02 g/kg.

Value

The function returns a data frame containing the following columns:

S

Salinity

T

Temperature in degrees Celsius

Patm

Surface atmospheric pressure in atm

P

Hydrostatic pressure in bar

pH

pH

CO2

CO2 concentration (mol/kg)

pCO2

"standard" pCO2, CO2 partial pressure computed at in situ temperature and atmospheric pressure (μ\muatm)

fCO2

"standard" fCO2, CO2 fugacity computed at in situ temperature and atmospheric pressure (μ\muatm)

pCO2pot

"potential" pCO2, CO2 partial pressure computed at potential temperature and atmospheric pressure (μ\muatm)

fCO2pot

"potential" fCO2, CO2 fugacity computed at potential temperature and atmospheric pressure (μ\muatm)

pCO2insitu

"in situ" pCO2, CO2 partial pressure computed at in situ temperature and total pressure (atm + hydrostatic) (μ\muatm)

fCO2insitu

"in situ" fCO2, CO2 fugacity computed at in situ temperature and total pressure (atm + hydrostatic) (μ\muatm)

HCO3

HCO3 concentration (mol/kg)

CO3

CO3 concentration (mol/kg)

DIC

DIC concentration (mol/kg)

ALK

ALK, total alkalinity (mol/kg)

OmegaAragonite

Omega aragonite, aragonite saturation state

OmegaCalcite

Omega calcite, calcite saturation state

Note

Warning: pCO2 estimates below 100 m are subject to considerable uncertainty. See Weiss (1974) and Orr et al. (2015)

Author(s)

Heloise Lavigne, James Orr and Jean-Pierre Gattuso [email protected]

References

Cai W. J., and Wang Y., 1998. The chemistry, fluxes, and sources of carbon dioxide in the estuarine waters of the Satilla and Altamaha Rivers, Georgia. Limnology and Oceanography 43, 657-668.

Dickson A. G. and Riley J. P., 1979 The estimation of acid dissociation constants in seawater media from potentiometric titrations with strong base. I. The ionic product of water. Marine Chemistry 7, 89-99.

Dickson A. G., 1990 Standard potential of the reaction: AgCI(s) + 1/2H2(g) = Ag(s) + HCI(aq), and the standard acidity constant of the ion HSO4 in synthetic sea water from 273.15 to 318.15 K. Journal of Chemical Thermodynamics 22, 113-127.

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Khoo H. K., Ramette R. W., Culberson C. H. and Bates R. G., 1977 Determination of Hydrogen ion concentration in seawater from 5 to 40oC: standard potentials at salinities from 20 to 45. Analytical Chemistry 49, 29-34.

Lee K., Tae-Wook K., Byrne R.H., Millero F.J., Feely R.A. and Liu Y-M, 2010 The universal ratio of the boron to chlorinity for the North Pacific and North Atlantoc oceans. Geochimica et Cosmochimica Acta 74 1801-1811.

Lueker T. J., Dickson A. G. and Keeling C. D., 2000 Ocean pCO2 calculated from dissolved inorganic carbon, alkalinity, and equations for K1 and K2: validation based on laboratory measurements of CO2 in gas and seawater at equilibrium. Marine Chemistry 70 105-119.

Millero F. J., 1995. Thermodynamics of the carbon dioxide system in the oceans. Geochimica Cosmochimica Acta 59: 661-677.

Millero F. J., 2010. Carbonate constant for estuarine waters. Marine and Freshwater Research 61: 139-142.

Millero F. J., Graham T. B., Huang F., Bustos-Serrano H. and Pierrot D., 2006. Dissociation constants of carbonic acid in seawater as a function of salinity and temperature. Marine Chemistry 100, 80-84.

Orr J. C., Epitalon J.-M. and Gattuso J.-P., 2015. Comparison of seven packages that compute ocean carbonate chemistry. Biogeosciences 12, 1483-1510.

Perez F. F. and Fraga F., 1987 Association constant of fluoride and hydrogen ions in seawater. Marine Chemistry 21, 161-168.

Roy R. N., Roy L. N., Vogel K. M., Porter-Moore C., Pearson T., Good C. E., Millero F. J. and Campbell D. M., 1993. The dissociation constants of carbonic acid in seawater at salinities 5 to 45 and temperatures 0 to 45oC. Marine Chemistry 44, 249-267.

Schockman, K.M., Byrne, R.H., 2021. Spectrophotometric determination of the bicarbonate dissociation constant in seawater, Geochimica et Cosmochimica Acta.

Uppstrom L.R., 1974 The boron/chlorinity ratio of the deep-sea water from the Pacific Ocean. Deep-Sea Research I 21, 161-162.

Waters, J., Millero, F. J., and Woosley, R. J., 2014. Corrigendum to “The free proton concentration scale for seawater pH”, [MARCHE: 149 (2013) 8-22], Marine Chemistry 165, 66-67.

Weiss, R. F., 1974. Carbon dioxide in water and seawater: the solubility of a non-ideal gas, Mar. Chem., 2, 203-215.

Weiss, R. F. and Price, B. A., 1980. Nitrous oxide solubility in water and seawater, Marine Chemistry, 8, 347-359.

Zeebe R. E. and Wolf-Gladrow D. A., 2001 CO2 in seawater: equilibrium, kinetics, isotopes. Amsterdam: Elsevier, 346 pp.

Examples

## 1. With a couple of variables
carb(flag=8, var1=8.2, var2=0.00234, S=35, T=25, P=0, Patm=1.0, Pt=0, Sit=0,
	pHscale="T", kf="pf", k1k2="l", ks="d", b="u74")

## 2. Using vectors as arguments
flag <- c(8, 2, 8)
var1 <- c(8.2, 7.477544e-06, 8.2)
var2 <- c(0.002343955, 0.001649802, 2400e-6)
S <- c(35, 35, 30)
T <- c(25, 25, 30)
P <- c(0, 0, 0)
Pt <- c(0, 0, 0)
Sit <- c(0, 0, 0)
kf <- c("pf", "pf", "pf")
k1k2 <- c("l", "l", "l")
pHscale <- c("T", "T", "T")
b <- c("l10", "l10", "l10")
carb(flag=flag, var1=var1, var2=var2, S=S, T=T, P=P,
	Pt=Pt, Sit=Sit, kf=kf, k1k2=k1k2, pHscale=pHscale, b=b)

## 3. Special case: when input pH is on NBS scale (not a standard option in seacarb) 
##    -> example for pH-Alk input pair (flag 8) and Cai & Wang (1998) K1,K2 
pHNBS <- c(8.2, 8.1, 8.0)
talk <- c(2300, 2350, 2400) * 1e-6
S <- c(35, 32.5, 30)
T <- c(25, 15, 10)

## 3a. convert pHNBS to pHSWS (using total activity coeff. fH), then use carb with pHscale="SWS"
pHSWS <- pHnbs2sws(pHNBS, S=S, T=T)
carb(flag=8, var1=pHSWS, var2=talk, S=S, T=T, P=0, Patm=1.0, Pt=0, Sit=0,
	pHscale="SWS", kf="pf", k1k2="cw", ks="d", b="u74")

## 3b. conversely for input pairs without pH,  convert computed pH on SWS scale to NBS scale, 
##     with function pHsws2nbs
##    -> example for Alk-DIC input pair (flag 15) and Cai & Wang (1998) K1,K2 
dic <- c(2000., 2030., 2060) * 1e-6
output = carb(flag=15, var1=talk, var2=dic, S=S, T=T, P=0, Patm=1.0, Pt=0, Sit=0,
	pHscale="SWS", kf="pf", k1k2="cw", ks="d", b="u74")
pHNBS  = pHsws2nbs(output$pH, S=S, T=T)

## 4. Test with all flags 
flag <- c((1:15), (21:25))
var1 <- c(8.200000, 7.308171e-06, 7.308171e-06, 7.308171e-06, 7.308171e-06, 
	8.2, 8.2, 8.2, 8.2, 0.001646857, 0.001646857, 0.001646857, 0.0002822957, 
	0.0002822957, 0.00234, 258.2164, 258.2164, 258.2164, 258.2164, 258.2164 )
var2 <- c(7.308171e-06, 0.001646857, 0.0002822957, 0.00234, 0.001936461, 
	0.001646857, 0.0002822957, 0.00234, 0.001936461, 0.0002822957, 
	0.00234, 0.001936461,  0.00234, 0.001936461, 0.001936461, 8.2, 
	0.001646857, 0.0002822957, 0.00234, 0.001936461)
carb(flag=flag, var1=var1, var2=var2)

## 5. Test using a data frame 
data(seacarb_test_P0)	#test data set for P=0 (surface)
tab <- seacarb_test_P0[14:19,]

## 5a. method 1 using the column numbers
carb(flag=tab[[1]], var1=tab[[2]], var2=tab[[3]], S=tab[[4]], T=tab[[5]], 
P=tab[[6]], Sit=tab[[8]], Pt=tab[[7]])

## 5b. method 2 using the column names
carb(flag=tab$flag, var1=tab$var1, var2=tab$var2, S=tab$S, T=tab$T, 
P=tab$P, Sit=tab$Sit, Pt=tab$Pt)

Parameters of the seawater carbonate system with boron addition

Description

Returns parameters of the seawater carbonate system when boron is added.

Usage

carbb(flag, var1, var2, S=35, T=25, Patm=1, P=0, Pt=0, Sit=0, 
  k1k2="x", kf="x", ks="d", pHscale="T", b="u74", gas="potential", badd=0, 
  warn="y", eos = "eos80", long = 1e+20, lat = 1e+20)

Arguments

flag

select the couple of variables available. The flags which can be used are:

flag = 1 pH and CO2 given

flag = 2 CO2 and HCO3 given

flag = 3 CO2 and CO3 given

flag = 4 CO2 and ALK given

flag = 5 CO2 and DIC given

flag = 6 pH and HCO3 given

flag = 7 pH and CO3 given

flag = 8 pH and ALK given

flag = 9 pH and DIC given

flag = 10 HCO3 and CO3 given

flag = 11 HCO3 and ALK given

flag = 12 HCO3 and DIC given

flag = 13 CO3 and ALK given

flag = 14 CO3 and DIC given

flag = 15 ALK and DIC given

flag = 21 pCO2 and pH given

flag = 22 pCO2 and HCO3 given

flag = 23 pCO2 and CO3 given

flag = 24 pCO2 and ALK given

flag = 25 pCO2 and DIC given

var1

Value of the first variable in mol/kg, except for pH and for pCO2 in μ\muatm

var2

Value of the second variable in mol/kg, except for pH

S

Salinity

T

Temperature in degrees Celsius

Patm

Surface atmospheric pressure in atm, default is 1 atm

P

Hydrostatic pressure in bar (surface = 0)

Pt

Concentration of total phosphate in mol/kg; set to 0 if NA

Sit

Concentration of total silicate in mol/kg; set to 0 if NA

k1k2

"cw" for using K1 and K2 from Cai & Wang (1998), "l" from Lueker et al. (2000), "m02" from Millero et al. (2002), "m06" from Millero et al. (2006), "m10" from Millero (2010), "mp2" from Mojica Prieto et al. (2002), "p18" from Papadimitriou et al. (2018), "r" from Roy et al. (1993), "sb21" from Shockman & Byrne (2021), "s20" from Sulpis et al. (2020), and "w14" from Waters et al. (2014). "x" is the default flag; the default value is then "l", except if T is outside the range 2 to 35oC and/or S is outside the range 19 to 43. In these cases, the default value is "w14".

kf

"pf" for using Kf from Perez and Fraga (1987) and "dg" for using Kf from Dickson and Riley (1979 in Dickson and Goyet, 1994). "x" is the default flag; the default value is then "pf", except if T is outside the range 9 to 33oC and/or S is outside the range 10 to 40. In these cases, the default is "dg".

ks

"d" for using Ks from Dickson (1990) and "k" for using Ks from Khoo et al. (1977), default is "d"

pHscale

"T" for the total scale, "F" for the free scale and "SWS" for using the seawater scale, default is "T" (total scale)

b

Concentration of total boron. "l10" for the Lee et al. (2010) formulation or "u74" for the Uppstrom (1974) formulation, default is "u74"

gas

used to indicate the convention for INPUT pCO2, i.e., when it is an input variable (flags 21 to 25): "insitu" indicates it is referenced to in situ pressure and in situ temperature; "potential" indicates it is referenced to 1 atm pressure and potential temperature; and "standard" indicates it is referenced to 1 atm pressure and in situ temperature. All three options should give identical results at surface pressure. This option is not used when pCO2 is not an input variable (flags 1 to 15). The default is "potential".

badd

Amount of boron added in mol/kg.

warn

"y" to show warnings when T or S go beyond the valid range for constants; "n" to supress warnings. The default is "y".

eos

"teos10" to specify T and S according to Thermodynamic Equation Of Seawater - 2010 (TEOS-10); "eos80" to specify T and S according to EOS-80.

long

longitude of data point, used when eos parameter is "teos10" as a conversion parameter from absolute to practical salinity.

lat

latitude of data point, used when eos parameter is "teos10".

Details

The Lueker et al. (2000) constants for K1 and K2, the Perez and Fraga (1987) constant for Kf and the Dickson (1990) constant for Ks are recommended by Dickson et al. (2007). It is, however, critical to consider that each formulation is only valid for specific ranges of temperature and salinity:

For K1 and K2:

  • Cai and Wang (1998): S ranging between 0 and 40 and T ranging between 0.2 and 30oC.

  • Lueker et al. (2000): S ranging between 19 and 43 and T ranging between 2 and 35oC.

  • Millero et al. (2002): S ranging from 34 to 37 and T ranging between -1.6 and 35oC.

  • Millero et al. (2006): S ranging between 0.1 and 50 and T ranging between 1 and 50oC.

  • Millero (2010): S ranging between 1 and 50 and T ranging between 0 and 50oC. Millero (2010) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

  • Mojica Prieto et al. (2002): S ranging from 5 to 42 and T ranging between 0 and 45oC.

  • Papadimitriou et al. (2018): S ranging from 33 to 100 and T ranging between -6 to 25oC.

  • Roy et al. (1993): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Shockman & Byrne (2021): for K2, S ranging from 19.6 to 41 and T ranging between 15 to 35oC. For K1, formulation is that of Waters et al.

  • Sulpis et al. (2020): S ranging from 30.7 to 37.6 and T ranging between -1.7 to 31.8oC.

  • Waters et al.(2014): S ranging between 1 and 50 and T ranging between 0 and 50oC. Waters (2014) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

For Kf:

  • Perez and Fraga (1987): S ranging between 10 and 40 and T ranging between 9 and 33oC.

  • Dickson and Riley (1979 in Dickson and Goyet, 1994): S ranging between 0 and 45 and T ranging between 0 and 45oC.

For Ks:

  • Dickson (1990): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Khoo et al. (1977): S ranging between 20 and 45 and T ranging between 5 and 40oC.

The arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It is recommended to use either vectors with the same dimension or one vector for one argument and numbers for the other arguments.

Pressure corrections and pH scale:

  • For K0, the pressure correction term of Weiss (1974) is used.

  • For K1, K2, pK1, pK2, pK3, Kw, Kb, Khs and Ksi, the pressure correction was applied on the seawater scale. Hence, if needed, values were first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kf, the pressure correction was applied on the free scale. The formulation of Dickson and Riley (1979 in Dickson and Goyet, 1994) provides Kf on the free scale but that of Perez and Fraga (1987) provides it on the total scale. Hence, in that case, Kf was first transformed from the total scale to the free scale. With both formulations, the pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Ks, the pressure correction was applied on the free scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kn, The pressure correction was applied on the seawater scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

long and lat are used as conversion parameters from absolute to practical salinity: when seawater is not of standard composition, practical salinity alone is not sufficient to compute absolute salinity and vice-versa. One needs to know the density. When long and lat are given, density is inferred from WOA silicate concentration at given location. When they are not, an arbitrary geographic point is chosen: mid equatorial Atlantic. Note that this implies an error on computed salinity up to 0.02 g/kg.

Value

The function returns a data frame containing the following columns:

S

Salinity

T

Temperature in degrees Celsius

Patm

Surface atmospheric pressure in atm

P

Hydrostatic pressure in bar

pH

pH

CO2

CO2 concentration (mol/kg)

pCO2

"standard" pCO2, CO2 partial pressure computed at in situ temperature and atmospheric pressure (μ\muatm)

fCO2

"standard" fCO2, CO2 fugacity computed at in situ temperature and atmospheric pressure (μ\muatm)

pCO2pot

"potential" pCO2, CO2 partial pressure computed at potential temperature and atmospheric pressure (μ\muatm)

fCO2pot

"potential" fCO2, CO2 fugacity computed at potential temperature and atmospheric pressure (μ\muatm)

pCO2insitu

"in situ" pCO2, CO2 partial pressure computed at in situ temperature and total pressure (atm + hydrostatic) (μ\muatm)

fCO2insitu

"in situ" fCO2, CO2 fugacity computed at in situ temperature and total pressure (atm + hydrostatic) (μ\muatm)

HCO3

HCO3 concentration (mol/kg)

CO3

CO3 concentration (mol/kg)

DIC

DIC concentration (mol/kg)

ALK

ALK, total alkalinity (mol/kg)

OmegaAragonite

Omega aragonite, aragonite saturation state

OmegaCalcite

Omega calcite, calcite saturation state

Note

Warning: pCO2 estimates below 100 m are subject to considerable uncertainty. See Weiss (1974) and Orr et al. (2015)

Author(s)

Heloise Lavigne, James Orr and Jean-Pierre Gattuso [email protected]

References

Cai W. J., and Wang Y., 1998. The chemistry, fluxes, and sources of carbon dioxide in the estuarine waters of the Satilla and Altamaha Rivers, Georgia. Limnology and Oceanography 43, 657-668.

Dickson A. G. and Riley J. P., 1979 The estimation of acid dissociation constants in seawater media from potentiometric titrations with strong base. I. The ionic product of water. Marine Chemistry 7, 89-99.

Dickson A. G., 1990 Standard potential of the reaction: AgCI(s) + 1/2H2(g) = Ag(s) + HCI(aq), and the standard acidity constant of the ion HSO4 in synthetic sea water from 273.15 to 318.15 K. Journal of Chemical Thermodynamics 22, 113-127.

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Khoo H. K., Ramette R. W., Culberson C. H. and Bates R. G., 1977 Determination of Hydrogen ion concentration in seawater from 5 to 40oC: standard potentials at salinities from 20 to 45. Analytical Chemistry 49, 29-34. Lee K., Tae-Wook K., Byrne R.H., Millero F.J., Feely R.A. and Liu Y-M, 2010 The universal ratio of the boron to chlorinity for the North Pacific and North Atlantoc oceans. Geochimica et Cosmochimica Acta 74 1801-1811.

Lueker T. J., Dickson A. G. and Keeling C. D., 2000 Ocean pCO2 calculated from dissolved inorganic carbon, alkalinity, and equations for K1 and K2: validation based on laboratory measurements of CO2 in gas and seawater at equilibrium. Marine Chemistry 70 105-119.

Millero F. J., 1995. Thermodynamics of the carbon dioxide system in the oceans. Geochimica Cosmochimica Acta 59: 661-677.

Millero F. J., 2010. Carbonate constant for estuarine waters. Marine and Freshwater Research 61: 139-142.

Millero F. J., Graham T. B., Huang F., Bustos-Serrano H. and Pierrot D., 2006. Dissociation constants of carbonic acid in seawater as a function of salinity and temperature. Marine Chemistry 100, 80-84.

Orr J. C., Epitalon J.-M. and Gattuso J.-P., 2015. Comparison of seven packages that compute ocean carbonate chemistry. Biogeosciences 12, 1483-1510.

Perez F. F. and Fraga F., 1987 Association constant of fluoride and hydrogen ions in seawater. Marine Chemistry 21, 161-168.

Roy R. N., Roy L. N., Vogel K. M., Porter-Moore C., Pearson T., Good C. E., Millero F. J. and Campbell D. M., 1993. The dissociation constants of carbonic acid in seawater at salinities 5 to 45 and temperatures 0 to 45oC. Marine Chemistry 44, 249-267.

Schockman, K.M., Byrne, R.H., 2021. Spectrophotometric determination of the bicarbonate dissociation constant in seawater, Geochimica et Cosmochimica Acta.

Uppstrom L.R., 1974 The boron/chlorinity ratio of the deep-sea water from the Pacific Ocean. Deep-Sea Research I 21 161-162.

Weiss, R. F., 1974. Carbon dioxide in water and seawater: the solubility of a non-ideal gas, Mar. Chem., 2, 203-215.

Weiss, R. F. and Price, B. A., 1980. Nitrous oxide solubility in water and seawater, Marine Chemistry, 8, 347-359.

Zeebe R. E. and Wolf-Gladrow D. A., 2001 CO2 in seawater: equilibrium, kinetics, isotopes. Amsterdam: Elsevier, 346 pp.

Examples

## With a couple of variables
carbb(flag=8, var1=8.2, var2=0.00234, S=35, T=25, P=0, Patm=1.0, Pt=0, Sit=0,
	pHscale="T", kf="pf", k1k2="l", ks="d", b="u74", badd=0)

Parameters of the seawater carbonate system - extension of carb

Description

Returns parameters of the seawater carbonate system, including the ammonium and sulfide acid-base systems, as well as full acid-base speciation

Usage

carbfull(flag, var1, var2, S=35, T=25, Patm=1, P=0, Pt=0, Sit=0,
        k1k2="x", kf="x", ks="d", pHscale="T", b="u74", gas="potential",
        NH4t=0, HSt=0)

Arguments

flag

select the couple of variables available. The flags which can be used are:

flag = 1 pH and CO2 given

flag = 2 CO2 and HCO3 given

flag = 3 CO2 and CO3 given

flag = 4 CO2 and ALK given

flag = 5 CO2 and DIC given

flag = 6 pH and HCO3 given

flag = 7 pH and CO3 given

flag = 8 pH and ALK given

flag = 9 pH and DIC given

flag = 10 HCO3 and CO3 given

flag = 11 HCO3 and ALK given

flag = 12 HCO3 and DIC given

flag = 13 CO3 and ALK given

flag = 14 CO3 and DIC given

flag = 15 ALK and DIC given

flag = 21 pCO2 and pH given

flag = 22 pCO2 and HCO3 given

flag = 23 pCO2 and CO3 given

flag = 24 pCO2 and ALK given

flag = 25 pCO2 and DIC given

var1

Value of the first variable in mol/kg-soln, except for pH and for pCO2 in μ\muatm

var2

Value of the second variable in mol/kg-soln, except for pH

S

Salinity

T

Temperature in degrees Celsius

Patm

Surface atmospheric pressure in atm, default is 1 atm

P

Hydrostatic pressure in bar (surface = 0)

Pt

Concentration of total phosphate in mol/kg-soln; set to 0 if NA

Sit

Concentration of total silicate in mol/kg-soln; set to 0 if NA

k1k2

"cw" for using K1 and K2 from Cai & Wang (1998), "l" from Lueker et al. (2000), "m02" from Millero et al. (2002), "m06" from Millero et al. (2006), "m10" from Millero (2010), "mp2" from Mojica Prieto et al. (2002), "p18" from Papadimitriou et al. (2018), "r" from Roy et al. (1993), "sb21" from Shockman & Byrne (2021), "s20" from Sulpis et al. (2020), and "w14" from Waters et al. (2014). "x" is the default flag; the default value is then "l", except if T is outside the range 2 to 35oC and/or S is outside the range 19 to 43. In these cases, the default value is "w14".

kf

"pf" for using Kf from Perez and Fraga (1987) and "dg" for using Kf from Dickson and Riley (1979 in Dickson and Goyet, 1994). "x" is the default flag; the default value is then "pf", except if T is outside the range 9 to 33oC and/or S is outside the range 10 to 40. In these cases, the default is "dg".

ks

"d" for using Ks from Dickson (1990) and "k" for using Ks from Khoo et al. (1977), default is "d"

pHscale

"T" for the total scale, "F" for the free scale and "SWS" for using the seawater scale, default is "T" (total scale)

b

Concentration of total boron. "l10" for the Lee et al. (2010) formulation or "u74" for the Uppstrom (1974) formulation, default is "u74"

gas

used to indicate the convention for INPUT pCO2, i.e., when it is an input variable (flags 21 to 25): "insitu" indicates it is referenced to in situ pressure and in situ temperature; "potential" indicates it is referenced to 1 atm pressure and potential temperature; and "standard" indicates it is referenced to 1 atm pressure and in situ temperature. All three options should give identical results at surface pressure. This option is not used when pCO2 is not an input variable (flags 1 to 15). The default is "potential".

NH4t

Concentration of total ammonium in mol/kg-soln; set to 0 if NA

HSt

Concentration of total hydrogen sulfide in mol/kg-soln; set to 0 if NA

Details

The Lueker et al. (2000) constants for K1 and K2, the Perez and Fraga (1987) constant for Kf and the Dickson (1990) constant for Ks are recommended by Dickson et al. (2007). It is, however, critical to consider that each formulation is only valid for specific ranges of temperature and salinity:

For K1 and K2:

  • Cai and Wang (1998): S ranging between 0 and 40 and T ranging between 0.2 and 30oC.

  • Lueker et al. (2000): S ranging between 19 and 43 and T ranging between 2 and 35oC.

  • Millero et al. (2002): S ranging from 34 to 37 and T ranging between -1.6 and 35oC.

  • Millero et al. (2006): S ranging between 0.1 and 50 and T ranging between 1 and 50oC.

  • Millero (2010): S ranging between 1 and 50 and T ranging between 0 and 50oC. Millero (2010) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

  • Mojica Prieto et al. (2002): S ranging from 5 to 42 and T ranging between 0 and 45oC.

  • Papadimitriou et al. (2018): S ranging from 33 to 100 and T ranging between -6 to 25oC.

  • Roy et al. (1993): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Shockman & Byrne (2021): for K2, S ranging from 19.6 to 41 and T ranging between 15 to 35oC. For K1, formulation is that of Waters et al.

  • Sulpis et al. (2020): S ranging from 30.7 to 37.6 and T ranging between -1.7 to 31.8oC.

  • Waters et al.(2014): S ranging between 1 and 50 and T ranging between 0 and 50oC. Waters (2014) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

For Kf:

  • Perez and Fraga (1987): S ranging between 10 and 40 and T ranging between 9 and 33oC.

  • Dickson and Riley (1979 in Dickson and Goyet, 1994): S ranging between 0 and 45 and T ranging between 0 and 45oC.

For Ks:

  • Dickson (1990): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Khoo et al. (1977): S ranging between 20 and 45 and T ranging between 5 and 40oC.

The arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It is recommended to use either vectors with the same dimension or one vector for one argument and numbers for the other arguments.

Pressure corrections and pH scale:

  • For K0, the pressure correction term of Weiss (1974) is used.

  • For K1, K2, pK1, pK2, pK3, Kw, Kb, Khs, Ksi and K2si, the pressure correction was applied on the seawater scale. Hence, if needed, values were first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kf, the pressure correction was applied on the free scale. The formulation of Dickson and Riley (1979 in Dickson and Goyet, 1994) provides Kf on the free scale but that of Perez and Fraga (1987) provides it on the total scale. Hence, in that case, Kf was first transformed from the total scale to the free scale. With both formulations, the pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Ks, the pressure correction was applied on the free scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kn, the pressure correction was applied on the seawater scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

Value

The function returns a data frame containing the following columns:

S

Salinity

T

Temperature in degrees Celsius

Patm

Surface atmospheric pressure in atm

P

Hydrostatic pressure in bar

pH

pH

CO2

CO2 concentration (mol/kg-soln)

pCO2

"standard" pCO2, CO2 partial pressure computed at in situ temperature and atmospheric pressure (μ\muatm)

fCO2

"standard" fCO2, CO2 fugacity computed at in situ temperature and atmospheric pressure (μ\muatm)

pCO2pot

"potential" pCO2, CO2 partial pressure computed at potential temperature and atmospheric pressure (μ\muatm)

fCO2pot

"potential" fCO2, CO2 fugacity computed at potential temperature and atmospheric pressure (μ\muatm)

pCO2insitu

"in situ" pCO2, CO2 partial pressure computed at in situ temperature and total pressure (atm + hydrostatic) (μ\muatm)

fCO2insitu

"in situ" fCO2, CO2 fugacity computed at in situ temperature and total pressure (atm + hydrostatic) (μ\muatm)

HCO3

HCO3 concentration (mol/kg-soln)

CO3

CO3 concentration (mol/kg-soln)

DIC

DIC concentration (mol/kg-soln)

ALK

ALK, total alkalinity (mol/kg-soln)

OmegaAragonite

Omega aragonite, aragonite saturation state

OmegaCalcite

Omega calcite, calcite saturation state

NH4

NH4 concentration (mol/kg-soln)

NH3

NH3 concentration (mol/kg-soln)

BOH3

B(OH)3 concentration (mol/kg-soln)

BOH4

B(OH)4 concentration (mol/kg-soln)

H3PO4

H3PO4 concentration (mol/kg-soln)

H2PO4

H2PO4 concentration (mol/kg-soln)

HPO4

HPO4 concentration (mol/kg-soln)

PO4

PO4 concentration (mol/kg-soln)

H2S

H2S concentration (mol/kg-soln)

HS

HS concentration (mol/kg-soln)

SiOH4

SiOH4 concentration (mol/kg-soln)

SiOOH3

SiOOH3 concentration (mol/kg-soln)

SiO2OH2

SiO2OH2 concentration (mol/kg-soln)

HF

HF concentration (mol/kg-soln)

F

F concentration (mol/kg-soln)

HSO4

HSO4 concentration (mol/kg-soln)

SO4

SO4 concentration (mol/kg-soln)

H

H concentration at specified pH scale (mol/kg-soln)

OH

OH concentration (mol/kg-soln)

NH4t

Supplied NHt concentration (mol/kg-soln); values are recycled if necessary

BOR

Calculated total borate concentration (mol/kg-soln)

Pt

Supplied Pt concentration (mol/kg-soln); values are recycled if necessary

HSt

Supplied HSt concentration (mol/kg-soln); values are recycled if necessary

Sit

Supplied Sit concentration (mol/kg-soln); values are recycled if necessary

FLUO

Calculated total fluoride concentration (mol/kg-soln)

ST

Calculated total sulfate concentration (mol/kg-soln)

Note

Warning: pCO2 estimates below 100 m are subject to considerable uncertainty. See Weiss (1974) and Orr et al. (2014)

Author(s)

Heloise Lavigne, James Orr, Mathilde Hagens and Jean-Pierre Gattuso [email protected]

References

Cai W. J., and Wang Y., 1998. The chemistry, fluxes, and sources of carbon dioxide in the estuarine waters of the Satilla and Altamaha Rivers, Georgia. Limnology and Oceanography 43, 657-668.

Dickson A. G. and Riley J. P., 1979 The estimation of acid dissociation constants in seawater media from potentiometric titrations with strong base. I. The ionic product of water. Marine Chemistry 7, 89-99.

Dickson A. G., 1990 Standard potential of the reaction: AgCI(s) + 1/2H2(g) = Ag(s) + HCI(aq), and the standard acidity constant of the ion HSO4 in synthetic sea water from 273.15 to 318.15 K. Journal of Chemical Thermodynamics 22, 113-127.

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Khoo H. K., Ramette R. W., Culberson C. H. and Bates R. G., 1977 Determination of Hydrogen Ion Concentration in Seawater from 5 to 40oC: Standard Potentials at Salinities from 20 to 45. Analytical Chemistry 22, vol49 29-34.

Lee K., Tae-Wook K., Byrne R.H., Millero F.J., Feely R.A. and Liu Y-M, 2010 The universal ratio of the boron to chlorinity for the North Pacific and North Atlantoc oceans. Geochimica et Cosmochimica Acta 74 1801-1811.

Lueker T. J., Dickson A. G. and Keeling C. D., 2000 Ocean pCO2 calculated from dissolved inorganic carbon, alkalinity, and equations for K1 and K2: validation based on laboratory measurements of CO2 in gas and seawater at equilibrium. Marine Chemistry 70 105-119.

Millero F. J., 1995. Thermodynamics of the carbon dioxide system in the oceans. Geochimica Cosmochimica Acta 59: 661-677.

Millero F. J., 2010. Carbonate constant for estuarine waters. Marine and Freshwater Research 61: 139-142.

Millero F. J., Graham T. B., Huang F., Bustos-Serrano H. and Pierrot D., 2006. Dissociation constants of carbonic acid in seawater as a function of salinity and temperature. Marine Chemistry 100, 80-84.

Orr J. C., Epitalon J.-M. and Gattuso J.-P., 2014. Comparison of seven packages that compute ocean carbonate chemistry. Biogeosciences Discussions 11, 5327-5397.

Perez F. F. and Fraga F., 1987 Association constant of fluoride and hydrogen ions in seawater. Marine Chemistry 21, 161-168.

Roy R. N., Roy L. N., Vogel K. M., Porter-Moore C., Pearson T., Good C. E., Millero F. J. and Campbell D. M., 1993. The dissociation constants of carbonic acid in seawater at salinities 5 to 45 and temperatures 0 to 45oC. Marine Chemistry 44, 249-267.

Schockman, K.M., Byrne, R.H., 2021. Spectrophotometric determination of the bicarbonate dissociation constant in seawater, Geochimica et Cosmochimica Acta.

Uppstrom L.R., 1974 The boron/chlorinity ratio of the deep-sea water from the Pacific Ocean. Deep-Sea Research I 21 161-162.

Waters, J., Millero, F. J., and Woosley, R. J., 2014. Corrigendum to “The free proton concentration scale for seawater pH”, [MARCHE: 149 (2013) 8-22], Mar. Chem. 165, 66-67.

Weiss, R. F., 1974. Carbon dioxide in water and seawater: the solubility of a non-ideal gas, Mar. Chem., 2, 203-215.

Weiss, R. F. and Price, B. A., 1980. Nitrous oxide solubility in water and seawater, Mar. Chem., 8, 347-359.

Zeebe R. E. and Wolf-Gladrow D. A., 2001 CO2 in seawater: equilibrium, kinetics, isotopes. Amsterdam: Elsevier, 346 pp.

Examples

## With a couple of variables
carbfull(flag=8, var1=8.2, var2=0.00234, S=35, T=25, P=0, Patm=1.0, Pt=0, Sit=0,
	pHscale="T", kf="pf", k1k2="l", ks="d", b="u74", gas="potential", NH4t=0, HSt=0)

## With a couple of variables and non-zero nutrient concentrations
carbfull(flag=8, var1=8.2, var2=0.00234, S=35, T=25, P=0, Patm=1.0, Pt=5e-6, Sit=2e-6,
	pHscale="T", kf="pf", k1k2="l", ks="d", b="u74", gas="potential", NH4t=10e-6, HSt=0.1e-6)

## Using vectors as arguments
flag <- c(8, 2, 8)
var1 <- c(8.2, 7.477544e-06, 8.2)
var2 <- c(0.002343955, 0.001649802, 2400e-6)
S <- c(35, 35, 30)
T <- c(25, 25, 30)
P <- c(0, 0, 0)
Pt <- c(0, 0, 0)
Sit <- c(0, 0, 0)
kf <- c("pf", "pf", "pf")
k1k2 <- c("l", "l", "l")
pHscale <- c("T", "T", "T")
b <- c("l10", "l10", "l10")
gas <- c("potential", "potential", "potential")
NH4t <- c(0, 0, 0)
HSt <- c(0, 0, 0)
carbfull(flag=flag, var1=var1, var2=var2, S=S, T=T, P=P, Pt=Pt, Sit=Sit, 
  kf=kf, k1k2=k1k2, pHscale=pHscale, b=b, gas=gas, NH4t=NH4t, HSt=HSt)

## Test with all flags 
flag <- c((1:15), (21:25))
var1 <- c(8.200000, 7.308171e-06, 7.308171e-06, 7.308171e-06, 7.308171e-06, 
	8.2, 8.2, 8.2, 8.2, 0.001646857, 0.001646857, 0.001646857, 0.0002822957, 
	0.0002822957, 0.00234, 258.2164, 258.2164, 258.2164, 258.2164, 258.2164 )
var2 <- c(7.308171e-06, 0.001646857, 0.0002822957, 0.00234, 0.001936461, 
	0.001646857, 0.0002822957, 0.00234, 0.001936461, 0.0002822957, 
	0.00234, 0.001936461,  0.00234, 0.001936461, 0.001936461, 8.2, 
	0.001646857, 0.0002822957, 0.00234, 0.001936461)
carbfull(flag=flag, var1=var1, var2=var2)

Converts depth in meters to pressure in dbar

Description

Converts depth in meters to pressure in dbar

Usage

d2p(depth, lat=40)

Arguments

depth

Depth in meters

lat

Latitude in degrees, N and S is irrelevant, default is 40o

Value

pressure

Pressure corresponding to the depth given, in dbar

Author(s)

Heloise Lavigne and Jean-Pierre Gattuso [email protected]

References

Saunders P. M., 1981. Practical conversion of pressure to depth. J. Phys. Oceanogr. 11: 573-574.

See Also

p2d

Examples

d2p(depth=7500, lat=30)

Numerical derivatives of seawater carbonate system variables

Description

Returns numerical derivatives of the seawater carbonate system output variables with respect to input variables.

Usage

derivnum(varid, flag, var1, var2, S=35, T=25, Patm=1, P=0, Pt=0, Sit=0,
       k1k2="x", kf="x", ks="d", pHscale="T", b="u74", gas="potential", warn="y", 
       eos = "eos80", long = 1e+20, lat = 1e+20)

Arguments

varid

Variable length, case insensitive, character identificator of variable with respect to which derivatives are requested. Possible values are:

'1' or 'var1' : Variable 1 of the input pair (This is TAlk if flag is 15)

'2' or 'var2' : Variable 2 of the input pair (This is DIC if flag is 15)

'sil', 'silt', 'tsil' or 'silicate' : Total silicate concentration

'phos', 'phost', 'tphos' or 'phosphate' : Total phosphate concentration

't', 'temp' or 'temperature' : temperature

's', 'sal' or 'salinity' : salinity

'K0','K1','K2','Kb','Kw','Kspa' or 'Kspc' : one of the dissociation constants

'bor' : total boron

flag

select the input pair of carbonate-system variables available by choosing the following flag:

flag = 1 pH and CO2 given

flag = 2 CO2 and HCO3 given

flag = 3 CO2 and CO3 given

flag = 4 CO2 and ALK given

flag = 5 CO2 and DIC given

flag = 6 pH and HCO3 given

flag = 7 pH and CO3 given

flag = 8 pH and ALK given

flag = 9 pH and DIC given

flag = 10 HCO3 and CO3 given

flag = 11 HCO3 and ALK given

flag = 12 HCO3 and DIC given

flag = 13 CO3 and ALK given

flag = 14 CO3 and DIC given

flag = 15 ALK and DIC given

flag = 21 pCO2 and pH given

flag = 22 pCO2 and HCO3 given

flag = 23 pCO2 and CO3 given

flag = 24 pCO2 and ALK given

flag = 25 pCO2 and DIC given

var1

Value of the first variable in mol/kg, except for pH and for pCO2 in μ\muatm

var2

Value of the second variable in mol/kg, except for pH

S

Salinity

T

Temperature in degrees Celsius

Patm

Surface atmospheric pressure in atm, default is 1 atm

P

Hydrostatic pressure in bar (surface = 0)

Pt

Concentration of total phosphate in mol/kg; set to 0 if NA

Sit

Concentration of total silicate in mol/kg; set to 0 if NA

k1k2

"cw" for using K1 and K2 from Cai & Wang (1998), "l" from Lueker et al. (2000), "m02" from Millero et al. (2002), "m06" from Millero et al. (2006), "m10" from Millero (2010), "mp2" from Mojica Prieto et al. (2002), "p18" from Papadimitriou et al. (2018), "r" from Roy et al. (1993), "sb21" from Shockman & Byrne (2021), "s20" from Sulpis et al. (2020), and "w14" from Waters et al. (2014). "x" is the default flag; the default value is then "l", except if T is outside the range 2 to 35oC and/or S is outside the range 19 to 43. In these cases, the default value is "w14".

kf

"pf" for using Kf from Perez and Fraga (1987) and "dg" for using Kf from Dickson and Riley (1979 in Dickson and Goyet, 1994). "x" is the default flag; the default value is then "pf", except if T is outside the range 9 to 33oC and/or S is outside the range 10 to 40. In these cases, the default is "dg".

ks

"d" for using Ks from Dickson (1990) and "k" for using Ks from Khoo et al. (1977), default is "d"

pHscale

"T" for the total scale, "F" for the free scale and "SWS" for using the seawater scale, default is "T" (total scale)

b

Concentration of total boron. "l10" for the Lee et al. (2010) formulation or "u74" for the Uppstrom (1974) formulation, default is "u74"

gas

used to indicate the convention for INPUT pCO2, i.e., when it is an input variable (flags 21 to 25): "insitu" indicates it is referenced to in situ pressure and in situ temperature; "potential" indicates it is referenced to 1 atm pressure and potential temperature; and "standard" indicates it is referenced to 1 atm pressure and in situ temperature. All three options should give identical results at surface pressure. This option is not used when pCO2 is not an input variable (flags 1 to 15). The default is "potential".

warn

"y" to show warnings when T or S go beyond the valid range for constants; "n" to supress warnings. The default is "y".

eos

"teos10" to specify T and S according to Thermodynamic Equation Of Seawater - 2010 (TEOS-10); "eos80" to specify T and S according to EOS-80.

long

longitude of data point, used when eos parameter is "teos10" as a conversion parameter from absolute to practical salinity.

lat

latitude of data point, used when eos parameter is "teos10".

Details

This subroutine has same input parameters as subroutine carb(). For details on these parameters, refer to documentation of 'carb'.

This subroutine computes partial derivatives of each output variable with respect to each of the input variable (including each of the two chosen carbonate system variables, each of the nutrients (total silicon and total phosphorus), temperature, and salinity.

It computes these derivatives (dy/dx) using the method of central differences, i.e.,

  • for dx, it adds a positive and negative perturbation, same and equal in magnitude, to each input variable, one at a time, and

  • for dy, it then computes the corresponding induced change in output variables

All arguments but the first (varid), can be given as scalers or vectors. If the lengths of the vectors differs, only the longest vector is retained and the other arguments are set equal to the first value of the other vectors are used. Hence users should use either vectors with the same dimension or one vector for one argument and scalars for others; otherwise, results may not be as intended.

long and lat are used as conversion parameters from absolute to practical salinity: when seawater is not of standard composition, practical salinity alone is not sufficient to compute absolute salinity and vice-versa. One needs to know the density. When long and lat are given, density is inferred from WOA silicate concentration at given location. When they are not, an arbitrary geographic point is chosen: mid equatorial Atlantic. Note that this implies an error on computed salinity up to 0.02 g/kg.

Value

The function returns a data frame containing the following columns:

H

derivative of [H+] concentration (mol/kg/...)

pH

derivative of pH

CO2

derivative of CO2 concentration (mol/kg/...)

pCO2

"standard" pCO2, CO2 partial pressure computed at in situ temperature and atmospheric pressure (μ\muatm/...)

fCO2

"standard" fCO2, CO2 fugacity computed at in situ temperature and atmospheric pressure (μ\muatm/...)

HCO3

derivative of HCO3 concentration (mol/kg/...)

CO3

derivative of CO3 concentration (mol/kg/...)

DIC

derivative of DIC concentration (mol/kg/...)

ALK

derivative of ALK, total alkalinity (mol/kg/...)

OmegaAragonite

derivative of Omega aragonite, aragonite saturation state

OmegaCalcite

derivative of Omega calcite, calcite saturation state

If all input data have the same 'flag' value, returned data frame does not show derivatives of input pair of carbonate system variables. For example, if all input flags are 15, the input pair is DIC and ALK; hence, derivatives of DIC and ALK are not returned.

Units of derivative dy/dx is unit(y)/unit(x) where unit(x) are as follows:

degree C

when x is Temperature

psu

when x is Salinity

uatm

when x is pCO2

mol/kg

for all other cases

Author(s)

Jean-Marie Epitalon, James Orr, and Jean-Pierre Gattuso[email protected]

References

Cai W. J., and Wang Y., 1998. The chemistry, fluxes, and sources of carbon dioxide in the estuarine waters of the Satilla and Altamaha Rivers, Georgia. Limnology and Oceanography 43, 657-668.

Dickson A. G. and Riley J. P., 1979 The estimation of acid dissociation constants in seawater media from potentiometric titrations with strong base. I. The ionic product of water. Marine Chemistry 7, 89-99.

Dickson A. G., 1990 Standard potential of the reaction: AgCI(s) + 1/2H2(g) = Ag(s) + HCI(aq), and the standard acidity constant of the ion HSO4 in synthetic sea water from 273.15 to 318.15 K. Journal of Chemical Thermodynamics 22, 113-127.

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Khoo H. K., Ramette R. W., Culberson C. H. and Bates R. G., 1977 Determination of Hydrogen Ion Concentration in Seawater from 5 to 40oC: Standard Potentials at Salinities from 20 to 45. Analytical Chemistry 22, vol49 29-34.

Lee K., Tae-Wook K., Byrne R.H., Millero F.J., Feely R.A. and Liu Y-M, 2010 The universal ratio of the boron to chlorinity for the North Pacific and North Atlantoc oceans. Geochimica et Cosmochimica Acta 74 1801-1811.

Lueker T. J., Dickson A. G. and Keeling C. D., 2000 Ocean pCO2 calculated from dissolved inorganic carbon, alkalinity, and equations for K1 and K2: validation based on laboratory measurements of CO2 in gas and seawater at equilibrium. Marine Chemistry 70 105-119.

Millero F. J., 1995. Thermodynamics of the carbon dioxide system in the oceans. Geochimica Cosmochimica Acta 59: 661-677.

Millero F. J., 2010. Carbonate constant for estuarine waters. Marine and Freshwater Research 61: 139-142.

Millero F. J., Graham T. B., Huang F., Bustos-Serrano H. and Pierrot D., 2006. Dissociation constants of carbonic acid in seawater as a function of salinity and temperature. Marine Chemistry 100, 80-84.

Orr J. C., Epitalon J.-M. and Gattuso J.-P., 2015. Comparison of seven packages that compute ocean carbonate chemistry. Biogeosciences 12, 1483-1510.

Perez F. F. and Fraga F., 1987 Association constant of fluoride and hydrogen ions in seawater. Marine Chemistry 21, 161-168.

Roy R. N., Roy L. N., Vogel K. M., Porter-Moore C., Pearson T., Good C. E., Millero F. J. and Campbell D. M., 1993. The dissociation constants of carbonic acid in seawater at salinities 5 to 45 and temperatures 0 to 45oC. Marine Chemistry 44, 249-267.

Schockman, K.M., Byrne, R.H., 2021. Spectrophotometric determination of the bicarbonate dissociation constant in seawater, Geochimica et Cosmochimica Acta.

Uppstrom L.R., 1974 The boron/chlorinity ratio of the deep-sea water from the Pacific Ocean. Deep-Sea Research I 21 161-162.

Waters, J., Millero, F. J., and Woosley, R. J., 2014. Corrigendum to “The free proton concentration scale for seawater pH”, [MARCHE: 149 (2013) 8-22], Marine Chemistry, 165, 66-67.

Weiss, R. F., 1974. Carbon dioxide in water and seawater: the solubility of a non-ideal gas, Marine Chemistry, 2, 203-215.

Weiss, R. F. and Price, B. A., 1980. Nitrous oxide solubility in water and seawater, Marine Chemistry, 8, 347-359.

Zeebe R. E. and Wolf-Gladrow D. A., 2001 CO2 in seawater: equilibrium, kinetics, isotopes. Amsterdam: Elsevier, 346 pp.

Examples

## 1) For the input pair ALK and DIC (var1 and var2 when flag=15)
##    compute derivatives of all output varialbes 
##    with respect to DIC (i.e., var2)
derivnum(varid='var2', flag=15, var1=2300e-6, var2=2000e-6, 
         S=35, T=25, P=0, Patm=1.0, Pt=0, Sit=0,
         pHscale="T", kf="pf", k1k2="l", ks="d", b="u74")

## 2) For the input pair pH and ALK (var1 and var2 when flag=8)
##    compute derivatives of all output variables 
##    with respect to [H+] concentration
derivnum(varid='var1', flag=8, var1=8.2, var2=0.00234, 
         S=35, T=25, P=0, Patm=1.0, Pt=0, Sit=0,
         pHscale="T", kf="pf", k1k2="l", ks="d", b="u74")

## 3) Using vectors as arguments and compute derivatives of all output 
##    variables with respect to temperature
flag <- c(8, 2, 8)
var1 <- c(8.2, 7.477544e-06, 8.2)
var2 <- c(0.002343955, 0.001649802, 2400e-6)
S <- c(35, 35, 30)
T <- c(25, 25, 30)
P <- c(0, 0, 0)
Pt <- c(0, 0, 0)
Sit <- c(0, 0, 0)
kf <- c("pf", "pf", "pf")
k1k2 <- c("l", "l", "l")
pHscale <- c("T", "T", "T")
b <- c("u74", "u74", "u74")
derivnum(varid='T', flag=flag, var1=var1, var2=var2, S=S, T=T, P=P,
         Pt=Pt, Sit=Sit, kf=kf, k1k2=k1k2, pHscale=pHscale, b=b)

# For more examples of use of derivnum.R,
# consult the code of seacarb's errors routine.

Convert temperature and salinity from EOS-80 to TEOS-10

Description

Converts in situ temperature to conservative temperature and practical to absolute salinity (SA). Salinity conversion depends on total alkalinity as well as the concentrations of dissolved inorganic carbon, nitrate and silicate.

Usage

eos2teos_chem(SP, T, P=0, TA=2300e-6, DIC=2000e-6, NO3=0, SIOH4=0)

Arguments

SP

Practical salinity on the practical salinity scale

T

In situ temperature in deg. C

P

Sea water pressure in dbar

TA

Total alkalinity, in mol/kg, default is 2300 µmol/kg

DIC

Dissolved inorganic carbon concentration in mol/kg, default is 2000 µmol/kg

NO3

Total nitrate concentration in mol/kg, default is 0

SIOH4

Total silicate concentration in mol/kg, default is 0

Details

Conversion from practical to absolute salinity depends on carbonate system parameters and ion concentration which mostly affect water density anomalies.

Value

The function returns a data frame containing the following columns:

CT

Conservative temperature (deg C)

SA

Absolute salinity (g/kg)

Author(s)

Jean-Marie Epitalon

References

McDougall T. J., Jackett D. R., Millero F. J., Pawlowicz R. and Barker P. M., 2012. A global algorithm for estimating Absolute Salinity. Ocean Science 8, 1123-1134.

Pawlowicz R., Wright D. G. and Millero F. J., 2011. The effects of biogeochemical processes on oceanic conductivity/salinity/density relationships and the characterization of real seawater. Ocean Science 7, 363-387.

Pawlowicz R., 2013. What every oceanographer needs to know about TEOS-10 (The TEOS-10 Primer). http://www.teos-10.org/

See Also

teos2eos_chem does the reverse, eos2teos_geo, sp2sa_chem

package gsw

Examples

# Calculate Conservative Temperature and Absolute Salinity of a sample with 
   # Practical salinity of 35 psu, in-situ temperature of 18 deg C,
   # at 0 dbar and total alkalinity of 0.00234 mol/kg and DIC of 0.00202 mol/kg
   f <- eos2teos_chem(SP=35, T=18, P=0, TA=0.00234, DIC=0.00202)
   CT <- f$CT     # Conservative Temperature
   SA <- f$SA     # Absolute Salinity

Convert temperature and salinity from EOS-80 to TEOS-10

Description

Converts in situ to conservative temperature and practical to absolute salinity (SA). Salinity conversion depends on depth and geographic location.

Usage

eos2teos_geo(SP, T, P=0, long=1.e20, lat=1.e20)

Arguments

SP

Practical salinity on the practical salinity scale

T

In situ temperature in deg. C

P

Sea water pressure in dbar

long

Longitude in decimal degrees [ 0 ... +360 ] or [ -180 ... +180 ]

lat

Latitude in decimal degrees [-90 ... 90]

Details

Conversion from practical to absolute salinity depends on water density anomaly which is correlated with silicate concentration. This function relies on silicate concentration taken from WOA (World Ocean Atlas) to evaluate density anomaly.

Value

The function returns a data frame containing the following columns:

CT

Conservative temperature (deg C)

SA

Absolute salinity (g/kg)

Author(s)

Jean-Marie Epitalon

References

McDougall T. J., Jackett D. R., Millero F. J., Pawlowicz R. and Barker P. M., 2012. A global algorithm for estimating Absolute Salinity. Ocean Science 8, 1123-1134.

Pawlowicz R., 2013. What every oceanographer needs to know about TEOS-10 (The TEOS-10 Primer). http://www.teos-10.org/

See Also

teos2eos_geo does the reverse, eos2teos_chem, sp2sa_geo, package gsw

Examples

# Calculate conservative temperature and absolute salinity of a sample with 
   # Practical salinity of 35 psu, in situ temperature of 18 deg C,
   # depth is 10 dbar and location is 188 degrees East and 4 degrees North.
   f <- eos2teos_geo(SP=35, T=18, P=10, long=188, lat=4)
   CT <- f$CT     # Conservative temperature
   SA <- f$SA     # Absolute salinity

Uncertainty propagation for computed marine carbonate system variables

Description

Estimates combined standard uncertainties in computed carbonate system variables by propagating inout uncertainties (standard uncertainties) in six input variables, including (Orr et al., Mar. Chem., in press):

  • the input pair of carbonate system variables,

  • the 2 input nutrients (silicate and phosphate concentrations),

  • temperature and salinity. It also accounts for

  • the errors in the key dissociation constants pK0, pK1, pK2, pKb, pKw, pKspa and pKspc

  • the error in total boron

Usage

errors(flag, var1, var2, S=35, T=25, Patm=1, P=0, Pt=0, Sit=0, 
              evar1=0, evar2=0, eS=0.01, eT=0.01, ePt=0, eSit=0, 
              epK=c(0.002, 0.0075, 0.015, 0.01, 0.01, 0.02, 0.02),
              eBt=0.02, method = "ga", r=0.0, runs=10000,
              k1k2='x', kf='x', ks="d", pHscale="T", b="u74", gas="potential", 
              warn="y", eos = "eos80", long = 1e+20, lat = 1e+20)

Arguments

flag

select the pair of carbonate system input variables. The flags to be used are as follows:

flag = 1 pH and CO2 given

flag = 2 CO2 and HCO3 given

flag = 3 CO2 and CO3 given

flag = 4 CO2 and ALK given

flag = 5 CO2 and DIC given

flag = 6 pH and HCO3 given

flag = 7 pH and CO3 given

flag = 8 pH and ALK given

flag = 9 pH and DIC given

flag = 10 HCO3 and CO3 given

flag = 11 HCO3 and ALK given

flag = 12 HCO3 and DIC given

flag = 13 CO3 and ALK given

flag = 14 CO3 and DIC given

flag = 15 ALK and DIC given

flag = 21 pCO2 and pH given

flag = 22 pCO2 and HCO3 given

flag = 23 pCO2 and CO3 given

flag = 24 pCO2 and ALK given

flag = 25 pCO2 and DIC given

var1

Value of the first variable (in mol/kg, except for pH and for pCO2 in μ\muatm)

var2

Value of the second variable (in mol/kg, except for pH)

S

Salinity (practical salinity scale)

T

Temperature in degrees Celsius

Patm

Surface atmospheric pressure in atm, default is 1 atm

P

Hydrostatic pressure in bar (surface = 0)

Pt

Concentration of total dissolved inorganic phosphorus (mol/kg); set to 0 if NA

Sit

Concentration of total dissolved inorganic silicon (mol/kg); set to 0 if NA

evar1

Standard uncertainty in var1 of input pair of carbonate system variables

evar2

Standard uncertainty in var2 of input pair of carbonate system variables

eS

Standard uncertainty in salinity; default is 0.01

eT

Standard uncertainty in temperature (degree C); default is 0.01

ePt

Standard uncertainty in total dissolved inorganic phosphorus concentration (mol/kg)

eSit

Standard uncertainty in total dissolved inorganic silicon concentration (mol/kg)

epK

Standard uncertainty) in 7 key dissociation constants: pK0, pK1, pK2, pKb, pKw, pKspa and pKspc. This is a vector. The default is c(0.002, 0.0075, 0.015, 0.01, 0.01, 0.02, 0.02).

eBt

Standard uncertainty in total boron, given as a relative fractional error. The default is 0.02, which equates to a 2% error

method

Case insensitive character string to choose the error-propagation method: 1) Gaussian, 2) Method of Moments, or 3) Monte Carlo).
These methods are specified using the 2-letter codes "ga", "mo", or "mc", respectively. The default is "ga" (Gaussian).

r

Correlation coefficient between standard uncertainties of var1 and var2 (only useful with method="mo", i.e., ignored for the 2 other methods, the default is r=0.0

runs

Number of random samples (ignored unless method="mc"; the default is runs=10000

k1k2

"cw" for using K1 and K2 from Cai & Wang (1998), "l" from Lueker et al. (2000), "m02" from Millero et al. (2002), "m06" from Millero et al. (2006), "m10" from Millero (2010), "mp2" from Mojica Prieto et al. (2002), "p18" from Papadimitriou et al. (2018), "r" from Roy et al. (1993), "sb21" from Shockman & Byrne (2021), "s20" from Sulpis et al. (2020), and "w14" from Waters et al. (2014). "x" is the default flag; the default value is then "l", except if T is outside the range 2 to 35oC and/or S is outside the range 19 to 43. In these cases, the default value is "w14".

kf

"pf" for using Kf from Perez and Fraga (1987) and "dg" for using Kf from Dickson and Riley (1979 in Dickson and Goyet, 1994). "x" is the default flag; the default value is then "pf", except if T is outside the range 9 to 33oC and/or S is outside the range 10 to 40. In these cases, the default is "dg".

ks

"d" for using Ks from Dickson (1990) and "k" for using Ks from Khoo et al. (1977), default is "d"

pHscale

"T" for the total scale, "F" for the free scale and "SWS" for using the seawater scale, default is "T" (total scale)

b

Concentration of total boron. "l10" for the Lee et al. (2010) formulation or "u74" for the Uppstrom (1974) formulation, default is "u74"

gas

used to indicate the convention for INPUT pCO2, i.e., when it is an input variable (flags 21 to 25): "insitu" indicates it is referenced to in situ pressure and in situ temperature; "potential" indicates it is referenced to 1 atm pressure and potential temperature; and "standard" indicates it is referenced to 1 atm pressure and in situ temperature. All three options should give identical results at surface pressure. This option is not used when pCO2 is not an input variable (flags 1 to 15). The default is "potential".

warn

"y" to show warnings when T or S go beyond the valid range for constants; "n" to supress warnings. The default is "y".

eos

"teos10" to specify T and S according to Thermodynamic Equation Of Seawater - 2010 (TEOS-10); "eos80" to specify T and S according to EOS-80.

long

longitude of data point, used when eos parameter is "teos10" as a conversion parameter from absolute to practical salinity.

lat

latitude of data point, used when eos parameter is "teos10".

Details

Complete information on routine uncertainty propagation for the marine carbon dioxide system can be found in Orr et al. (in press). This function requires users to specify each input standard uncertainty as either the standard deviation or the standard error of the mean. The latter implies much smaller propagated uncertainties, but is appropriate only when interested in the error in the mean, not the error of a given measurement. Beware that it is easy to fool oneself when using the standard error of the mean rather than the standard deviation.

This function requires different types of standard uncertainties:

  • Standard uncertainties for evar1, evar2, eS, eT, ePt, eSit (same units as the input data, e.g., mol/kg);

  • Standard uncertainties in pK units for epK; and

  • Standard uncertainties in relative fractional units (between 0.0 and 1.0) for eBt.

This function propagates standard uncertainty from input to output variables using one of three methods:

  • Gaussian: The Gaussian method is the standard technique for estimating a computed variable's (z) second moment (its variance or standard deviation) based on a first-order approximation to z. More precisely, we use here the basic 1st order, 2nd moment uncertainty analysis (a type of Taylor expansion), assuming no covariance between input variables. This is the approach used by Dickson and Riley (1978). It is the default method.

  • Method of moments: The method of moments is a more general form of the Gaussian method. But in addition, it also accounts for covariance between input variables. In this case, the 'errors' routine allows the user to specify a value of the correlation coefficient 'r', having a value between -1.0 and 1.0, to indicate the correlation between standard uncertainties of the input pair of carbonate system variables. That correlation is used to compute the covariance. But by default, it is assumed that there is no covariance (r=0.0).

  • Monte Carlo: The Monte Carlo method is a brute-force approach relying on repeated random sampling of input errors, adding those to each input variables, calculating the corresponding output variables for each sample, and finally assessing the standard deviation in each output variables.

This function has many input parameters that are identical to those in the carb function. For their details, refer to the 'carb' documentation.

All parameters may be scalars or vectors except epK, eBt, method, runs, and gas.

  • runs and eBt must be scalars

  • method and gas must each consist of a character string

  • epK may be a vector of 7 values. In that case, it must list errors for pK0, pK1, pK2, pKb, pKw, pKspa and pKspc, respectively. That set of errors is identical for all input data. Alternatively, users may specify 'epK=NULL' or 'epK=0' to set all 7 values to zero and thus neglect errors in the equilibrium constants.

In constrast, for evar1, evar2, r, eS, eT, ePt and eSit:

  • if they are vectors, they represent standard uncertainties associated with each data point

  • if they are scalars (single real numbers), they represent one standard uncertainty value each associated to all data points

The same remark applies to parameter r (correlation coefficient).

long and lat are used as conversion parameters from absolute to practical salinity: when seawater is not of standard composition, practical salinity alone is not sufficient to compute absolute salinity and vice-versa. One needs to know the density. When long and lat are given, density is inferred from WOA silicate concentration at given location. When they are not, an arbitrary geographic point is chosen: mid equatorial Atlantic. Note that this implies an error on computed salinity up to 0.02 g/kg.

Value

The function returns a 2-dimensional dataframe, with the following columns:

H

combined standard uncertainty in [H+] concentration (mol/kg)

pH

combined standard uncertainty in pH

CO2

combined standard uncertainty in CO2 concentration (mol/kg)

pCO2

combined standard uncertainty in "standard" pCO2, CO2 partial pressure computed at in situ temperature and atmospheric pressure (uatm)

fCO2

combined standard uncertainty in "standard" fCO2, CO2 fugacity computed at in situ temperature and atmospheric pressure (uatm)

HCO3

combined standard uncertainty in HCO3 concentration (mol/kg)

CO3

combined standard uncertainty in CO3 concentration (mol/kg)

DIC

combined standard uncertainty in DIC concentration (mol/kg)

ALK

combined standard uncertainty in ALK, total alkalinity (mol/kg)

OmegaAragonite

combined standard uncertainty in Omega aragonite (aragonite saturation state)

OmegaCalcite

combined standard uncertainty in Omega calcite (calcite saturation state)

If all input data have the same 'flag' value, the returned data frame does not show combined standard uncertainties on input pair of carbonate system variables. For example, if all input flags are 15, the input pair is DIC and ALK; hence, errors on DIC and ALK are not returned.

Correlation coefficient

By default, 'r' is zero. However, for some pairs the user may want to specify a different value. For example, measurements of pCO2 and pH are often anti-correlated. The same goes for two other pairs: 'CO2 and CO3' and 'pCO2 and CO3'. But even for these cases, care is needed before using non-zero values of 'r'.

When the user wishes to propagate standard uncertainties for an individual measurement, 'r' should ALWAYS be zero if each member of the input pair is measured independently. In this case, we are interested in the correlation between the uncertainties in those measurements, not in the correlation between the measurements themselves. Uncertainties from those measurements are probably not correlated if they come from different instruments. Conversely, if users are interested in the error in the mean of a distribution of measurements (i.e., if they are propagating standard errors instead of standard deviations), one should then also account for the correlation between the measurements of the two variables of the input pair.

For input pairs where one member is pH (flags 1, 6, 7, 8, 9, and 21), this 'errors' function automatically inverses the sign of 'r'. The reason for that is that the associated derivatives are computed in terms of the hydrogen ion concentration (H+), not pH. Therefore for each of these 6 flags, if the user wants to compute their own 'r' that should be done by (1) using the H+ concentration instead of pH, and (2) inversing the sign of that computed 'r' before passing it as an argument to this routine. Usually though (when not calculating r for pH), the user may just use the 'r' in the expected way. For example, to include the covariance term when there is a perfect anticorrelation of pH with pCO2, one would use 'r=-1.0'.

Computation time

Computation time depends on the method chosen; the Monte Carlo method takes much longer to execute. The computational time required for the Monte Carlo method is proportional to the number of runs. More runs, implies improved accuracy: runs = 10000 appears a minimum to obtain an accuracy of less than 1%. Accuracy is inversely proportional to the number of runs.

Computation time also depends on the chosen pair of input variables. For example, with the input pair DIC and Total alkalinity (flag=15), it is much longer than for input pair pH and Total alkalinity (flag=8)

Author(s)

Jean-Marie Epitalon, James Orr, and Jean-Pierre Gattuso[email protected]

References

Cai W. J., and Wang Y., 1998. The chemistry, fluxes, and sources of carbon dioxide in the estuarine waters of the Satilla and Altamaha Rivers, Georgia. Limnology and Oceanography 43, 657-668.

Dickson, A. G. and Riley, J. P., 1978 The effect of analytical error on the evaluation of the components of the aquatic carbon-dioxide system, Marine Chemistry, 6, 77-85.

Dickson A. G. and Riley J. P., 1979 The estimation of acid dissociation constants in seawater media from potentiometric titrations with strong base. I. The ionic product of water. Marine Chemistry 7, 89-99.

Dickson A. G., 1990 Standard potential of the reaction: AgCI(s) + 1/2H2(g) = Ag(s) + HCI(aq), and the standard acidity constant of the ion HSO4 in synthetic sea water from 273.15 to 318.15 K. Journal of Chemical Thermodynamics 22, 113-127.

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Khoo H. K., Ramette R. W., Culberson C. H. and Bates R. G., 1977 Determination of hydrogen ion concentration in seawater from 5 to 40oC: standard potentials at salinities from 20 to 45. Analytical Chemistry 22, vol49 29-34.

Lee K., Tae-Wook K., Byrne R.H., Millero F.J., Feely R.A. and Liu Y-M, 2010 The universal ratio of the boron to chlorinity for the North Pacific and North Atlantoc oceans. Geochimica et Cosmochimica Acta 74 1801-1811.

Lueker T. J., Dickson A. G. and Keeling C. D., 2000 Ocean pCO2 calculated from dissolved inorganic carbon, alkalinity, and equations for K1 and K2: validation based on laboratory measurements of CO2 in gas and seawater at equilibrium. Marine Chemistry 70 105-119.

Millero F. J., 1995. Thermodynamics of the carbon dioxide system in the oceans. Geochimica Cosmochimica Acta 59: 661-677.

Millero F. J., 2010. Carbonate constant for estuarine waters. Marine and Freshwater Research 61: 139-142.

Millero F. J., Graham T. B., Huang F., Bustos-Serrano H. and Pierrot D., 2006. Dissociation constants of carbonic acid in seawater as a function of salinity and temperature. Marine Chemistry 100, 80-84.

Orr J. C., Epitalon J.-M., Dickson A. and Gattuso J.-P., in press. Routine uncertainty propagation for the marine carbon dioxide system. Marine Chemistry.

Orr J. C., Epitalon J.-M. and Gattuso J.-P., 2015. Comparison of seven packages that compute ocean carbonate chemistry. Biogeosciences 12, 1483-1510.

Perez F. F. and Fraga F., 1987 Association constant of fluoride and hydrogen ions in seawater. Marine Chemistry 21, 161-168.

Roy R. N., Roy L. N., Vogel K. M., Porter-Moore C., Pearson T., Good C. E., Millero F. J. and Campbell D. M., 1993. The dissociation constants of carbonic acid in seawater at salinities 5 to 45 and temperatures 0 to 45oC. Marine Chemistry 44, 249-267.

Schockman, K.M., Byrne, R.H., 2021. Spectrophotometric determination of the bicarbonate dissociation constant in seawater, Geochimica et Cosmochimica Acta.

Uppstrom L.R., 1974 The boron/chlorinity ratio of the deep-sea water from the Pacific Ocean. Deep-Sea Research I 21 161-162.

Waters, J., Millero, F. J., and Woosley, R. J., 2014. Corrigendum to “The free proton concentration scale for seawater pH”, [MARCHE: 149 (2013) 8-22], Marine Chemistry, 165, 66-67.

Weiss, R. F., 1974. Carbon dioxide in water and seawater: the solubility of a non-ideal gas, Marine Chemistry, 2, 203-215.

Weiss, R. F. and Price, B. A., 1980. Nitrous oxide solubility in water and seawater, Marine Chemistry, 8, 347-359.

Zeebe R. E. and Wolf-Gladrow D. A., 2001 CO2 in seawater: equilibrium, kinetics, isotopes. Amsterdam: Elsevier, 346 pp.

Examples

## 1) For the input pair ALK and DIC (var1 and var2 when flag=15),
## compute resulting uncertainty from given uncertainty on ALK and DIC (5 umol/kg)
## and default uncertainties in dissociation constants and total boron
## using the default method (Gaussian)
errors(flag=15, var1=2300e-6, var2=2000e-6, S=35, T=25, P=0, Patm=1.0, Pt=0, Sit=0, 
       evar1=5e-6, evar2=5e-6, eS=0, eT=0, ePt=0, eSit=0, 
       pHscale="T", kf="pf", k1k2="l", ks="d", b="u74")
## Typical output:
## H             pH          CO2           fCO2      pCO2      HCO3          ...
## 3.721614e-10  0.01796767  5.441869e-07  19.25338  19.31504  9.170116e-06  ...

## 2) Do the same as in one, but assign a 4% uncertainty to total boron
##    This uncertainty is the amount by which estimates from Lee et al (2010) and 
##    Uppstrom (1974) differ. The default for the latter is eBt=0.02.
errors(flag=15, var1=2300e-6, var2=2000e-6, S=35, T=25, P=0, Patm=1.0, Pt=0, Sit=0, 
       evar1=5e-6, evar2=5e-6, eS=0, eT=0, ePt=0, eSit=0, eBt=0.04,
       pHscale="T", kf="pf", k1k2="l", ks="d", b="u74")

## 3) For the input pair pH and ALK (var1 and var2 when flag=8)
## compute standard errors in output variables from errors in input variables, i.e., 
## for pH (0.005 pH units) and in ALK (5 umol/kg), along with
## errors in total dissolved inorganic phosphorus (0.1 umol/kg) and
## total dissolved inorganic silicon (2 umol/kg) concentrations, while
## assuming no uncertainty in dissociation constants & boron, using the Gaussian method:
errors(flag=8, var1=8.25, var2=2300e-6,  S=35, T=25, P=0, Patm=1.0, Pt=0, Sit=0, 
       evar1=0.005, evar2=5e-6, eS=0, eT=0, ePt=0.1, eSit=2, epK=0, eBt=0,
       method="ga", pHscale="T", kf="pf", k1k2="l", ks="d", b="u74")

## 4) For the input pair pCO2 and pH (var1 and var2 when flag=21)
## compute standard errors in output variables from errors in input variables, i.e., 
## for pCO2 (2 uatm) and pH (0.005 pH units), with no uncertainties in Pt and Sit
## nor in the dissociation constants BUT a perfect anticorrelation between pCO2 and pH,
## (the input pair) using the Method of moments:
errors(flag=21, var1=400, var2=8.1,  S=35, T=25, P=0, Patm=1.0, Pt=0, Sit=0, 
       evar1=2, evar2=0.005, eS=0, eT=0, ePt=0.0, eSit=0, epK=0, eBt=0, 
       method="mo", r=-1.0, pHscale="T", kf="pf", k1k2="l", ks="d", b="u74")

## 5) Use vectors as arguments and compute errors on all output variables
## using Monte Carlo method taking into account input errors on pH, ALK, DIC
## and dissociation constants (pKx)
flag <- c(8, 15)
var1 <- c(8.2, 0.002394, 8.25)
var2 <- c(0.002343955, 0.002017)
S <- c(35, 35)
T <- c(25, 25)
P <- 0
Pt <- 0
Sit <- 0
evar1 <- c(0.005, 2e-6)
evar2 <- c(2e-6, 2e-6)
epKx <- c(0.002, 0.01, 0.02, 0.01, 0.01, 0.01, 0.01)
eBtx = 0.01
method <- "mc"
kf <- "pf"
k1k2 <- "l"
pHscale <- "T"
b <- "u74"
## NOTE that the following is executable but enclosed in "donttest" 
## because it takes too long to run when submiting to CRAN
## and is therefore rejected
errors(flag=flag, var1=var1, var2=var2, S=S, T=T, P=P, Pt=Pt, Sit=Sit, 
       evar1=evar1, evar2=evar2, eS=0, eT=0, ePt=0, eSit=0, epK=epKx, eBt=eBtx,
       method=method, runs=10000, kf=kf, k1k2=k1k2, pHscale=pHscale, b=b)

Converts the CO2 fugacity to CO2 partial pressure

Description

Converts fCO2 (fugacity of CO2) into pCO2 (partial pressure in CO2)

Usage

f2pCO2(T = 25, Patm=1, P=0, fCO2)

Arguments

T

Temperature in degrees Celsius, default is 25oC

Patm

Surface atmospheric pressure in atm, default 1 atm

P

Hydrostatic pressure in bar, default is 0 bar (surface)

fCO2

Fugacity of CO2 in μ\muatm, the same units as that for the pCO2 output

Value

pCO2

Partial pressure of CO2 in μ\muatm, the same units as that for the fCO2 input

Note

Warning: pCO2 estimates below 100 m are subject to considerable uncertainty. See Weiss (1974) and Orr et al. (2015)

Author(s)

Heloise Lavigne, Jean-Pierre Gattuso, and James Orr [email protected]

References

Dickson A. G., Sabine C. L. and Christian J. R., 2007. Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Orr J. C., Epitalon J.-M. and Gattuso J.-P., 2015. Comparison of seven packages that compute ocean carbonate chemistry. Biogeosciences 12, 1483-1510.

Weiss, R. F. and Price, B. A., 1980. Nitrous oxide solubility in water and seawater, Marine Chemistry, 8, 347-359, 1980.

Weiss, R. F., 1974. Carbon dioxide in water and seawater: the solubility of a non-ideal gas, Mar. Chem., 2, 203-215.

Weiss, R. F. and Price, B. A., 1980. Nitrous oxide solubility in water and seawater, Marine Chemistry, 8, 347-359.

See Also

p2fCO2.

Examples

f2pCO2(T=25, Patm=1.0, P=0, fCO2=380)

fCO2 at in situ temperature

Description

Correction to compensate for the difference in temperature between the temperature of measurement and in situ temperature.

Usage

fCO2insi(fCO2lab = 400, Tlab = 20, SST = 19)

Arguments

fCO2lab

Fugacity of CO2 measured in the lab in μ\muatm

Tlab

Temperaure of measurment in the lab in in degrees Celsius, default is 20oC

SST

Temperature in degrees Celsius, default is 19oC

Value

fCO2insi

Fugacity of CO2 at in situ temperature in μ\muatm, the same units as that for the fCO2 input.

Note

The empirical correction applied is from Takahashi (1993) as recommended by Pierrot et al. (2009)

Author(s)

Jean-Pierre Gattuso [email protected]

References

Pierrot D., Neill C., Sullivan K., Castle R., Wanninkhof R., Lüger H., Johannessen T., Olsen A., Feely R. A. and Cosca C. E., 2009. Recommendations for autonomous underway pCO2 measuring systems and data-reduction routines. Deep-Sea Res. II 56, 512-522.

Takahashi T., Olafsson J., Goddard J. G., Chipman D. W. and Sutherland S. C., 1993. Seasonal variation of CO2 and nutrients in the high-latitude surface oceans: a comparative study. Glob. Biogeochem. Cycles 7, 843-878.

See Also

f2pCO2, pCO2insi.

Examples

fCO2insi(fCO2lab = 400, SST = 15, Tlab = 16)

Total activity coefficient for H+

Description

Compute total hydrogen ion activity coefficient. The activity coefficient (fH) is used to convert from H+ concentration on SWS scale to H+ activity (ah), as used for NBS scale; likewise fH is used to make the conversion in the opposite direction, from the NBS scale to the SWS scale. Here, fH is taken from Takahashi et al (1982, GEOSECS Pacific Expedition, Chap 3, p. 80) who say: fH is the total activity coeff., which includes contributions from HSO4- and HF [as well as H+].

Takahashi et al. (1982) computed a relationship for fH based on the experimental data from Culberson & Pytkowicz (1973), who determined it experimentally as a function of temperature and salinity. The approach is old and full of uncertainty. Newer approaches are more complicated (Pitzer equations) and big uncertainties remain (Marion et al., 2011; Pilson, 2013).

Usage

fH(S=35, T=25)

Arguments

S

Salinity on the practical salinity scale, default is 35

T

Temperature in degrees Celsius, default is 25oC

Details

This total activity coefficient appears in the following basic chemistry equation: ah=fHhswsah = fH * hsws, where ahah is the activity of hydrogen ion, fHfH is the total activity coefficient, and hsws=[H+]+[HSO4]+[HF]hsws = [H+] + [HSO4-] + [HF]. In other words, hswshsws is the total hydrogen ion conccentration on the seawater scale.

The two pH scales of concern are defined as pHNBS=log10(ah)pHNBS = -log10(ah) and pHSWS=log10(hsws)pHSWS = -log10(hsws).

Value

fH

Total activity coefficient for H+

Author(s)

James Orr [email protected]

References

Culberson, C.H., & Pytkowicz, R.M. (1973). Ionization of water in seawater. Marine Chemistry, 1(4), 309-316.

Marion G.M., Millero F.J., Camoes M.F., Spitzer P., Feistel R., Chen C.T.A. 2011. pH of seawater. Marine Chemistry 126 89-96.

Pilson M.E.Q. (2013) An introduction to the chemistry of the sea, 2 edn. Cambridge, UK: Cambridge University Press.

Takahashi T., Williams R.T., and Ros D.L. (1982) Carbonate chemistry. GEOSECS Pacific Expedition, Volume 3, Hydrographic Data 1973-1974, 77-83.

See Also

pHnbs2sws and pHsws2nbs

Examples

## Compute fH
   f = fH(T=25, S=35)
   print(f)
## Check value: The result is 0.7134043

Henry's constant mol/(kg/atm)

Description

Henry's constant mol/(kg/atm)

Usage

K0(S=35, T=25, P=0, Patm=1, warn="y")

Arguments

S

Salinity, default is 35

T

Temperature in degrees Celsius, default is 25oC

P

Hydrostatic pressure in bar (surface = 0), default is 0

Patm

Surface atmospheric pressure in atm, default is 1 atm

warn

"y" to show warnings when T or S go beyond the valid range for K0; "n" to supress warnings. The default is "y".

Details

This formulation is only valid for specific ranges of temperature and salinity:

  • S ranging between 0 and 45 and T ranging between -1 and 45oC.

Note that the arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It can therefore be critical to use vectors of the same length.

For pressure corrections: the pressure correction term of Weiss (1974) is used.

Value

K0

Henry's constant mol/(kg/atm)

Author(s)

Jean-Marie Epitalon, Aurelien Proye, and Jean-Pierre Gattuso [email protected]

References

Weiss R. F., 1974 Carbon dioxide in water and seawater: the solubility of a non-ideal gas. Marine Chemistry 2, 203-215.

Examples

K0(S=35,T=25,P=0)

First dissociation constant of carbonic acid (mol/kg)

Description

First dissociation constant of carbonic acid (mol/kg)

Usage

K1(S=35, T=25, P=0, k1k2="x", pHscale="T", kSWS2scale="x", ktotal2SWS_P0="x", warn="y")

Arguments

S

Salinity, default is 35

T

Temperature in degrees Celsius, default is 25oC

P

Hydrostatic pressure in bar (surface = 0), default is 0

k1k2

"cw" for using K1 and K2 from Cai & Wang (1998), "l" from Lueker et al. (2000), "m02" from Millero et al. (2002), "m06" from Millero et al. (2006), "m10" from Millero (2010), "mp2" from Mojica Prieto et al. (2002), "p18" from Papadimitriou et al. (2018), "r" from Roy et al. (1993), "sb21" from Shockman & Byrne (2021), "s20" from Sulpis et al. (2020), and "w14" from Waters et al. (2014). "x" is the default flag; the default value is then "l", except if T is outside the range 2 to 35oC and/or S is outside the range 19 to 43. In these cases, the default value is "w14".

pHscale

choice of pH scale: "T" for using the total scale, "F" for using the free scale and "SWS" for using the seawater scale, default is total scale

kSWS2scale

Conversion factor from the seawater scale (SWS) to the pH scale selected at the hydrostatic pressure value indicated. It is not required for all formulations of K1 and K2, nor when the hydrostatic pressure is 0. It is advised to use default value "x", in which case it is computed when required.

ktotal2SWS_P0

Conversion factor from the total scale to the SWS at an hydrostatic pressure of 0. It is not required for all formulations of K1 and K2. It is advised to use default value "x", in which case it is computed when required.

warn

"y" to show warnings when T or S go beyond the valid range for K1; "n" to supress warnings. The default is "y".

Details

The Lueker et al. (2000) constant is recommended by Guide to Best Practices for Ocean CO2 Measurements (2007). It is, however, critical to consider that each formulation is only valid for specific ranges of temperature and salinity:

  • Cai and Wang (1998): S ranging between 0 and 40 and T ranging between 0.2 and 30oC.

  • Lueker et al. (2000): S ranging between 19 and 43 and T ranging between 2 and 35oC.

  • Millero et al. (2002): S ranging from 34 to 37 and T ranging between -1.6 and 35oC.

  • Millero et al. (2006): S ranging between 0.1 and 50 and T ranging between 1 and 50oC.

  • Millero (2010): S ranging between 1 and 50 and T ranging between 0 and 50oC. Millero (2010) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

  • Mojica Prieto et al. (2002): S ranging from 5 to 42 and T ranging between 0 and 45oC.

  • Papadimitriou et al. (2018): S ranging from 33 to 100 and T ranging between -6 to 25oC.

  • Roy et al. (1993): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Shockman & Byrne (2021): formulation is that of Waters et al (2014). See below.

  • Sulpis et al. (2020): S ranging from 30.7 to 37.6 and T ranging between -1.7 to 31.8oC.

  • Waters et al.(2014): S ranging between 1 and 50 and T ranging between 0 and 50oC. Waters (2014) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

The arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It can therefore be critical to use vectors of the same length.

The pressure correction was applied on the seawater scale. Hence, if needed, values were first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

Value

K1

First dissociation constant of carbonic acid (mol/kg)

Author(s)

Jean-Marie Epitalon and Jean-Pierre Gattuso [email protected]

References

Cai W. J., and Wang Y., 1998. The chemistry, fluxes, and sources of carbon dioxide in the estuarine waters of the Satilla and Altamaha Rivers, Georgia. Limnology and Oceanography 43, 657-668.

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 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. Oak Ridge,Tenn.: Carbon Dioxide Information Analysis Center, Oak Ridge National Laboratory.

Lueker T. J., Dickson A. G., and Keeling C. D., 2000 Ocean pCO2 calculated from dissolved inorganic carbon, alkalinity, and equations for K1 and K2: validation based on laboratory measurements of CO2 in gas and seawater at equilibrium. Marine Chemistry 70 105-119.

Millero F. J., 1995 Thermodynamics of the carbon dioxide system in the oceans. Geochimica Cosmochimica Acta 59: 661-677.

Millero F. J., Pierrot D., Lee K., Wanninkhof R., Feely R., Sabine C. L., Key R. M. and Takahashi T., 2002. Dissociation constants for carbonic acid determined from field measurements. Deep Sea Research Part I: Oceanographic Research Papers 49:1705-1723.

Millero F. J., Graham T. B., Huang F., Bustos-Serrano H., and Pierrot D., 2006 Dissociation constants of carbonic acid in seawater as a function of salinity and temperature. Marine Chemistry 100, 80-84.

Millero F. J., 2010 Carbonate constant for estuarine waters. Marine and Freshwater Research 61: 139-142.

Mojica Prieto F. J. and Millero F. J., 2002. The values of pK1 + pK2 for the dissociation of carbonic acid in seawater. Geochimica et Cosmochimica Acta 66, 2529-2540.

Papadimitriou S., Loucaides S., Rérolle V. M. C., Kennedy P., Achterberg E. P., Dickson A. G., Mowlem M. and Kennedy H., 2018. The stoichiometric dissociation constants of carbonic acid in seawater brines from 298 to 267 K. Geochimica et Cosmochimica Acta 220, 55-70.

Roy R. N., Roy L. N., Vogel K. M., Porter-Moore C., Pearson T., Good C. E., Millero F. J. and Campbell D. M., 1993. The dissociation constants of carbonic acid in seawater at salinities 5 to 45 and temperatures 0 to 45oC. Marine Chemistry 44, 249-267.

Schockman, K.M., Byrne, R.H., 2021. Spectrophotometric determination of the bicarbonate dissociation constant in seawater, Geochimica et Cosmochimica Acta..

Sulpis O., Lauvset S. K. and Hagens M., 2020. Current estimates of K1* and K2* appear inconsistent with measured CO2 system parameters in cold oceanic regions. Ocean Science 16, 847-862.

Waters, J., Millero, F. J., and Woosley, R. J., 2014. Corrigendum to “The free proton concentration scale for seawater pH”, [MARCHE: 149 (2013) 8-22], Marine Chemistry 165, 66-67.

See Also

K2.

Examples

K1(S=35,T=25,P=0,k1k2="l",pHscale="T")

First dissociation constant of phosphoric acid (mol/kg)

Description

First dissociation constant of phosphoric acid (mol/kg)

Usage

K1p(S=35, T=25, P=0, pHscale="T", kSWS2scale="x", warn="y")

Arguments

S

Salinity, default is 35

T

Temperature in degrees Celsius, default is 25oC

P

Hydrostatic pressure in bar (surface = 0), default is 0

pHscale

Choice of pH scale: "T" for using the total scale, "F" for using the free scale and "SWS" for using the seawater scale, default is total scale

kSWS2scale

Conversion factor from the seawater scale (SWS) to the pH scale selected at the hydrostatic pressure value indicated. It is advised to use default value "x", in which case it is computed when required.

warn

"y" to show warnings when T or S go beyond the valid range for K1p; "n" to supress warnings. The default is "y".

Details

This formulation is only valid for specific ranges of temperature and salinity:

  • S ranging between 0 and 45 and T ranging between 0 and 45oC.

The pressure correction was applied on the seawater scale. Hence, values were first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

Note that the arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It can therefore be critical to use vectors of the same length.

Value

K1p

First dissociation constant of phosphoric acid (mol/kg)

Author(s)

Jean-Marie Epitalon, Heloise Lavigne, Aurelien Proye and Jean-Pierre Gattuso [email protected]

References

Millero F. J., 1995 Thermodynamics of the carbon dioxide system in the oceans. Geochimica Cosmochimica Acta 59: 661-677.

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

See Also

K2p, K3p.

Examples

K1p(35,25,0)

Second dissociation constant of carbonic acid (mol/kg)

Description

Second dissociation constant of carbonic acid (mol/kg)

Usage

K2(S=35, T=25, P=0, k1k2="x", pHscale="T", kSWS2scale="x", ktotal2SWS_P0="x", warn="y")

Arguments

S

Salinity, default is 35

T

Temperature in degrees Celsius, default is 25oC

P

Hydrostatic pressure in bar (surface = 0), default is 0

k1k2

"cw" for using K1 and K2 from Cai & Wang (1998), "l" from Lueker et al. (2000), "m02" from Millero et al. (2002), "m06" from Millero et al. (2006), "m10" from Millero (2010), "mp2" from Mojica Prieto et al. (2002), "p18" from Papadimitriou et al. (2018), "r" from Roy et al. (1993), "sb21" from Shockman & Byrne (2021), "s20" from Sulpis et al. (2020), and "w14" from Waters et al. (2014). "x" is the default flag; the default value is then "l", except if T is outside the range 2 to 35oC and/or S is outside the range 19 to 43. In these cases, the default value is "w14".

pHscale

choice of pH scale: "T" for using the total scale, "F" for using the free scale and "SWS" for using the seawater scale, default is total scale

kSWS2scale

Conversion factor from the seawater scale (SWS) to the pH scale selected at the hydrostatic pressure value indicated. It is not required for all formulations of K1 and K2, nor when the hydrostatic pressure is 0. It is advised to use default value "x", in which case it is computed when required.

ktotal2SWS_P0

Conversion factor from the total scale to the SWS at an hydrostatic pressure of 0. It is not required for all formulations of K1 and K2. It is advised to use default value "x", in which case it is computed when required.

warn

"y" to show warnings when T or S go beyond the valid range for K2; "n" to supress warnings. The default is "y".

Details

The Lueker et al. (2000) constant is recommended by Guide to Best Practices for Ocean CO2 Measurements (2007). It is, however, critical to consider that each formulation is only valid for specific ranges of temperature and salinity:

  • Cai and Wang (1998): S ranging between 0 and 40 and T ranging between 0.2 and 30oC.

  • Lueker et al. (2000): S ranging between 19 and 43 and T ranging between 2 and 35oC.

  • Millero et al. (2002): S ranging from 34 to 37 and T ranging between -1.6 and 35oC.

  • Millero et al. (2006): S ranging between 0.1 and 50 and T ranging between 1 and 50oC.

  • Millero (2010): S ranging between 1 and 50 and T ranging between 0 and 50oC. Millero (2010) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

  • Mojica Prieto et al. (2002): S ranging from 5 to 42 and T ranging between 0 and 45oC.

  • Papadimitriou et al. (2018): S ranging from 33 to 100 and T ranging between -6 to 25oC.

  • Roy et al. (1993): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Shockman & Byrne (2021): S ranging from 19.6 to 41 and T ranging between 15 to 35oC.

  • Sulpis et al. (2020): S ranging from 30.7 to 37.6 and T ranging between -1.7 to 31.8oC.

  • Waters et al.(2014): S ranging between 1 and 50 and T ranging between 0 and 50oC. Waters (2014) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

The arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It can therefore be critical to use vectors of the same length.

The pressure correction was applied on the seawater scale. Hence, if needed, values were first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

Value

K2

Second dissociation constant of carbonic acid (mol/kg)

Author(s)

Jean-Marie Epitalon, Heloise Lavigne, Aurelien Proye and Jean-Pierre Gattuso [email protected]

References

The Lueker et al. (2000) constant is recommended by Guide to Best Practices for Ocean CO2 Measurements (2007). The Roy et al. (1993) constant is recommended by DOE (1994).

Cai W. J., and Wang Y., 1998. The chemistry, fluxes, and sources of carbon dioxide in the estuarine waters of the Satilla and Altamaha Rivers, Georgia. Limnology and Oceanography 43, 657-668.

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 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. Oak Ridge,Tenn.: Carbon Dioxide Information Analysis Center, Oak Ridge National Laboratory.

Lueker T. J., Dickson A. G. and Keeling C. D., 2000 Ocean pCO2 calculated from dissolved inorganic carbon, alkalinity, and equations for K1 and K2: validation based on laboratory measurements of CO2 in gas and seawater at equilibrium. Marine Chemistry 70 105-119.

Millero F. J., 1995 Thermodynamics of the carbon dioxide system in the oceans. Geochimica Cosmochimica Acta 59: 661-677.

Millero F. J., Graham T. B., Huang F., Bustos-Serrano H. and Pierrot D., 2006 Dissociation constants of carbonic acid in seawater as a function of salinity and temperature. Marine Chemistry 100, 80-84.

Millero F. J., 2010 Carbonate constant for estuarine waters. Marine and Freshwater Research 61: 139-142.

Mojica Prieto F. J. and Millero F. J., 2002. The values of pK1 + pK2 for the dissociation of carbonic acid in seawater. Geochimica et Cosmochimica Acta 66, 2529-2540.

Papadimitriou S., Loucaides S., Rérolle V. M. C., Kennedy P., Achterberg E. P., Dickson A. G., Mowlem M. and Kennedy H., 2018. The stoichiometric dissociation constants of carbonic acid in seawater brines from 298 to 267 K. Geochimica et Cosmochimica Acta 220, 55-70.

Roy R. N., Roy L. N., Vogel K. M., Porter-Moore C., Pearson T., Good C. E., Millero F. J. and Campbell D. M., 1993. The dissociation constants of carbonic acid in seawater at salinities 5 to 45 and temperatures 0 to 45oC. Marine Chemistry 44, 249-267.

Schockman, K.M., Byrne, R.H., 2021. Spectrophotometric determination of the bicarbonate dissociation constant in seawater, Geochimica et Cosmochimica Acta..

Sulpis O., Lauvset S. K. and Hagens M., 2020. Current estimates of K1* and K2* appear inconsistent with measured CO2 system parameters in cold oceanic regions. Ocean Science 16, 847-862.

Waters, J., Millero, F. J., and Woosley, R. J., 2014. Corrigendum to “The free proton concentration scale for seawater pH”, [MARCHE: 149 (2013) 8-22], Marine Chemistry 165, 66-67.

See Also

K1.

Examples

K2(35,25,0)

Second dissociation constant of phosphoric acid (mol/kg)

Description

Second dissociation constant of phosphoric acid (mol/kg)

Usage

K2p(S=35, T=25, P=0, pHscale="T", kSWS2scale="x", warn="y")

Arguments

S

Salinity, default is 35

T

Temperature in degrees Celsius, default is 25oC

P

Hydrostatic pressure in bar (surface = 0), default is 0

pHscale

choice of pH scale: "T" for using the total scale, "F" for using the free scale and "SWS" for using the seawater scale, default is total scale

kSWS2scale

Conversion factor from the seawater scale (SWS) to the pH scale selected at the hydrostatic pressure value indicated. It is advised to use default value "x", in which case it is computed when required.

warn

"y" to show warnings when T or S go beyond the valid range for K2p; "n" to supress warnings. The default is "y".

Details

This formulation is only valid for specific ranges of temperature and salinity:

  • S ranging between 0 and 45 and T ranging between 0 and 45oC.

The pressure correction was applied on the seawater scale. Hence, values were first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

Note that the arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It can therefore be critical to use vectors of the same length.

Value

K2p

Second dissociation constant of phosphoric acid (mol/kg)

Author(s)

Jean-Marie Epitalon, Heloise Lavigne, Aurelien Proye and Jean-Pierre Gattuso [email protected]

References

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Millero F. J., 1995 Thermodynamics of the carbon dioxide system in the oceans. Geochimica Cosmochimica Acta 59: 661-677.

See Also

K1p, K3p.

Examples

K2p(35,25,0)

Second dissociation constant of Si(OH)4

Description

Second dissociation constant of Si(OH)4 (mol/kg)

Usage

K2si(S=35, T=25, P=0, pHscale="T", kSWS2scale="x", ktotal2SWS_P0="x")

Arguments

S

Salinity, default is 35

T

Temperature in degrees Celsius, default is 25oC

P

Hydrostatic pressure in bar (surface = 0), default is 0

pHscale

choice of pH scale: "T" for using the total scale, "F" for using the free scale and "SWS" for using the seawater scale, default is total scale

kSWS2scale

Conversion factor from the seawater scale (SWS) to the pH scale selected at the hydrostatic pressure value indicated. It is advised to use default value "x", in which case it is computed when required.

ktotal2SWS_P0

Conversion factor from the total scale to the SWS at an hydrostatic pressure of 0. It is advised to use default value "x", in which case it is computed when required.

Details

This equation is modified from Wischmeyer et al. (2003), who fitted the temperature-dependent K2si from Nordstrom et al. (1990) for freshwater to a value of 12.56 for T=25 and an ionic strength of 0.5 mol/kg. The temperature and salinity ranges in which it is valid are not well constrained.

The pressure correction is applied on the seawater scale. Hence, values are first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value is transformed back to the required scale (T, F or SWS).

Note that the arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It can therefore be critical to use vectors of the same length.

Value

K2si

Second dissociation constant of Si(OH)4 (mol/kg)

Author(s)

Mathilde Hagens ([email protected])

References

Millero F. J., 1995 Thermodynamics of the carbon dioxide system in the oceans. Geochimica Cosmochimica Acta 59: 661-677.

Nordstrom D. K., L. N. Plummer, D. Langmuir, E. Busenberg, H. M. May, B. F. Jones, D. L. Parkhurst, 1990 Revised chemical equilibrium data from major mineral reactions and their limitations. In: Melchior, D.C., R. L. Bassett (Eds.) Chemical Modeling of Aqueous Systems. IIACS Series 416. American Chemical Society, Washington, DC.

Wischmeyer A. G., Y. Del Amo, M. Brzezinski, D. A. Wolf-Gladrow, 1995 Theoretical constraints on the uptake of silicic acid species by marine diatoms. Marine Chemistry 82: 13-29.

Examples

K2si(S=35, T=25, P=0, pHscale="T")

Third dissociation constant of phosphoric acid (mol/kg)

Description

Third dissociation constant of phosphoric acid (mol/kg)

Usage

K3p(S=35, T=25, P=0, pHscale="T", kSWS2scale="x", warn="y")

Arguments

S

Salinity, default is 35

T

Temperature in degrees Celsius, default is 25oC

P

Hydrostatic pressure in bar (surface = 0), default is 0

pHscale

choice of pH scale: "T" for using the total scale, "F" for using the free scale and "SWS" for using the seawater scale, default is total scale

kSWS2scale

Conversion factor from the seawater scale (SWS) to the pH scale selected at the hydrostatic pressure value indicated. It is advised to use default value "x", in which case it is computed when required.

warn

"y" to show warnings when T or S go beyond the valid range for K3p; "n" to supress warnings. The default is "y".

Details

This formulation is only valid for specific ranges of temperature and salinity:

  • S ranging between 0 and 45 and T ranging between 0 and 45oC.

The pressure correction was applied on the seawater scale. Hence, values were first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

Note that the arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It can therefore be critical to use vectors of the same length.

Value

K3p

Third dissociation constant of phosphoric acid (mol/kg)

Author(s)

Jean-Marie Epitalon, Heloise Lavigne, Aurelien Proye and Jean-Pierre Gattuso [email protected]

References

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Millero F. J., 1995 Thermodynamics of the carbon dioxide system in the oceans. Geochimica Cosmochimica Acta 59: 661-677.

See Also

K1p, K2p.

Examples

K3p(35,25,0)

Dissociation constant of boric acid (mol/kg)

Description

Dissociation constant of boric acid (mol/kg)

Usage

Kb(S=35, T=25, P=0, pHscale="T", kSWS2scale="x", ktotal2SWS_P0="x", warn="y")

Arguments

S

Salinity, default is 35

T

Temperature in degrees Celsius, default is 25oC

P

Hydrostatic pressure in bar (surface = 0), default is 0

pHscale

choice of pH scale: "T" for using the total scale, "F" for using the free scale and "SWS" for using the seawater scale, default is total scale

kSWS2scale

Conversion factor from the seawater scale (SWS) to the pH scale selected at the hydrostatic pressure value indicated. It is advised to use default value "x", in which case it is computed when required.

ktotal2SWS_P0

Conversion factor from the total scale to the SWS at an hydrostatic pressure of 0. It is advised to use default value "x", in which case it is computed when required.

warn

"y" to show warnings when T or S go beyond the valid range for Kb; "n" to supress warnings. The default is "y".

Details

This formulation is only valid for specific ranges of temperature and salinity:

  • S ranging between 5 and 45 and T ranging between 0 and 45oC.

The pressure correction is applied on the seawater scale. Hence, values are first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value transformed back to the required scale (T, F or SWS).

Note that the arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It can therefore be critical to use vectors of the same length.

Value

Kb

Dissociation constant of boric acid (mol/kg)

Author(s)

Jean-Marie Epitalon, Heloise Lavigne, Aurelien Proye and Jean-Pierre Gattuso [email protected]

References

Dickson A. G., 1990 Thermodynamics of the dissociation of boric acid in synthetic seawater from 273.15 to 318.15 K. Deep-Sea Research 375, 755-766.

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 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. Oak Ridge,Tenn.: Carbon Dioxide Information Analysis Center, Oak Ridge National Laboratory.

Millero F. J., 1995 Thermodynamics of the carbon dioxide system in the oceans. Geochimica Cosmochimica Acta 59: 661-677.

Examples

Kb(S=35,T=25,P=0,pHscale="T")

Conversion factors to change the pH scale of dissociation constants

Description

Conversion factors from the total scale to the free and seawater scales

Usage

kconv(S=35, T=25, P=0, kf, Ks, Kff, warn="y")

Arguments

S

Salinity, default is 35

T

Temperature in degrees Celsius, default is 25oC

P

Hydrostatic pressure in bar (surface = 0), default is 0

kf

"pf" for using Kf from Perez and Fraga (1987) and "dg" for using Kf from Dickson and Riley (1979 in Dickson and Goyet, 1994); if the fonction Kf was used previously, the default value is the value given for the argument kf in the fonction Kf. If the Kf function was not used previously, the default value is "pf", except if T is outside the range 9 to 33oC or of S is outside the range 10 to 40. In these cases, the default is "dg".

Ks

Stability constant of hydrogen sulfate (mol/kg) at given S, T and P, optional; if not given, it will be computed, if given, it allows for speed optimisation

Kff

Stability constant of hydrogen fluoride (mol/kg) on free pH scale at given S, T and P, optional; if not given, it will be computed, if given, it allows for speed optimisation and kf parameter is then ignored

warn

"y" to show warnings when T or S go beyond the valid range for constants; "n" to supress warnings. The default is "y".

Details

It is critical to consider that each formulation is valid in specific ranges of temperature and salinity:

  • Perez and Fraga (1987): S ranging between 10 and 40 and T ranging between 9 and 33oC.

  • Dickson and Riley (1979 in Dickson and Goyet, 1994): S ranging between 0 and 45 and T ranging between 0 and 45oC.

Note that kconv may be called in many functions (i.e. K1, K2, K1p, K2p, K3p, Kw, Ksi, K2si, etc...) without user controls it. To force a particular formulation for Kf, it is recommended to call kconv() first then pass the resulting conversion factors to these functions.

Value

The function returns a list with 6 conversion factors :

ktotal2SWS

to convert from the total scale to seawater scale

ktotal2free

to convert from the total scale to the free scale

kfree2SWS

to convert from the free scale to the seawater scale

kfree2total

to convert from the free scale to total scale

kSWS2total

to convert from the seawater scale to the total scale

kSWS2free

to convert from the seawater scale to the free scale

Author(s)

Karline Soetaert [email protected]

References

Dickson A.G. and F.J. Millero, 1987 A comparison of the equilibrium constants for the dissociation of carbonic acid in seawater media. Deep-Sea Research 34:1733-1743.

See Also

pHconv.

Examples

##To convert dissociation constants from the total scale to the free scale
## (at salinity=35, temperature=25oC and atmospheric pressure):
kconv(35,25,0)
conv <- kconv()
 c(K1_total=K1(),K1_SWS=K1()*conv$ktotal2SWS,K1_free=K1()*conv$ktotal2free)

Equilibrium constant of hydrogen fluoride (mol/kg)

Description

Stability constant of hydrogen fluoride (mol/kg)

Usage

Kf(S=35, T=25, P=0, kf="x", pHscale="T", Ks_p0="x", Ks_p="x", warn="y")

Arguments

S

Salinity, default is 35

T

Temperature in degrees Celsius, default is 25oC

P

Hydrostatic pressure in bar (surface = 0), default is 0

kf

"pf" for using Kf from Perez and Fraga (1987) "dg" for using Kf from Dickson and Riley (1979 in Dickson and Goyet, 1994), default is "pf". Attention do not use a vector for this argument.

pHscale

choice of pH scale: "T" for the total scale, "F" for the free scale and "SWS" for using the seawater scale, default is "T" (total scale)

Ks_p0

Stability constant of hydrogen sulfate (mol/kg) at pressure zero; needed if kf = "pf" ; if needed and not given or set to "x", it is computed; if given, computation speed is increased

Ks_p

Stability constant of hydrogen sulfate (mol/kg) at chosen pressure; if not given or set to "x", it is computed; if given, computation speed is increased

warn

"y" to show warnings when T or S go beyond the valid range for Kf; "n" to supress warnings. The default is "y".

Details

The Perez and Fraga (1987) constant is recommended by Guide to Best Practices for Ocean CO2 Measurements (2007). The Dickson and Riley (1979 in Dickson and Goyet, 1994) constant is recommended by DOE (1994).

It is, however, critical to consider that each formulation is only valid for specific ranges of temperature and salinity:

  • Perez and Fraga (1987): S ranging between 10 and 40 and T ranging between 9 and 33oC.

  • Dickson and Riley (1979 in Dickson and Goyet, 1994): S ranging between 0 and 45 and T ranging between 0 and 45oC.

Note that the arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It can therefore be critical to use vectors of the same length.

The pressure correction was applied on the free scale. The formulation of Dickson and Riley (1979 in Dickson and Goyet, 1994) provides Kf on the free scale but that of Perez and Fraga (1987) provides it on the total scale. Hence, in that case, Kf was first transformed from the total scale to the free scale. With both formulations, the pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

Value

Kf

Stability constant of hydrogen fluoride (mol/kg)

Author(s)

Jean-Marie Epitalon, Heloise Lavigne, Aurelien Proye and Jean-Pierre Gattuso [email protected]

References

Dickson A. G. and Riley J. P., 1979 The estimation of acid dissociation constants in seawater media from potentiometric titrations with strong base. I. The ionic product of water. Marine Chemistry 7, 89-99.

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 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. Oak Ridge,Tenn.: Carbon Dioxide Information Analysis Center, Oak Ridge National Laboratory.

Millero F. J., 1995 Thermodynamics of the carbon dioxide system in the oceans. Geochimica Cosmochimica Acta 59: 661-677.

Perez F. F. and Fraga F., 1987 Association constant of fluoride and hydrogen ions in seawater. Marine Chemistry 21, 161-168.

Examples

Kf(S=35,T=25,P=0,kf="pf",pHscale="T")

variable for internal use

Description

nothing


Dissociation constant of hydrogen sulfide (mol/kg)

Description

Dissociation constant of hydrogen sulfide (mol/kg)

Usage

Khs(S=35, T=25, P=0, pHscale="T", warn="y")

Arguments

S

Salinity, default is 35

T

Temperature in degrees Celsius, default is 25oC

P

Hydrostatic pressure in bar (surface = 0), default is 0

pHscale

choice of pH scale: "T" for using the total scale, "F" for using the free scale and "SWS" for using the seawater scale, default is total scale

warn

"y" to show warnings when T or S go beyond the valid range for Khs; "n" to supress warnings. The default is "y".

Details

This formulation is only valid for specific ranges of temperature and salinity:

  • S ranging between 0 and 45 and T ranging between 0 and 45oC.

The pressure correction is applied on the seawater scale. Hence, the values are first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value is transformed back to the required scale (T, F or SWS).

Note that the arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It can therefore be critical to use vectors of the same length.

Value

Khs

Dissociation constant of hydrogen sulfide

Author(s)

Karline Soetaert [email protected] and Heloise Lavigne

References

Millero F. J., 1995 Thermodynamics of the carbon dioxide system in the oceans. Geochimica Cosmochimica Acta 59: 661-677.

Examples

Khs(S=35,T=25,P=0, pHscale="T")

Dissociation constant of ammonium (mol/kg)

Description

Dissociation constant of ammonium on the total scale (mol/kg)

Usage

Kn(S=35, T=25, P=0, pHscale="T", warn="y")

Arguments

S

Salinity, default is 35

T

Temperature in degrees Celsius, default is 25oC

P

Hydrostatic pressure in bar (surface = 0), default is 0

pHscale

choice of pH scale: "T" for using the total scale, "F" for using the free scale and "SWS" for using the seawater scale, default is total scale

warn

"y" to show warnings when T or S go beyond the valid range for Kn; "n" to supress warnings. The default is "y".

Details

This formulation is only valid for specific ranges of temperature and salinity:

  • S ranging between 0 and 45 and T ranging between 0 and 45oC.

The pressure correction is applied on the seawater scale. Hence, values are first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value is transformed back to the required scale (T, F or SWS).

Note that the arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It can therefore be critical to use vectors of the same length.

Value

Kn

Dissociation constant of ammonium (mol/kg)

Author(s)

Karline Soetaert [email protected] and Heloise Lavigne

References

Millero F. J., 1995 Thermodynamics of the carbon dioxide system in the oceans. Geochimica Cosmochimica Acta 59: 661-677.

Examples

Kn(S=35,T=25,P=0, pHscale="T")

Stability constant of hydrogen sulfate (mol/kg)

Description

Stability constant of hydrogen sulfate (mol/kg)

Usage

Ks(S=35, T=25, P=0, ks="d", warn="y")

Arguments

S

Salinity, default is 35

T

Temperature in degrees Celsius, default is 25oC

P

Hydrostatic pressure in bar (surface = 0), default is 0

ks

"d" for using Ks from Dickson (1990), "k" for using Ks from Khoo et al. (1977), default is "d"

warn

"y" to show warnings when T or S go beyond the valid range for Ks; "n" to supress warnings. The default is "y".

Details

The Dickson (1990) constant is recommended by Guide to Best Practices for Ocean CO2 Measurements (2007). It is, however, critical to consider that each formulation is only valid for specific ranges of temperature and salinity:

  • Dickson (1990): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Khoo et al. (1977): S ranging between 20 and 45 and T ranging between 5 and 40oC.

Note that the arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It can therefore be critical to use vectors of the same length.

The pressure correction is applied on the free scale as described by Millero (1995), and the value transformed back to the required scale (T, F or SWS).

Value

Ks

Stability constant of hydrogen sulfate (mol/kg), pHscale = free scale

Author(s)

Heloise Lavigne, Aurelien Proye and Jean-Pierre Gattuso [email protected]

References

Dickson A. G., 1990 Standard potential of the reaction: AgCI(s) + 1/2H2(g) = Ag(s) + HCI(aq), and the standard acidity constant of the ion HSO4 in synthetic sea water from 273.15 to 318.15 K. Journal of Chemical Thermodynamics 22, 113-127.

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Khoo H. K., Ramette R. W., Culberson C. H. and Bates R. G., 1977 Determination of Hydrogen ion concentration in seawater from 5 to 40oC: standard potentials at salinities from 20 to 45. Analytical Chemistry 49, 29-34.

Examples

Ks(S=35,T=25,P=0, ks="d")

Dissociation constant of Si(OH)4

Description

Dissociation constant of Si(OH)4 on total scale (mol/kg)

Usage

Ksi(S=35, T=25, P=0, pHscale="T", kSWS2scale="x", warn="y")

Arguments

S

Salinity, default is 35

T

Temperature in degrees Celsius, default is 25oC

P

Hydrostatic pressure in bar (surface = 0), default is 0

pHscale

choice of pH scale: "T" for using the total scale, "F" for using the free scale and "SWS" for using the seawater scale, default is total scale

kSWS2scale

Conversion factor from the seawater scale (SWS) to the pH scale selected at the hydrostatic pressure value indicated. It is advised to use default value "x", in which case it is computed when required.

warn

"y" to show warnings when T or S go beyond the valid range for Ksi; "n" to supress warnings. The default is "y".

Details

This formulation is only valid for specific ranges of temperature and salinity:

  • S ranging between 0 and 45 and T ranging between 0 and 45oC.

The pressure correction is applied on the seawater scale. Hence, values are first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value is transformed back to the required scale (T, F or SWS).

Note that the arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It can therefore be critical to use vectors of the same length.

Value

Ksi

Dissociation constant of Si(OH)4 (mol/kg)

Author(s)

Karline Soetaert [email protected] and Heloise Lavigne

References

DOE 1994 Handbook of methods for the analysis of the various parameters of the carbon dioxide system in sea water. ORNL/CDIAC-74. Oak Ridge,Tenn.: Carbon Dioxide Information Analysis Center, Oak Ridge National Laboratory.

Millero F. J., 1995 Thermodynamics of the carbon dioxide system in the oceans. Geochimica Cosmochimica Acta 59: 661-677.

Examples

Ksi(S=35, T=25, P=0, pHscale="T")

Solubility product of aragonite (mol/kg)

Description

Solubility product of aragonite (mol/kg)

Usage

Kspa(S=35, T=25, P=0, warn="y")

Arguments

S

Salinity, default is 35

T

Temperature in degrees Celsius, default is 25oC

P

Hydrostatic pressure in bar (surface = 0), default is 0

warn

"y" to show warnings when T or S go beyond the valid range for Kspa; "n" to supress warnings. The default is "y".

Details

This formulation is only valid for specific ranges of temperature and salinity:

  • S ranging between 5 and 44 and T ranging between 5 and 40oC.

Pressure coorection was performed as described by Millero (1995).

Note that the arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It can therefore be critical to use vectors of the same length.

Value

Kspa

Solubility product of aragonite (mol2/kg)

Author(s)

Aurelien Proye and Jean-Pierre Gattuso [email protected]

References

Millero F. J., 1995 Thermodynamics of the carbon dioxide system in the oceans. Geochimica et Cosmochimica Acta 59 661-677.

Mucci A., 1983 The solubility of calcite and aragonite in seawater at various salinities, temperature, and one atmosphere total pressure. American Journal of Science 283: 780-799.

See Also

Kspc.

Examples

Kspa(S=35,T=25,P=0)

Solubility product of calcite (mol/kg)

Description

Solubility product of calcite (mol/kg)

Usage

Kspc(S=35, T=25, P=0, warn="y")

Arguments

S

Salinity, default is 35

T

Temperature in degrees Celsius, default is 25oC

P

Hydrostatic pressure in bar (surface = 0), default is 0

warn

"y" to show warnings when T or S go beyond the valid range for Kspc; "n" to supress warnings. The default is "y".

Details

This formulation is only valid for specific ranges of temperature and salinity:

  • S ranging between 5 and 44 and T ranging between 5 and 40oC.

The pressure coorection was performed as described by Millero (1995).

Note that the arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It can therefore be critical to use vectors of the same length.

Value

Kspc

Solubility product of calcite (mol2/kg)

Author(s)

Aurelien Proye and Jean-Pierre Gattuso [email protected]

References

Millero F. J., 1995 Thermodynamics of the carbon dioxide system in the oceans. Geochimica et Cosmochimica Acta 59 661-677.

Mucci A., 1983 The solubility of calcite and aragonite in seawater at various salinities, temperature, and one atmosphere total pressure. American Journal of Science 283: 780-799.

See Also

Kspa.

Examples

Kspc(S=35,T=25,P=0)

Ion product of water (mol2/kg2)

Description

Ion product of water (mol2/kg2)

Usage

Kw(S=35, T=25, P=0, pHscale="T", kSWS2scale="x", warn="y")

Arguments

S

Salinity, default is 35

T

Temperature in degrees Celsius, default is 25oC

P

Hydrostatic pressure in bar (surface = 0), default is 0

pHscale

choice of pH scale: "T" for using the total scale, "F" for using the free scale and "SWS" for using the seawater scale, default is total scale

kSWS2scale

Conversion factor from the seawater scale (SWS) to the pH scale selected at the hydrostatic pressure value indicated. It is advised to use default value "x", in which case it is computed when required.

warn

"y" to show warnings when T or S go beyond the valid range for Kw; "n" to supress warnings. The default is "y".

Details

This formulation is only valid for specific ranges of temperature and salinity:

  • S ranging between 0 and 45 and T ranging between 0 and 45oC.

The pressure correction was applied on the seawater scale. Hence, if needed, values were first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

Note that the arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It can therefore be critical to use vectors of the same length.

Value

Kw

Ion product of water (mol2/kg2)

Author(s)

Heloise Lavigne, Aurelien Proye and Jean-Pierre Gattuso [email protected]

References

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Millero F. J., 1995 Thermodynamics of the carbon dioxide system in the oceans. Geochimica et Cosmochimica Acta 59 661-677.

Examples

Kw(S=35,T=25,P=0,pHscale="T")

Perturbation of the seawater carbonate system

Description

Describes the various approaches that can be used to alter the seawater carbonate system. Its main purpose is to assist the design of ocean acidification perturbation experiments.

Usage

oa(flag, var1, var2, pCO2f, pCO2s=1e6, S=35, T=25, P=0, 
	Pt=0, Sit=0, k1k2='x', kf='x', ks="d", pHscale="T", plot=FALSE, 
	b="u74", eos = "eos80", long = 1e+20, lat = 1e+20)

Arguments

flag

select the couple of variables available to describe the initial seawater. The flags which can be used are:

flag = 1 pH and CO2 given

flag = 2 CO2 and HCO3 given

flag = 3 CO2 and CO3 given

flag = 4 CO2 and ALK given

flag = 5 CO2 and DIC given

flag = 6 pH and HCO3 given

flag = 7 pH and CO3 given

flag = 8 pH and ALK given

flag = 9 pH and DIC given

flag = 10 HCO3 and CO3 given

flag = 11 HCO3 and ALK given

flag = 12 HCO3 and DIC given

flag = 13 CO3 and ALK given

flag = 14 CO3 and DIC given

flag = 15 ALK and DIC given

flag = 21 pCO2 and pH given

flag = 22 pCO2 and HCO3 given

flag = 23 pCO2 and CO3 given

flag = 24 pCO2 and ALK given

flag = 25 pCO2 and DIC given

var1

Value of the first variable available to describe the initial seawater, in mol/kg except for pH and for pCO2 in uatm

var2

Value of the second variable available to describe the initial seawater, in mol/kg except for pH

pCO2f

pCO2 target value, in uatm

pCO2s

pCO2s is the pCO2, in uatm, of the “high-CO2” seawater that will be mixed with “normal seawater”. The default value is 10^6 uatm, that is seawater bubbled with pure CO2 gas and saturated with CO2.

S

Salinity, default is 35

T

Temperature in degrees Celsius, default is 25

P

Hydrostatic pressure in bar (surface = 0), default is 0

Pt

Concentration of total phosphate in mol/kg, default is 0

Sit

Concentration of total silicate in mol/kg, default is 0

k1k2

"cw" for using K1 and K2 from Cai & Wang (1998), "l" from Lueker et al. (2000), "m02" from Millero et al. (2002), "m06" from Millero et al. (2006), "m10" from Millero (2010), "mp2" from Mojica Prieto et al. (2002), "p18" from Papadimitriou et al. (2018), "r" from Roy et al. (1993), "sb21" from Shockman & Byrne (2021), "s20" from Sulpis et al. (2020), and "w14" from Waters et al. (2014). "x" is the default flag; the default value is then "l", except if T is outside the range 2 to 35oC and/or S is outside the range 19 to 43. In these cases, the default value is "w14".

kf

"pf" for using Kf from Perez and Fraga (1987) and "dg" for using Kf from Dickson and Riley (1979 in Dickson and Goyet, 1994). "x" is the default flag; the default value is then "pf", except if T is outside the range 9 to 33oC and/or S is outside the range 10 to 40. In these cases, the default is "dg".

ks

"d" for using Ks from Dickon (1990), "k" for using Ks from Khoo et al. (1977), default is "d"

pHscale

"T" for the total scale, "F" for the free scale and "SWS" for using the seawater scale, default is "T" (total scale)

plot

A plot of the different perturbation methods can be plotted in a DIC vs ALK field with pCO2 isoclines are drawn in the back. Default is false.

b

Concentration of total boron. "l10" for the Lee et al. (2010) formulation or "u74" for the Uppstrom (1974) formulation, default is "u74".

eos

"teos10" to specify T and S according to Thermodynamic Equation Of Seawater - 2010 (TEOS-10); "eos80" to specify T and S according to EOS-80.

long

longitude of data point, used when eos parameter is "teos10" as a conversion parameter from absolute to practical salinity.

lat

latitude of data point, used when eos parameter is "teos10".

Details

The Lueker et al. (2000) constants for K1 and K2, the Perez and Fraga (1987) constant for Kf and the Dickson (1990) constant for Ks are recommended by Dickson et al. (2007). It is, however, critical to consider that each formulation is only valid for specific ranges of temperature and salinity:

For K1 and K2:

  • Cai and Wang (1998): S ranging between 0 and 40 and T ranging between 0.2 and 30oC.

  • Lueker et al. (2000): S ranging between 19 and 43 and T ranging between 2 and 35oC.

  • Millero et al. (2002): S ranging from 34 to 37 and T ranging between -1.6 and 35oC.

  • Millero et al. (2006): S ranging between 0.1 and 50 and T ranging between 1 and 50oC.

  • Millero (2010): S ranging between 1 and 50 and T ranging between 0 and 50oC. Millero (2010) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

  • Mojica Prieto et al. (2002): S ranging from 5 to 42 and T ranging between 0 and 45oC.

  • Papadimitriou et al. (2018): S ranging from 33 to 100 and T ranging between -6 to 25oC.

  • Roy et al. (1993): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Shockman & Byrne (2021): for K2, S ranging from 19.6 to 41 and T ranging between 15 to 35oC. For K1, formulation is that of Waters et al.

  • Sulpis et al. (2020): S ranging from 30.7 to 37.6 and T ranging between -1.7 to 31.8oC.

  • Waters et al.(2014): S ranging between 1 and 50 and T ranging between 0 and 50oC. Waters (2014) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

For Kf:

  • Perez and Fraga (1987): S ranging between 10 and 40 and T ranging between 9 and 33oC.

  • Dickson and Riley (1979 in Dickson and Goyet, 1994): S ranging between 0 and 45 and T ranging between 0 and 45oC.

For Ks:

  • Dickson (1990): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Khoo et al. (1977): S ranging between 20 and 45 and T ranging between 5 and 40oC.

The arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It is recommended to use either vectors with the same dimension or one vector for one argument and numbers for the other arguments.

Pressure corrections and pH scale:

  • For K0, the pressure correction term of Weiss (1974) is used.

  • For K1, K2, pK1, pK2, pK3, Kw, Kb, Khs and Ksi, the pressure correction was applied on the seawater scale. Hence, if needed, values were first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kf, the pressure correction was applied on the free scale. The formulation of Dickson and Riley (1979 in Dickson and Goyet, 1994) provides Kf on the free scale but that of Perez and Fraga (1987) provides it on the total scale. Hence, in that case, Kf was first transformed from the total scale to the free scale. With both formulations, the pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Ks, the pressure correction was applied on the free scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kn, The pressure correction was applied on the seawater scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

Value

The function returns a list built as follows:

description

A table describing in plain English the various ways to reach the target pCO2. Note that if a vector is given in argument only the first value is used.

perturbation

Table providing key parameters for the following methods:

CO2 bubbling: high-CO2 air is bubbled in seawater. The first parameter is the value of the pCO2 in the air required to bubble the seawater (in uatm).

SW mixing: mixing of “normal” and “high-CO2” seawater. The fist parameter, “Weight fraction high-CO2 SW” or wf, is the weight fraction of the high-CO2 seawater per kg seawater.

Addition of acid: strong acid is added to seawater. Note that this method is not recommended because it does not closely mimic natural ocean acidification (Gattuso and Lavigne, 2009). The first parameter, H+ (mol/kg), is the amount of H+ that must be added (mol/kg). The acid must be fortified with NaCl in order to have the same salinity than seawater.

Addition of HCO3 and acid: bicarbonate (HCO3) and a strong acid are added. The first parameter, HCO3, is the amount of HCO3 that must be added (mol/kg). The second parameter, H+, is the quantity of H+ that must be added (mol/kg). The acid must be fortified with NaCl in order to have the same salinity than seawater.

Addition of CO3 and acid: carbonate, CO3, and a strong acid are added. The first parameter, HCO3, is the quantity of CO3 that must be added (mol/kg). The second parameter, H+, is the quantity of H+ that must be added (mol/kg).

summary

Table summarizing the carbonate chemistry before and after applying each perturbation: pCO2 bubbling, mixing with high-CO2 seawater, addition of strong acid, and addition of bicarbonate/carbonate and strong acid.

Warnings

  • It is recommended to use concentrated solutions of acid or base in order to add small volumes.

  • The addition of strong acid does not simulate well natural ocean acidification (higher concentration of dissolved inorganic carbon at constant total alkalinity) since it generates a decrease in total alkalinity while dissolved inorganic carbon is kept constant.

  • Other important advice is provided in Gattuso and Lavigne (2009), Schulz et al. (2009) and in the “Guide for Best Practices on Ocean Acidification Research and Data Reporting” (https://www.iaea.org/sites/default/files/18/06/oa-guide-to-best-practices.pdf)

long and lat are used as conversion parameters from absolute to practical salinity: when seawater is not of standard composition, practical salinity alone is not sufficient to compute absolute salinity and vice-versa. One needs to know the density. When long and lat are given, density is inferred from WOA silicate concentration at given location. When they are not, an arbitrary geographic point is chosen: mid equatorial Atlantic. Note that this implies an error on computed salinity up to 0.02 g/kg.

Author(s)

Heloise Lavigne and Jean-Pierre Gattuso [email protected]

References

Cai W. J., and Wang Y., 1998. The chemistry, fluxes, and sources of carbon dioxide in the estuarine waters of the Satilla and Altamaha Rivers, Georgia. Limnology and Oceanography 43, 657-668.

Dickson A. G., 1990 Standard potential of the reaction: AgCI(s) + 1/2H2(g) = Ag(s) + HCI(aq), and the standard acidity constant of the ion HSO4 in synthetic sea water from 273.15 to 318.15 K. Journal of Chemical Thermodynamics 22, 113-127.

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Khoo H. K., Ramette R. W., Culberson C. H. and Bates R. G., 1977 Determination of Hydrogen Ion Concentration in Seawater from 5 to 40oC: Standard Potentials at Salinities from 20 to 45. Analytical Chemistry 49, 29-34.

Gattuso J.-P. and Lavigne H., 2009 Technical note: approaches and software tools to investigate the impact of ocean acidification. Biogeosciences 21, 6:2121-2133.

Lueker T. J., Dickson A. G. and Keeling C. D., 2000 Ocean pCO2 calculated from dissolved inorganic carbon, alkalinity, and equations for K1 and K2: validation based on laboratory measurements of CO2 in gas and seawater at equilibrium. Marine Chemistry 70 105-119.

Lee K., Tae-Wook K., Byrne R.H., Millero F.J., Feely R.A. and Liu Y-M, 2010 The universal ratio of the boron to chlorinity for the North Pacific and North Atlantoc oceans. Geochimica et Cosmochimica Acta 74 1801-1811.

Millero F. J., 2010 Carbonate constant for estuarine waters. Marine and Freshwater Research 61: 139-142.

Millero F. J., Graham T. B., Huang F., Bustos-Serrano H. and Pierrot D., 2006. Dissociation constants of carbonic acid in seawater as a function of salinity and temperature. Marine Chemistry 100, 80-84.

Perez F. F. and Fraga F., 1987 Association constant of fluoride and hydrogen ions in seawater. Marine Chemistry 21, 161-168.

Roy R. N., Roy L. N., Vogel K. M., Porter-Moore C., Pearson T., Good C. E., Millero F. J. and Campbell D. M., 1993 The dissociation constants of carbonic acid in seawater at salinities 5 to 45 and temperatures 0 to 45oC. Marine Chemistry 44, 249-267.

Schockman, K.M., Byrne, R.H., 2021. Spectrophotometric determination of the bicarbonate dissociation constant in seawater, Geochimica et Cosmochimica Acta.

Schulz K. G., Barcelos e Ramos J., Zeebe R. E. and Riebesell U., 2009 CO2 perturbation experiments: similarities and differences between dissolved inorganic carbon and total alkalinity manipulations. Biogeosciences 6, 2145-2153.

Uppstrom L.R., 1974 The boron/chlorinity ratio of the deep-sea water from the Pacific Ocean. Deep-Sea Research I 21 161-162.

Waters, J., Millero, F. J., and Woosley, R. J., 2014. Corrigendum to “The free proton concentration scale for seawater pH”, [MARCHE: 149 (2013) 8-22], Marine Chemistry 165, 66-67.

Zeebe R. E. and Wolf-Gladrow D. A., 2001 CO2 in seawater: equilibrium, kinetics, isotopes. Amsterdam: Elsevier, 346 pp.

See Also

carb, pgas, pmix, ppH, pTA.

Examples

oa(flag=24, var1=384, var2=2325e-6, pCO2s=1e6, pCO2f=793, S=34.3, T=16, 
	P=0, pHscale="T", kf="pf", k1k2="l", ks="d", plot=TRUE, b="u74")

Carbonate saturation state for magnesian calcites

Description

Calculates the calcium carbonate saturation state for magnesian calcite

Usage

Om(x, flag, var1, var2, k1k2='x', kf='x', ks="d", pHscale="T", b="u74")

Arguments

x

mole fraction of magnesium ions, note that the function is only valid for x ranging between 0 and 0.25

flag

select the couple of variables available. The flags which can be used are:

flag = 1 pH and CO2 given

flag = 2 CO2 and HCO3 given

flag = 3 CO2 and CO3 given

flag = 4 CO2 and ALK given

flag = 5 CO2 and DIC given

flag = 6 pH and HCO3 given

flag = 7 pH and CO3 given

flag = 8 pH and ALK given

flag = 9 pH and DIC given

flag = 10 HCO3 and CO3 given

flag = 11 HCO3 and ALK given

flag = 12 HCO3 and DIC given

flag = 13 CO3 and ALK given

flag = 14 CO3 and DIC given

flag = 15 ALK and DIC given

flag = 21 pCO2 and pH given

flag = 22 pCO2 and HCO3 given

flag = 23 pCO2 and CO3 given

flag = 24 pCO2 and ALK given

flag = 25 pCO2 and DIC given

var1

Value of the first variable in mol/kg, except for pH and for pCO2 in μ\muatm

var2

Value of the second variable in mol/kg, except for pH

k1k2

"cw" for using K1 and K2 from Cai & Wang (1998), "l" from Lueker et al. (2000), "m02" from Millero et al. (2002), "m06" from Millero et al. (2006), "m10" from Millero (2010), "mp2" from Mojica Prieto et al. (2002), "p18" from Papadimitriou et al. (2018), "r" from Roy et al. (1993), "sb21" from Shockman & Byrne (2021), "s20" from Sulpis et al. (2020), and "w14" from Waters et al. (2014). "x" is the default flag; the default value is then "l", except if T is outside the range 2 to 35oC and/or S is outside the range 19 to 43. In these cases, the default value is "w14".

kf

"pf" for using Kf from Perez and Fraga (1987) and "dg" for using Kf from Dickson and Riley (1979 in Dickson and Goyet, 1994). "x" is the default flag; the default value is then "pf", except if T is outside the range 9 to 33oC and/or S is outside the range 10 to 40. In these cases, the default is "dg".

ks

"d" for using Ks from Dickson (1990) and "k" for using Ks from Khoo et al. (1977), default is "d"

pHscale

"T" for the total scale, "F" for the free scale and "SWS" for using the seawater scale, default is "T" (total scale)

b

Concentration of total boron. "l10" for the Lee et al. (2010) formulation or "u74" for the Uppstrom (1974) formulation, default is "u74"

Details

It is important to note that this function is only valid for:

  • Salinity = 35

  • Temperature = 25 degrees Celsius

  • Hydrostatic pressure = 0 bar (surface)

  • Concentration of total phosphate = 0 mol/kg

  • Concentration of total silicate = 0 mol/kg

Note that the stoichiometric solubility products with respect to Mg-calcite minerals have not been determined experimentally. The saturation state with respect to Mg-calcite minerals is therefore calculated based on ion activities, i.e.,

Ωx={Ca2+}1x{Mg2+}x{CO3}2Kx\Omega_{x} = \frac{ \{Ca^{2+}\}^{1-x} \{Mg^{2+}\}^{x} \{CO_{3}\}^{2-} } { K_{x} }

The ion activity {a} is calculated based on the observed ion concentrations [C] multiplied by the total ion activity coefficient, γT\gamma_T, which has been determined experimentally or from theory (e.g. Millero & Pierrot 1998): {a}=γT\gamma_T[C]. Because a true equilibrium cannot be achieved with respect to Mg-calcite minerals, KxK_x represents a metastable equilibrium state obtained from what has been referred to as stoichiometric saturation (Thorstenson & Plummer 1977; a term not equivalent to the definition of the stoichiometric solubility product, see for example Morse et al. (2006) and references therein). In the present calculation calcium and magnesium concentrations were calculated based on salinity. Total ion activity coefficients with respect to Ca2+Ca^{2+}, Mg2+Mg^{2+}, and CO32CO_{3}^{2-} were adopted from Millero & Pierrot (1998).

The Lueker et al. (2000) constants for K1 and K2, the Perez and Fraga (1987) constant for Kf and the Dickson (1990) constant for Ks are recommended by Dickson et al. (2007). It is, however, critical to consider that each formulation is only valid for specific ranges of temperature and salinity:

For K1 and K2:

  • Cai and Wang (1998): S ranging between 0 and 40 and T ranging between 0.2 and 30oC.

  • Lueker et al. (2000): S ranging between 19 and 43 and T ranging between 2 and 35oC.

  • Millero et al. (2002): S ranging from 34 to 37 and T ranging between -1.6 and 35oC.

  • Millero et al. (2006): S ranging between 0.1 and 50 and T ranging between 1 and 50oC.

  • Millero (2010): S ranging between 1 and 50 and T ranging between 0 and 50oC. Millero (2010) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

  • Mojica Prieto et al. (2002): S ranging from 5 to 42 and T ranging between 0 and 45oC.

  • Papadimitriou et al. (2018): S ranging from 33 to 100 and T ranging between -6 to 25oC.

  • Roy et al. (1993): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Shockman & Byrne (2021): for K2, S ranging from 19.6 to 41 and T ranging between 15 to 35oC. For K1, formulation is that of Waters et al.

  • Sulpis et al. (2020): S ranging from 30.7 to 37.6 and T ranging between -1.7 to 31.8oC.

  • Waters et al.(2014): S ranging between 1 and 50 and T ranging between 0 and 50oC. Waters (2014) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

For Kf:

  • Perez and Fraga (1987): S ranging between 10 and 40 and T ranging between 9 and 33oC.

  • Dickson and Riley (1979 in Dickson and Goyet, 1994): S ranging between 0 and 45 and T ranging between 0 and 45oC.

For Ks:

  • Dickson (1990): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Khoo et al. (1977): S ranging between 20 and 45 and T ranging between 5 and 40oC.

The arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It is recommended to use either vectors with the same dimension or one vector for one argument and numbers for the other arguments.

Pressure corrections and pH scale:

  • For K0, the pressure correction term of Weiss (1974) is used.

  • For K1, K2, pK1, pK2, pK3, Kw, Kb, Khs and Ksi, the pressure correction was applied on the seawater scale. Hence, if needed, values were first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kf, the pressure correction was applied on the free scale. The formulation of Dickson and Riley (1979 in Dickson and Goyet, 1994) provides Kf on the free scale but that of Perez and Fraga (1987) provides it on the total scale. Hence, in that case, Kf was first transformed from the total scale to the free scale. With both formulations, the pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Ks, the pressure correction was applied on the free scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kn, The pressure correction was applied on the seawater scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

Value

The function returns a list with

OmegaMgCa_biogenic

Mg-calcite saturation state for minimally prepared biogenic Mg-calcite.

OmegaMgCa_biogenic_cleaned

Mg-calcite saturation state for cleaned and annealed biogenic Mg-calcite.

Author(s)

Heloise Lavigne, Andreas J. Andersson and Jean-Pierre Gattuso [email protected]

References

Only the references related to the saturation state of magnesian calcite are listed below; the other references are listed under the carb function.

Andersson A. J., Mackenzie F. T., Nicholas R. B., 2008, Life on the margin: implications of ocean acidification on Mg-calcite, high latitude and cold-water marine calcifiers. Marine Ecology Progress Series 373, 265-273.

Bischoff W. D., Mackenzie F. T. and Bishop F. C., 1987. Stabilities of synthetic magnesian calcites in aqueous solution: comparison with biogenic materials. Geochimica et Cosmochimica Acta 51:1413-1423.

Millero F. J. and Pierrot D., 1998. A chemical equilibrium model for natural waters. Aquatic Geochemistry 4, 153-199.

Morse J. W., Andersson A. J. and Mackenzie F. T., 2006. Initial responses of carbonate-rich shelf sediments to rising atmospheric pCO2 and ocean acidification: Role of high Mg-calcites. Geochimica et Cosmochimica Acta 70, 5814-5830.

Plummer L. N. and Mackenzie F. T., 1974. Predicting mineral solubility from rate data: application to the dissolution of magnesian calcites. American Journal of Science 274:61-83.

Thorstenson D.C. and Plummer L.N., 1977. Equilibrium criteria for two component solids reacting with fixed composition in an aqueous phase-example: the magnesian calcites. American Journal of Science 277, 1203-1233.

Examples

Om(x=seq(0.01, 0.252, 0.01), flag=8, var1=8.2, var2=0.00234, 
  k1k2='x', kf='x', ks="d", pHscale="T", b="u74")

Converts pressure in dbar to depth in meters

Description

Converts pressure in dbar to depth in meters

Usage

p2d(pressure, lat=40)

Arguments

pressure

Pressure in dbar

lat

Latitude in degrees, N and S is irrelevant, default is 40o

Value

depth

Depth corresponding to the pressure given, in meters

Author(s)

Heloise Lavigne and Jean-Pierre Gattuso [email protected]

References

Saunders P. M., 1981. Practical conversion of pressure to depth. J. Phys. Oceanogr. 11: 573-574.

See Also

d2p

Examples

p2d(pressure=7686, lat=30)

Converts pCO2 (partial pressure in CO2) into fCO2 (fugacity of CO2)

Description

Converts pCO2 (partial pressure in CO2) into fCO2 (fugacity of CO2)

Usage

p2fCO2(T = 25, Patm=1, P=0, pCO2)

Arguments

T

Temperature in degrees Celsius, default is 25oC

Patm

Surface atmospheric pressure in atm, default is 1 atm

P

Hydrostatic pressure in bar, default is 0 bar (surface)

pCO2

Partial pressure in CO2 in μ\muatm, the same units as that for the fugacity output

Value

fCO2

Fugacity of CO2 in μ\muatm, the same units as that for the pCO2 input.

Note

Warning: pCO2 estimates below 100 m are subject to considerable uncertainty. See Weiss (1974) and Orr et al. (2015)

Author(s)

Heloise Lavigne, Jean-Pierre Gattuso, and James Orr [email protected]

References

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Orr J. C., Epitalon J.-M. and Gattuso J.-P., 2015. Comparison of seven packages that compute ocean carbonate chemistry. Biogeosciences 12, 1483-1510.

Weiss, R. F., 1974. Carbon dioxide in water and seawater: the solubility of a non-ideal gas, Mar. Chem., 2, 203-215.

Weiss, R. F. and Price, B. A., 1980. Nitrous oxide solubility in water and seawater, Marine Chemistry, 8, 347-359.

See Also

f2pCO2.

Examples

p2fCO2(T=25, Patm=0.97, P=0, pCO2=380)

Converts partial pressure of CO2 to mole fraction of CO2

Description

Converts pCO2 (partial pressure of CO2) into xCO2 (mole fraction of CO2)

Usage

p2xCO2(S=35, T=25, Patm=1, pCO2)

Arguments

S

Salinity on the practical salinity scale, default is 35

T

Temperature in degrees Celsius, default is 25oC

Patm

Atmospheric pressure in atmospheres, default is 1.0 (this is not the hydrostatic pressure)

pCO2

Partial pressure of CO2 in μ\muatm

Details

The xCO2 (ppm) is computed from pCO2 (μ\muatm) using the following equation: xCO2=pCO2/(PatmpH2O)xCO2 = pCO2 / (Patm - pH2O), where pH20 is the vapor pressure of seawater computed following best practices (Dickson et al., 2007). That computed pH20 is identical, when rounded to the 4th decimal place, with that computed by the equation from Weiss and Price (1980).

Value

xCO2

Mole fraction of CO2 in ppm.

Note

Warning: pCO2 estimates below 100 m are subject to considerable uncertainty. See Weiss (1974) and Orr et al. (2015)

Author(s)

James Orr [email protected]

References

Dickson A. G., Sabine C. L. and Christian J. R. (2007) Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Orr J. C., Epitalon J.-M. and Gattuso J.-P., 2015. Comparison of seven packages that compute ocean carbonate chemistry. Biogeosciences 12, 1483-1510.

Weiss, R. F. (1974) Carbon dioxide in water and seawater: the solubility of a non-ideal gas, Marine Chemistry, 2, 203-215.

Weiss, R. F. and Price, B. A. (1980) Nitrous oxide solubility in water and seawater, Marine Chemistry, 8, 347-359.

See Also

x2pCO2 and vapress

Examples

## Convert atmospheric pressure from mbar to atm
   Patm_mbar = 1052                 # in millibar
   Patm      = Patm_mbar / 1013.25  # in atm
## Compute xCO2 from pCO2
   pCO2 = 380
   xCO2 = p2xCO2(T=25, S=35, Patm=Patm, pCO2=pCO2)
   print(xCO2)
## The result is 377.1546 ppm

pCa

Description

Calculates the changes in the saturation states of aragonite and calcite resulting from the manipulation of the calcium concentration

Usage

pCa(flag, var1, var2, Ca, S=35, T=20, P=0, Pt=0, Sit=0, k1k2="x", 
	kf="x", ks="d", pHscale="T", b="u74", eos = "eos80", long = 1e+20, lat = 1e+20)

Arguments

flag

select the couple of variables available. The flags which can be used are:

flag = 1 pH and CO2 given

flag = 2 CO2 and HCO3 given

flag = 3 CO2 and CO3 given

flag = 4 CO2 and ALK given

flag = 5 CO2 and DIC given

flag = 6 pH and HCO3 given

flag = 7 pH and CO3 given

flag = 8 pH and ALK given

flag = 9 pH and DIC given

flag = 10 HCO3 and CO3 given

flag = 11 HCO3 and ALK given

flag = 12 HCO3 and DIC given

flag = 13 CO3 and ALK given

flag = 14 CO3 and DIC given

flag = 15 ALK and DIC given

flag = 21 pCO2 and pH given

flag = 22 pCO2 and HCO3 given

flag = 23 pCO2 and CO3 given

flag = 24 pCO2 and ALK given

flag = 25 pCO2 and DIC given

var1

Value of the first variable in mol/kg, except for pH and for pCO2 in μ\muatm

var2

Value of the second variable in mol/kg, except for pH

Ca

Calcium concentration in mol/kg

S

Salinity

T

Temperature in degrees Celsius

P

Hydrostatic pressure in bar (surface = 0)

Pt

Concentration of total phosphate in mol/kg

Sit

Concentration of total silicate in mol/kg

k1k2

"cw" for using K1 and K2 from Cai & Wang (1998), "l" from Lueker et al. (2000), "m02" from Millero et al. (2002), "m06" from Millero et al. (2006), "m10" from Millero (2010), "mp2" from Mojica Prieto et al. (2002), "p18" from Papadimitriou et al. (2018), "r" from Roy et al. (1993), "sb21" from Shockman & Byrne (2021), "s20" from Sulpis et al. (2020), and "w14" from Waters et al. (2014). "x" is the default flag; the default value is then "l", except if T is outside the range 2 to 35oC and/or S is outside the range 19 to 43. In these cases, the default value is "w14".

kf

"pf" for using Kf from Perez and Fraga (1987) and "dg" for using Kf from Dickson and Riley (1979 in Dickson and Goyet, 1994). "x" is the default flag; the default value is then "pf", except if T is outside the range 9 to 33oC and/or S is outside the range 10 to 40. In these cases, the default is "dg".

ks

"d" for using Ks from Dickon (1990), "k" for using Ks from Khoo et al. (1977), default is "d"

pHscale

choice of pH scale: "T" for the total scale, "F" for the free scale and "SWS" for using the seawater scale, default is "T" (total scale)

b

Concentration of total boron. "l10" for the Lee et al. (2010) formulation or "u74" for the Uppstrom (1974) formulation, default is "u74".

eos

"teos10" to specify T and S according to Thermodynamic Equation Of Seawater - 2010 (TEOS-10); "eos80" to specify T and S according to EOS-80.

long

longitude of data point, used when eos parameter is "teos10" as a conversion parameter from absolute to practical salinity.

lat

latitude of data point, used when eos parameter is "teos10".

Details

The Lueker et al. (2000) constants for K1 and K2, the Perez and Fraga (1987) constant for Kf and the Dickson (1990) constant for Ks are recommended by Dickson et al. (2007). It is, however, critical to consider that each formulation is only valid for specific ranges of temperature and salinity:

For K1 and K2:

  • Cai and Wang (1998): S ranging between 0 and 40 and T ranging between 0.2 and 30oC.

  • Lueker et al. (2000): S ranging between 19 and 43 and T ranging between 2 and 35oC.

  • Millero et al. (2002): S ranging from 34 to 37 and T ranging between -1.6 and 35oC.

  • Millero et al. (2006): S ranging between 0.1 and 50 and T ranging between 1 and 50oC.

  • Millero (2010): S ranging between 1 and 50 and T ranging between 0 and 50oC. Millero (2010) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

  • Mojica Prieto et al. (2002): S ranging from 5 to 42 and T ranging between 0 and 45oC.

  • Papadimitriou et al. (2018): S ranging from 33 to 100 and T ranging between -6 to 25oC.

  • Roy et al. (1993): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Shockman & Byrne (2021): for K2, S ranging from 19.6 to 41 and T ranging between 15 to 35oC. For K1, formulation is that of Waters et al.

  • Sulpis et al. (2020): S ranging from 30.7 to 37.6 and T ranging between -1.7 to 31.8oC.

  • Waters et al.(2014): S ranging between 1 and 50 and T ranging between 0 and 50oC. Waters (2014) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

For Kf:

  • Perez and Fraga (1987): S ranging between 10 and 40 and T ranging between 9 and 33oC.

  • Dickson and Riley (1979 in Dickson and Goyet, 1994): S ranging between 0 and 45 and T ranging between 0 and 45oC.

For Ks:

  • Dickson (1990): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Khoo et al. (1977): S ranging between 20 and 45 and T ranging between 5 and 40oC.

The arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It is recommended to use either vectors with the same dimension or one vector for one argument and numbers for the other arguments.

Pressure corrections and pH scale:

  • For K0, the pressure correction term of Weiss (1974) is used.

  • For K1, K2, pK1, pK2, pK3, Kw, Kb, Khs and Ksi, the pressure correction was applied on the seawater scale. Hence, if needed, values were first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kf, the pressure correction was applied on the free scale. The formulation of Dickson and Riley (1979 in Dickson and Goyet, 1994) provides Kf on the free scale but that of Perez and Fraga (1987) provides it on the total scale. Hence, in that case, Kf was first transformed from the total scale to the free scale. With both formulations, the pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Ks, the pressure correction was applied on the free scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kn, The pressure correction was applied on the seawater scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

long and lat are used as conversion parameters from absolute to practical salinity: when seawater is not of standard composition, practical salinity alone is not sufficient to compute absolute salinity and vice-versa. One needs to know the density. When long and lat are given, density is inferred from WOA silicate concentration at given location. When they are not, an arbitrary geographic point is chosen: mid equatorial Atlantic. Note that this implies an error on computed salinity up to 0.02 g/kg.

Value

The function returns a data frame containing the following columns:

comment

The initial or final state water

S

Salinity

T

Temperature in degrees Celsius

P

Pressure in bar

pH

pH

CO2

CO2 concentration (mol/kg)

pCO2

pCO2, CO2 partial pressure (μ\muatm)

fCO2

fCO2, CO2 fugacity (μ\muatm)

HCO3

HCO3 concentration (mol/kg)

CO3

CO3 concentration (mol/kg)

DIC

DIC concentration (mol/kg)

ALK

ALK, total alkalinity (mol/kg)

OmegaAragonite

Omega aragonite, aragonite saturation state

OmegaCalcite

Omega calcite, calcite saturation state

Note

Warning: pCO2 estimates below 100 m are subject to considerable uncertainty. See Weiss (1974) and Orr et al. (2015)

Author(s)

Jean-Pierre Gattuso [email protected]

References

Ben-Yaakov S. and Goldhaber M. B., 1973 The influence of sea water composition on the apparent constants of the carbonate system. Deep-Sea Research 20, 87-99.

Cai W. J., and Wang Y., 1998. The chemistry, fluxes, and sources of carbon dioxide in the estuarine waters of the Satilla and Altamaha Rivers, Georgia. Limnology and Oceanography 43, 657-668.

Dickson A. G., 1990 Standard potential of the reaction: AgCI(s) + 1/2H2(g) = Ag(s) + HCI(aq), and the standard acidity constant of the ion HSO4 in synthetic sea water from 273.15 to 318.15 K. Journal of Chemical Thermodynamics 22, 113-127.

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Gattuso J.-P. and Lavigne H, 2009 Perturbation experiments to investigate the impact of ocean acidification: approaches and software tools. Biogeosciences 6, 4413-4439.

Khoo H. K., Ramette R. W., Culberson C. H. and Bates R. G., 1977 Determination of Hydrogen Ion Concentration in Seawater from 5 to 40oC: Standard Potentials at Salinities from 20 to 45. Analytical Chemistry 49, 29-34.

Lee K., Tae-Wook K., Byrne R.H., Millero F.J., Feely R.A. and Liu Y-M, 2010 The universal ratio of the boron to chlorinity for the North Pacific and North Atlantoc oceans. Geochimica et Cosmochimica Acta 74 1801-1811.

Millero F. J., 1995 Thermodynamics of the carbon dioxide system in the oceans. Geochimica Cosmochimica Acta 59: 661-677.

Millero F. J., 2010 Carbonate constant for estuarine waters. Marine and Freshwater Research 61: 139-142.

Millero F. J., Graham T. B., Huang F., Bustos-Serrano H. and Pierrot D., 2006. Dissociation constants of carbonic acid in seawater as a function of salinity and temperature. Marine Chemistry 100, 80-84.

Orr J. C., Epitalon J.-M. and Gattuso J.-P., 2015. Comparison of seven packages that compute ocean carbonate chemistry. Biogeosciences 12, 1483-1510.

Uppstrom L.R., 1974 The boron/chlorinity ratio of the deep-sea water from the Pacific Ocean. Deep-Sea Research I 21 161-162.

Waters, J., Millero, F. J., and Woosley, R. J., 2014. Corrigendum to “The free proton concentration scale for seawater pH”, [MARCHE: 149 (2013) 8-22], Marine Chemistry 165, 66-67.

Examples

pCa(flag=15, var1=2302e-6, var2=2050e-6, Ca=0.01028, S=35, T=20, P=0, 
	Pt=0, Sit=0, pHscale="T", kf="pf", k1k2="l", ks="d", b="u74") # with normal Ca concentration
pCa(flag=15, var1=2302e-6, var2=2050e-6, Ca=0.01028/2, S=35, T=20, P=0, 
	Pt=0, Sit=0, pHscale="T", kf="pf", k1k2="l", ks="d", b="u74") # with 0.5 * Ca concentration

pCO2 at in situ temperature

Description

Correction to compensate for the difference in temperature between the temperature of measurement and in situ temperature.

Usage

pCO2insi(pCO2lab = 400, Tlab = 20, SST = 19)

Arguments

pCO2lab

Partial pressure of CO2 measured in the lab in μ\muatm

Tlab

Temperature of measurement in the lab in in degrees Celsius, default is 20oC

SST

Temperature in degrees Celsius, default is 19oC

Value

pCO2insi

Partial pressure of CO2 at in situ temperature in μ\muatm, the same units as that for the pCO2 input.

Note

The empirical correction applied is from Takahashi (1993) as recommended by Pierrot et al. (2009)

Author(s)

Jean-Pierre Gattuso [email protected]

References

Pierrot D., Neill C., Sullivan K., Castle R., Wanninkhof R., Lüger H., Johannessen T., Olsen A., Feely R. A. and Cosca C. E., 2009. Recommendations for autonomous underway pCO2 measuring systems and data-reduction routines. Deep-Sea Res. II 56, 512-522.

Takahashi T., Olafsson J., Goddard J. G., Chipman D. W. and Sutherland S. C., 1993. Seasonal variation of CO2 and nutrients in the high-latitude surface oceans: a comparative study. Glob. Biogeochem. Cycles 7, 843-878.

See Also

f2pCO2, fCO2insi.

Examples

pCO2insi(pCO2lab = 400, SST = 15, Tlab = 16)

Coefficients used for pressure-correcting the equilibrium constants

Description

Pressure corrections are based on the following equations:

lnKiPKi0=ΔViRT.P+0.5ΔKiRT.P2\ln{\frac{K_{i}^{P}}{K_{i}^{0}}} = -\frac{\Delta V_{i}}{RT}.P + 0.5\frac{\Delta K_{i}}{RT}.P^{2}

with

ΔVi=a0+a1T+a2T2\Delta V_{i} = a_{0} + a_{1}T + a_{2}T^{2}

and

ΔKi=b0+b1T+b2T2\Delta K_{i} = b_{0} + b_{1}T + b_{2}T^{2}

The variables are:

  • K indicating the type of equilibrium constant

  • coefficient a0a_0

  • coefficient a1a_1

  • coefficient a2a_2

  • coefficient b0b_0

  • coefficient b1b_1

  • coefficient b2b_2

Usage

Pcoeffs

Format

A data frame with 15 rows and 7 variables

Details

For Kb, to be consistent with Millero (1979) a2 was changed to -2.608e-3 instead of 2.608e-3 (value given in Millero, 1995) For Kw, coefficients are from Millero (1983).

Source

Millero F. J., 1979 The thermodynamics of the carbonate system in seawater. Geochemica et Cosmochemica Acta 43: 1651-1661.

Millero F. J., 1983 Influence of pressure on chemical processes in the sea. pp. 1-88. In J. P. Riley and R. Chester (eds.), Chemical Oceanography. Academic Press, New York.

Millero F. J., 1995 Thermodynamics of the carbon dioxide system in the oceans. Geochimica Cosmochimica Acta 59: 661-677.

See Also

Pcorrect


Pressure correction of equilibrium constants

Description

Computes the pressure correction of the equilibrium constants

Usage

Pcorrect(Kvalue, Ktype, T=25, S=35, P=0, pHscale="T", 
  kconv2ScaleP0="x", kconv2Scale="x", warn="y")

Arguments

Kvalue

Value of the constant at P=0 (hydrostatic pressure in bar, surface = 0)

Ktype

Name of the constant,

  • K1 First dissociation constant of carbonic acid (mol/kg)

  • K2 Second dissociation constant of carbonic acid (mol/kg)

  • Kb Dissociation constant of boric acid (mol/kg)

  • Kw Ion product of water (mol2/kg2)

  • Ks Stability constant of hydrogen sulfate (mol/kg)

  • Kf Stability constant of hydrogen fluoride (mol/kg)

  • Kspc Solubility product of calcite (mol/kg)

  • Kspa Solubility product of aragonite (mol/kg)

  • K1p First dissociation constant of phosphoric acid (mol/kg)

  • K2p Second dissociation constant of phosphoric acid (mol/kg)

  • K3p Third dissociation constant of phosphoric acid (mol/kg)

  • Khs Dissociation constant of hydrogen sufide(mol/kg)

  • Kn Dissociation constant of ammonium (mol/kg)

  • Ksi Dissociation constant of Si(OH)4 (mol/kg)

  • K2si Second dissociation constant of Si(OH)4 (mol/kg)

T

Temperature in degrees Celsius, default is 25oC

S

Salinity, default is 35

P

Hydrostatic pressure in bar (surface = 0), default is 0

pHscale

pHscale of the constant given in Kvalue

kconv2ScaleP0

Conversion factor from the pH scale selected to the SWS (or free for Kf) scale at pressure zero. It is advised to use default value "x", in which case it is computed when required. (may slow down the computation)

kconv2Scale

Conversion factor from the pH scale selected to the SWS (or free for Kf) scale at the hydrostatic pressure value indicated. It is advised to use default value "x", in which case it is computed when required. (may slow down the computation)

warn

"y" to show warnings when T or S go beyond the valid range for constants; "n" to supress warnings. The default is "y".

Details

  • The pressure correction is applied on the seawater scale for K1, K2, K1p, K2p, K3p, Kb, Khs, Kn, Ksi, K2si and Kw. Hence the K value is first converted on the seawater scale if needed. After pressure correction, the constant is converted back to the initial pH scale.

  • The pressure correction is applied on the free scale for Kf.

  • There is no issue of pH scale for Ks, Kspa and Kspc.

Value

The equilibrium constant given in argument but after pressure correction

Author(s)

Heloise Lavigne and Jean-Pierre Gattuso [email protected]

References

Millero F. J., 1995 Thermodynamics of the carbon dioxide system in the oceans. Geochimica et Cosmochimica Acta 59 661-677.

See Also

Pcoeffs

Examples

k10 <- K1(T=25, P=0, S=35)
Pcorrect(Kvalue=k10, Ktype="K1", P=300, T=25, S=35, pHscale="T")

pgas

Description

Calculates the carbonate chemistry after changes in pCO2 generated by gas bubbling

Usage

pgas(flag, var1, var2, pCO2g, S=35, T=20, P=0, Pt=0, Sit=0, k1k2="x", 
	kf="x", ks="d", pHscale="T", b="u74", eos = "eos80", long = 1e+20, lat = 1e+20)

Arguments

flag

select the couple of variables available. The flags which can be used are:

flag = 1 pH and CO2 given

flag = 2 CO2 and HCO3 given

flag = 3 CO2 and CO3 given

flag = 4 CO2 and ALK given

flag = 5 CO2 and DIC given

flag = 6 pH and HCO3 given

flag = 7 pH and CO3 given

flag = 8 pH and ALK given

flag = 9 pH and DIC given

flag = 10 HCO3 and CO3 given

flag = 11 HCO3 and ALK given

flag = 12 HCO3 and DIC given

flag = 13 CO3 and ALK given

flag = 14 CO3 and DIC given

flag = 15 ALK and DIC given

flag = 21 pCO2 and pH given

flag = 22 pCO2 and HCO3 given

flag = 23 pCO2 and CO3 given

flag = 24 pCO2 and ALK given

flag = 25 pCO2 and DIC given

var1

Value of the first variable in mol/kg, except for pH and for pCO2 in μ\muatm

var2

Value of the second variable in mol/kg, except for pH

pCO2g

CO2 partial pressure of the gas used for bubbling in μ\muatm

S

Salinity

T

Temperature in degrees Celsius

P

Hydrostatic pressure in bar (surface = 0)

Pt

Concentration of total phosphate in mol/kg

Sit

Concentration of total silicate in mol/kg

k1k2

"cw" for using K1 and K2 from Cai & Wang (1998), "l" from Lueker et al. (2000), "m02" from Millero et al. (2002), "m06" from Millero et al. (2006), "m10" from Millero (2010), "mp2" from Mojica Prieto et al. (2002), "p18" from Papadimitriou et al. (2018), "r" from Roy et al. (1993), "sb21" from Shockman & Byrne (2021), "s20" from Sulpis et al. (2020), and "w14" from Waters et al. (2014). "x" is the default flag; the default value is then "l", except if T is outside the range 2 to 35oC and/or S is outside the range 19 to 43. In these cases, the default value is "w14".

kf

"pf" for using Kf from Perez and Fraga (1987) and "dg" for using Kf from Dickson and Riley (1979 in Dickson and Goyet, 1994). "x" is the default flag; the default value is then "pf", except if T is outside the range 9 to 33oC and/or S is outside the range 10 to 40. In these cases, the default is "dg".

ks

"d" for using Ks from Dickon (1990), "k" for using Ks from Khoo et al. (1977), default is "d"

pHscale

"T" for the total scale, "F" for the free scale and "SWS" for using the seawater scale, default is "T" (total scale)

b

Concentration of total boron. "l10" for the Lee et al. (2010) formulation or "u74" for the Uppstrom (1974) formulation, default is "u74".

eos

"teos10" to specify T and S according to Thermodynamic Equation Of Seawater - 2010 (TEOS-10); "eos80" to specify T and S according to EOS-80.

long

longitude of data point, used when eos parameter is "teos10" as a conversion parameter from absolute to practical salinity.

lat

latitude of data point, used when eos parameter is "teos10".

Details

The Lueker et al. (2000) constants for K1 and K2, the Perez and Fraga (1987) constant for Kf and the Dickson (1990) constant for Ks are recommended by Dickson et al. (2007). It is, however, critical to consider that each formulation is only valid for specific ranges of temperature and salinity:

For K1 and K2:

  • Cai and Wang (1998): S ranging between 0 and 40 and T ranging between 0.2 and 30oC.

  • Lueker et al. (2000): S ranging between 19 and 43 and T ranging between 2 and 35oC.

  • Millero et al. (2002): S ranging from 34 to 37 and T ranging between -1.6 and 35oC.

  • Millero et al. (2006): S ranging between 0.1 and 50 and T ranging between 1 and 50oC.

  • Millero (2010): S ranging between 1 and 50 and T ranging between 0 and 50oC. Millero (2010) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

  • Mojica Prieto et al. (2002): S ranging from 5 to 42 and T ranging between 0 and 45oC.

  • Papadimitriou et al. (2018): S ranging from 33 to 100 and T ranging between -6 to 25oC.

  • Roy et al. (1993): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Shockman & Byrne (2021): for K2, S ranging from 19.6 to 41 and T ranging between 15 to 35oC. For K1, formulation is that of Waters et al.

  • Sulpis et al. (2020): S ranging from 30.7 to 37.6 and T ranging between -1.7 to 31.8oC.

  • Waters et al.(2014): S ranging between 1 and 50 and T ranging between 0 and 50oC. Waters (2014) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

For Kf:

  • Perez and Fraga (1987): S ranging between 10 and 40 and T ranging between 9 and 33oC.

  • Dickson and Riley (1979 in Dickson and Goyet, 1994): S ranging between 0 and 45 and T ranging between 0 and 45oC.

For Ks:

  • Dickson (1990): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Khoo et al. (1977): S ranging between 20 and 45 and T ranging between 5 and 40oC.

The arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It is recommended to use either vectors with the same dimension or one vector for one argument and numbers for the other arguments.

Pressure corrections and pH scale:

  • For K0, the pressure correction term of Weiss (1974) is used.

  • For K1, K2, pK1, pK2, pK3, Kw, Kb, Khs and Ksi, the pressure correction was applied on the seawater scale. Hence, if needed, values were first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kf, the pressure correction was applied on the free scale. The formulation of Dickson and Riley (1979 in Dickson and Goyet, 1994) provides Kf on the free scale but that of Perez and Fraga (1987) provides it on the total scale. Hence, in that case, Kf was first transformed from the total scale to the free scale. With both formulations, the pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Ks, the pressure correction was applied on the free scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kn, The pressure correction was applied on the seawater scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

long and lat are used as conversion parameters from absolute to practical salinity: when seawater is not of standard composition, practical salinity alone is not sufficient to compute absolute salinity and vice-versa. One needs to know the density. When long and lat are given, density is inferred from WOA silicate concentration at given location. When they are not, an arbitrary geographic point is chosen: mid equatorial Atlantic. Note that this implies an error on computed salinity up to 0.02 g/kg.

Value

The function returns a data frame containing the following columns:

comment

The initial or final state water

S

Salinity

T

Temperature in degrees Celsius

P

Pressure in bar

pH

pH

CO2

CO2 concentration (mol/kg)

pCO2

pCO2, CO2 partial pressure (μ\muatm)

fCO2

fCO2, CO2 fugacity (μ\muatm)

HCO3

HCO3 concentration (mol/kg)

CO3

CO3 concentration (mol/kg)

DIC

DIC concentration (mol/kg)

ALK

ALK, total alkalinity (mol/kg)

OmegaAragonite

Omega aragonite, aragonite saturation state

OmegaCalcite

Omega calcite, calcite saturation state

Note

Warning: pCO2 estimates below 100 m are subject to considerable uncertainty. See Weiss (1974) and Orr et al. (2015)

Author(s)

Jean-Pierre Gattuso and Heloise Lavigne [email protected]

References

Cai W. J., and Wang Y., 1998. The chemistry, fluxes, and sources of carbon dioxide in the estuarine waters of the Satilla and Altamaha Rivers, Georgia. Limnology and Oceanography 43, 657-668.

Dickson A. G. and Riley J. P., 1979 The estimation of acid dissociation constants in seawater media from potentiometric titrations with strong base. I. The ionic product of water. Marine Chemistry 7, 89-99.

Dickson A. G., 1990 Standard potential of the reaction: AgCI(s) + 1/2H2(g) = Ag(s) + HCI(aq), and the standard acidity constant of the ion HSO4 in synthetic sea water from 273.15 to 318.15 K. Journal of Chemical Thermodynamics 22, 113-127.

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Gattuso J.-P. and Lavigne H, 2009 Perturbation experiments to investigate the impact of ocean acidification: approaches and software tools. Biogeosciences 6, 4413-4439.

Khoo H. K., Ramette R. W., Culberson C. H. and Bates R. G., 1977 Determination of Hydrogen Ion Concentration in Seawater from 5 to 40oC: Standard Potentials at Salinities from 20 to 45. Analytical Chemistry 49, 29-34.

Lee K., Tae-Wook K., Byrne R.H., Millero F.J., Feely R.A. and Liu Y-M, 2010 The universal ratio of the boron to chlorinity for the North Pacific and North Atlantoc oceans. Geochimica et Cosmochimica Acta 74 1801-1811.

Millero F. J., 1995 Thermodynamics of the carbon dioxide system in the oceans. Geochimica Cosmochimica Acta 59: 661-677.

Millero F. J., 2010 Carbonate constant for estuarine waters. Marine and Freshwater Research 61: 139-142.

Millero F. J., Graham T. B., Huang F., Bustos-Serrano H. and Pierrot D., 2006. Dissociation constants of carbonic acid in seawater as a function of salinity and temperature. Marine Chemistry 100, 80-84.

Orr J. C., Epitalon J.-M. and Gattuso J.-P., 2015. Comparison of seven packages that compute ocean carbonate chemistry. Biogeosciences 12, 1483-1510.

Uppstrom L.R., 1974 The boron/chlorinity ratio of the deep-sea water from the Pacific Ocean. Deep-Sea Research I 21 161-162.

Waters, J., Millero, F. J., and Woosley, R. J., 2014. Corrigendum to “The free proton concentration scale for seawater pH”, [MARCHE: 149 (2013) 8-22], Marine Chemistry 165, 66-67.

Examples

pgas(flag=15, var1=2302e-6, var2=2050e-6, pCO2g=750, S=35, T=20, P=0, 
	Pt=0, Sit=0, pHscale="T", kf="pf", k1k2="l", ks="d", b="u74")

Potentiometric pH

Description

Calculation of potentiometric pH

Usage

pH(Ex=-67,Etris=-72.4,S=35,T=25)

Arguments

Ex

e.m.f. of the seawater sample in mV, default is 67

Etris

e.m.f. of the TRIS buffer in mV, default is -72.4

S

Salinity, default is 35

T

Temperature in degrees Celsius, default is 25oC

Details

Note that the arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It can therefore be critical to use vectors of the same length.

Value

pH

Potentiometric pH (in mol/kg on the total scale)

Author(s)

Jean-Pierre Gattuso [email protected]

References

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

See Also

tris, amp, pHslope.

Examples

##Example from Dickson et al. (2007)
	pH(Ex=-67,Etris=-72.4,S=35,T=25)

Conversion of pH

Description

Converts pH from one scale to another one chosen between the total scale, the free scale and the seawater scale

Usage

pHconv(flag=1, pH=8.10, S=35, T=25, P=0, ks="d")

Arguments

flag

choice of the type of conversion : flag=1: seawater scale to total scale flag=2: free scale to total scale flag=3: total scale to seawater scale flag=4: total scale to free scale flag=5: seawater scale to free scale flag=6: free scale to seawater scale default is flag=1

pH

Enter the value of pH which need to be converted, default is 8.100

S

Salinity, default is 35

T

Temperature in degrees Celsius, default is 25oC

P

Hydrostatic pressure in bar (surface = 0), default is 0

ks

"d" for using Ks from Dickon (1990), "k" for using Ks from Khoo et al. (1977), default is "d"

Details

The Dickson (1990) constant is recommended by the Guide to Best Practices for Ocean CO2 Measurements (2007). It is critical to consider that each formulation is valid in specific ranges of temperature and salinity:

  • Dickson (1990): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Khoo et al. (1977): S ranging between 20 and 45 and T ranging between 5 and 40oC.

The arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It is recommended to use either vectors with the same dimension or one vector for one argument and numbers for the other arguments.

Value

The function returns the values of pH converted

Author(s)

Heloise Lavigne and Jean-Pierre Gattuso [email protected]

References

Dickson A.G. and F.J. Millero, 1987 A comparison of the equilibrium constants for the dissociation of carbonic acid in seawater media. Deep-Sea Research 34:1733-1743.

Dickson A. G., 1990 Standard potential of the reaction: AgCI(s) + 1/2H2(g) = Ag(s) + HCI(aq), and the standard acidity constant of the ion HSO4 in synthetic sea water from 273.15 to 318.15 K. Journal of Chemical Thermodynamics 22, 113-127.

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Khoo H. K., Ramette R. W., Culberson C. H. and Bates R. G., 1977 Determination of Hydrogen Ion Concentration in Seawater from 5 to 40oC: Standard Potentials at Salinities from 20 to 45. Analytical Chemistry 49, 29-34.

See Also

kconv.

Examples

##To convert pH=8.10 from the seawater scale to the total scale
##at salinity=35, temperature=25oC and atmospheric pressure:

  pHc <- pHconv(flag=1, pH=8.10, S=35, T=25, P=0, ks="d")

##note that pHc is the value of the pH converted in total scale

## By using vectors
## to convert the pH values : 8, 8.05, 8.10, 8.15, 8.20 
## from the free to the total scale

pH <- c(8, 8.05, 8.10, 8.15, 8.20)
pHc <- pHconv(flag=2, pH=pH, S=35, T=25, P=0, ks="d")

## note that pHc is a vector containing the value of the pH converted 
## to the total scale

pH at in situ temperature and pressure

Description

pH at in situ temperature and pressure

Usage

pHinsi(pH=8.2, ALK=2.4e-3, Tinsi=20, Tlab=25, Pinsi=0, S=35, Pt=0, Sit=0, 
  k1k2 = "x", kf = "x", ks="d", pHscale = "T", b="u74", eos = "eos80", 
  long = 1e+20, lat = 1e+20)

Arguments

pH

pH measured in the laboratory

ALK

ALK, total alkalinity (mol/kg)

Tinsi

In situ temperature in degrees Celsius

Tlab

Measurement temperature in degrees Celsius

Pinsi

In situ hydrostatic pressure in bar (surface = 0)

S

Salinity

Pt

value of the concentration of total phosphate in mol/kg

Sit

the value of the total silicate in mol/kg

k1k2

"cw" for using K1 and K2 from Cai & Wang (1998), "l" from Lueker et al. (2000), "m02" from Millero et al. (2002), "m06" from Millero et al. (2006), "m10" from Millero (2010), "mp2" from Mojica Prieto et al. (2002), "p18" from Papadimitriou et al. (2018), "r" from Roy et al. (1993), "sb21" from Shockman & Byrne (2021), "s20" from Sulpis et al. (2020), and "w14" from Waters et al. (2014). "x" is the default flag; the default value is then "l", except if T is outside the range 2 to 35oC and/or S is outside the range 19 to 43. In these cases, the default value is "w14".

kf

"pf" for using Kf from Perez and Fraga (1987) and "dg" for using Kf from Dickson and Riley (1979 in Dickson and Goyet, 1994). "x" is the default flag; the default value is then "pf", except if T is outside the range 9 to 33oC and/or S is outside the range 10 to 40. In these cases, the default is "dg".

ks

"d" for using Ks from Dickon (1990), "k" for using Ks from Khoo et al. (1977), default is "d"

pHscale

choice of pH scale: "T" for the total scale, "F" for the free scale and "SWS" for using the seawater scale, default is "T" (total scale)

b

"l10" for computing boron total from the Lee et al. (2010) formulation or "u74" for using the Uppstrom (1974) formulation, default is "u74"

eos

"teos10" to specify T and S according to Thermodynamic Equation Of Seawater - 2010 (TEOS-10); "eos80" to specify T and S according to EOS-80.

long

longitude of data point, used when eos parameter is "teos10" as a conversion parameter from absolute to practical salinity.

lat

latitude of data point, used when eos parameter is "teos10".

Details

The Lueker et al. (2000) constants for K1 and K2, the Perez and Fraga (1987) constant for Kf and the Dickson (1990) constant for Ks are recommended by Dickson et al. (2007). It is, however, critical to consider that each formulation is only valid for specific ranges of temperature and salinity:

For K1 and K2:

  • Cai and Wang (1998): S ranging between 0 and 40 and T ranging between 0.2 and 30oC.

  • Lueker et al. (2000): S ranging between 19 and 43 and T ranging between 2 and 35oC.

  • Millero et al. (2002): S ranging from 34 to 37 and T ranging between -1.6 and 35oC.

  • Millero et al. (2006): S ranging between 0.1 and 50 and T ranging between 1 and 50oC.

  • Millero (2010): S ranging between 1 and 50 and T ranging between 0 and 50oC. Millero (2010) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

  • Mojica Prieto et al. (2002): S ranging from 5 to 42 and T ranging between 0 and 45oC.

  • Papadimitriou et al. (2018): S ranging from 33 to 100 and T ranging between -6 to 25oC.

  • Roy et al. (1993): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Shockman & Byrne (2021): for K2, S ranging from 19.6 to 41 and T ranging between 15 to 35oC. For K1, formulation is that of Waters et al.

  • Sulpis et al. (2020): S ranging from 30.7 to 37.6 and T ranging between -1.7 to 31.8oC.

  • Waters et al.(2014): S ranging between 1 and 50 and T ranging between 0 and 50oC. Waters (2014) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

For Kf:

  • Perez and Fraga (1987): S ranging between 10 and 40 and T ranging between 9 and 33oC.

  • Dickson and Riley (1979 in Dickson and Goyet, 1994): S ranging between 0 and 45 and T ranging between 0 and 45oC.

For Ks:

  • Dickson (1990): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Khoo et al. (1977): S ranging between 20 and 45 and T ranging between 5 and 40oC.

The arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It is recommended to use either vectors with the same dimension or one vector for one argument and numbers for the other arguments.

Pressure corrections and pH scale:

  • For K0, the pressure correction term of Weiss (1974) is used.

  • For K1, K2, pK1, pK2, pK3, Kw, Kb, Khs and Ksi, the pressure correction was applied on the seawater scale. Hence, if needed, values were first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kf, the pressure correction was applied on the free scale. The formulation of Dickson and Riley (1979 in Dickson and Goyet, 1994) provides Kf on the free scale but that of Perez and Fraga (1987) provides it on the total scale. Hence, in that case, Kf was first transformed from the total scale to the free scale. With both formulations, the pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Ks, the pressure correction was applied on the free scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kn, The pressure correction was applied on the seawater scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

long and lat are used as conversion parameters from absolute to practical salinity: when seawater is not of standard composition, practical salinity alone is not sufficient to compute absolute salinity and vice-versa. One needs to know the density. When long and lat are given, density is inferred from WOA silicate concentration at given location. When they are not, an arbitrary geographic point is chosen: mid equatorial Atlantic. Note that this implies an error on computed salinity up to 0.02 g/kg.

Value

pH

pH at in situ temperature and pressure

Author(s)

Jean-Pierre Gattuso, [email protected]

References

Cai W. J., and Wang Y., 1998. The chemistry, fluxes, and sources of carbon dioxide in the estuarine waters of the Satilla and Altamaha Rivers, Georgia. Limnology and Oceanography 43, 657-668.

Hunter K. A., 1998. The temperature dependence of pH in surface seawater. Deep-Sea Research (Part I, Oceanographic Research Papers) 45(11):1919-1930.

Lee K., Tae-Wook K., Byrne R.H., Millero F.J., Feely R.A. and Liu Y-M, 2010 The universal ratio of the boron to chlorinity for the North Pacific and North Atlantoc oceans. Geochimica et Cosmochimica Acta 74 1801-1811.

Millero F. J., 2010 Carbonate constant for estuarine waters. Marine and Freshwater Research 61: 139-142.

Millero F. J., Graham T. B., Huang F., Bustos-Serrano H. and Pierrot D., 2006. Dissociation constants of carbonic acid in seawater as a function of salinity and temperature. Marine Chemistry 100, 80-84.

Uppstrom L.R., 1974 The boron/chlorinity ratio of the deep-sea water from the Pacific Ocean. Deep-Sea Research I 21 161-162.

Waters, J., Millero, F. J., and Woosley, R. J., 2014. Corrigendum to “The free proton concentration scale for seawater pH”, [MARCHE: 149 (2013) 8-22], Marine Chemistry 165, 66-67.

Examples

pHinsi(pH=8.2,ALK=2.4e-3,Tinsi=25,Tlab=25,Pinsi=200,S=35,Pt=0,Sit=0)

Converts pH from NBS to SWS scale

Description

Converts pH on NBS scale to pH on SWS scale pCO2. The NBS-to-SWS conversion is done with the total activity coefficient fH (combined activity coeff for H+, HSO4-, and HF) from Takahashi et al. (1982) based on data from Culberson and Pytkowicz (1973). The approach is old and full of uncertainty. Newer approaches are more complicated (Pitzer equations) and big uncertainties remain (Marion et al., 2011; Pilson, 2013).

Usage

pHnbs2sws(pHNBS, S=35, T=25)

Arguments

pHNBS

pH on NBS scale

S

Salinity on the practical salinity scale, default is 35

T

Temperature in degrees Celsius, default is 25oC

Details

The pHSWS is computed from pHNBS using the total activity coefficient and relying on the following basic chemistry equation: ah=fHhswsah = fH * hsws, where ahah is the activity of hydrogen ion, fHfH is the total activity coefficient, and hsws=[H+]+[HSO4]+[HF]hsws = [H+] + [HSO4-] + [HF]. In other words, hswshsws is the hydrogen ion concentration on the seawater scale.

The two pH scales are defined as pHNBS=log10(ah)pHNBS = -log10(ah) and pHSWS=log10(hsws)pHSWS = -log10(hsws).

Value

pHSWS

pH on SWS scale

Author(s)

James Orr [email protected]

References

Culberson, C.H., & Pytkowicz, R.M. (1973). Ionization of water in seawater. Marine Chemistry, 1(4), 309-316.

Marion G.M., Millero F.J., Camoes M.F., Spitzer P., Feistel R., Chen C.T.A. 2011. pH of seawater. Marine Chemistry 126 89-96.

Pilson M.E.Q. (2013) An introduction to the chemistry of the sea, 2 edn. Cambridge, UK: Cambridge University Press.

Takahashi T., Williams R.T., and Ros D.L. (1982) Carbonate chemistry. GEOSECS Pacific Expedition, Volume 3, Hydrographic Data 1973-1974, 77-83.

See Also

fH and pHsws2nbs

Examples

## Convert pHNBS to pHSWS
   pHNBS = 8.0                          # pH on the NBS scale
   pHSWS = pHnbs2sws(pHNBS, T=25, S=35) # pH on the SWS scale
   print(pHSWS)
## Check value: the result should be 7.853336

Slope of the calibration curve of a pH electrode

Description

Slope of the calibration curve of a pH electrode (percent of theoretical slope)

Usage

pHslope(Etris=-72.4,Eamp=4.9,S=35,T=25)

Arguments

Etris

e.m.f. of the TRIS buffer in mV, default is -72.4

Eamp

e.m.f. of the AMP buffer in mV, default is 4.9

S

Salinity, default is 35

T

Temperature in degrees Celsius, default is 25oC

Details

Note that the arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It can therefore be critical to use vectors of the same length.

Value

pHslope

Slope of the calibration curve (in percent of theoretical slope)

Author(s)

Jean-Pierre Gattuso [email protected]

References

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

See Also

tris, amp, pH.

Examples

##Example from Dickson et al. (2007)
	pHslope(Etris=-72.4,Eamp=4.9,S=35,T=25)

Calculates pHT from results of spectrophotometric measurements

Description

Calculates pH of a water sample from absorbance ratios R, obtained from spectrophotometric measurements with pH indicator dyes (on the total scale in mol/kg-soln)

Usage

pHspec(S=35, T=25, R=1, d="mCP", k="m18", warn="y")

Arguments

S

Salinity, default is 35

T

Temperature in degrees Celsius, default is 25oC

R

Absorbance ratio, default is 1

d

Dye used for spectrophotometric measurement, default is "mCP"

k

"m18" for using mCP characterization by Mueller and Rehder (2018)

warn

"y" to show warnings when S and/or T go beyond the valid range for the chosen d and k; "n" to supress warnings. The default is "y".

Details

The model used to calculate the return value of this function is based on experimental data. It is critical to consider that the formulation refers to the conditions studied during the characterization experiment and is only valid for the studied ranges of temperature and salinity:

  • Mueller and Rehder (2018): S ranging between 0 and 40, T ranging between 5 and 35oC, and the dye used being m-Cresol purple (mCP) with R referring to the ratio of absorbances at wavelengths 578 and 434 nm.

Note that the arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It can therefore be critical to use vectors of the same length.

Value

pHspec

The function returns the pH value of a water sample from absorbance ratios R, obtained from spectrophotometric measurements with pH indicator dyes (on the total scale in mol/kg-soln)

Author(s)

Jens Daniel Mueller [email protected] Jean-Pierre Gattuso [email protected]

References

Mueller, J. D. and Rehder, G., 2018 Metrology for pH Measurements in Brackish Waters - Part 2: Experimental Characterization of Purified meta-Cresol Purple for Spectrophotometric pHT Measurements. Frontiers in Marine Science 5:177, 1-9. https://doi.org/10.3389/fmars.2018.00177

See Also

amp, pHslope, pH. tris,

Examples

##Example should give test value pHT = 7.6713
	 pHspec(S=35, T=25, R=1, d="mCP", k="m18", warn="y")

Converts pH from SWS to NBS scale

Description

Converts pH on SWS scale to pH on NBS scale pCO2. The SWS-to-NBS conversion is done with the total activity coefficient fH (combined activity coeff for H+, HSO4-, and HF) from Takahashi et al. (1982) based on data from Culberson and Pytkowicz (1973). The approach is old and full of uncertainty. Newer approaches are more complicated (Pitzer equations) and big uncertainties remain (Marion et al., 2011; Pilson, 2013).

Usage

pHsws2nbs(pHSWS, S=35, T=25)

Arguments

pHSWS

pH on SWS scale

S

Salinity on the practical salinity scale, default is 35

T

Temperature in degrees Celsius, default is 25oC

Details

The pHNBS is computed from pHSWS using the total activity coefficient and relying on the following basic chemistry equation: ah=fHhswsah = fH * hsws, where ahah is the activity of hydrogen ion, fHfH is the total activity coefficient, and hsws=[H+]+[HSO4]+[HF]hsws = [H+] + [HSO4-] + [HF]. In other words, hswshsws is the hydrogen ion concentration on the seawater scale.

The two pH scales are defined as pHNBS=log10(ah)pHNBS = -log10(ah) and pHSWS=log10(hsws)pHSWS = -log10(hsws).

Value

pHNBS

pH on NBS scale

Author(s)

James Orr [email protected]

References

Culberson, C.H., & Pytkowicz, R.M. (1973). Ionization of water in seawater. Marine Chemistry, 1(4), 309-316.

Marion G.M., Millero F.J., Camoes M.F., Spitzer P., Feistel R., Chen C.T.A. 2011. pH of seawater. Marine Chemistry 126 89-96.

Pilson M.E.Q. (2013) An introduction to the chemistry of the sea, 2 edn. Cambridge, UK: Cambridge University Press.

Takahashi T., Williams R.T., and Ros D.L. (1982) Carbonate chemistry. GEOSECS Pacific Expedition, Volume 3, Hydrographic Data 1973-1974, 77-83.

See Also

fH and pHnbs2sws

Examples

## Convert pHSWS to pHNBS
   pHSWS = 7.853336                     # pH on the SWS scale
   pHNBS = pHsws2nbs(pHSWS, T=25, S=35) # pH on the NBS scale
   print(pHNBS)
## Check value: the result should be 8.0

pmix

Description

Calculates the carbonate chemistry after mixing of two water samples with different pCO2

Usage

pmix(flag, var1, var2, pCO2s, wf, S=35, T=20, P=0, Pt=0, Sit=0, k1k2="x", 
	kf="x", ks="d", pHscale="T", b="u74", eos = "eos80", long = 1e+20, lat = 1e+20)

Arguments

flag

select the couple of variables available. The flags which can be used are:

flag = 1 pH and CO2 given

flag = 2 CO2 and HCO3 given

flag = 3 CO2 and CO3 given

flag = 4 CO2 and ALK given

flag = 5 CO2 and DIC given

flag = 6 pH and HCO3 given

flag = 7 pH and CO3 given

flag = 8 pH and ALK given

flag = 9 pH and DIC given

flag = 10 HCO3 and CO3 given

flag = 11 HCO3 and ALK given

flag = 12 HCO3 and DIC given

flag = 13 CO3 and ALK given

flag = 14 CO3 and DIC given

flag = 15 ALK and DIC given

flag = 21 pCO2 and pH given

flag = 22 pCO2 and HCO3 given

flag = 23 pCO2 and CO3 given

flag = 24 pCO2 and ALK given

flag = 25 pCO2 and DIC given

var1

Value of the first variable in mol/kg except for pH and for pCO2 in μ\muatm

var2

Value of the second variable in mol/kg except for pH

pCO2s

Partial pressure of the high CO2 component in μ\muatm

wf

Weight fraction of the high CO2 seawater per kg seawater

S

Salinity

T

Temperature in degrees Celsius

P

Hydrostatic pressure in bar (surface = 0)

Pt

Concentration of total phosphate in mol/kg

Sit

Concentration of total silicate in mol/kg

k1k2

"cw" for using K1 and K2 from Cai & Wang (1998), "l" from Lueker et al. (2000), "m02" from Millero et al. (2002), "m06" from Millero et al. (2006), "m10" from Millero (2010), "mp2" from Mojica Prieto et al. (2002), "p18" from Papadimitriou et al. (2018), "r" from Roy et al. (1993), "sb21" from Shockman & Byrne (2021), "s20" from Sulpis et al. (2020), and "w14" from Waters et al. (2014). "x" is the default flag; the default value is then "l", except if T is outside the range 2 to 35oC and/or S is outside the range 19 to 43. In these cases, the default value is "w14".

kf

"pf" for using Kf from Perez and Fraga (1987) and "dg" for using Kf from Dickson and Riley (1979 in Dickson and Goyet, 1994). "x" is the default flag; the default value is then "pf", except if T is outside the range 9 to 33oC and/or S is outside the range 10 to 40. In these cases, the default is "dg".

ks

"d" for using Ks from Dickon (1990), "k" for using Ks from Khoo et al. (1977), default is "d"

pHscale

choice of pH scale: "T" for using the total scale, "F" for using the free scale and "SWS" for using the seawater scale, default is total scale

b

Concentration of total boron. "l10" for the Lee et al. (2010) formulation or "u74" for the Uppstrom (1974) formulation, default is "u74".

eos

"teos10" to specify T and S according to Thermodynamic Equation Of Seawater - 2010 (TEOS-10); "eos80" to specify T and S according to EOS-80.

long

longitude of data point, used when eos parameter is "teos10" as a conversion parameter from absolute to practical salinity.

lat

latitude of data point, used when eos parameter is "teos10".

Details

The Lueker et al. (2000) constants for K1 and K2, the Perez and Fraga (1987) constant for Kf and the Dickson (1990) constant for Ks are recommended by Dickson et al. (2007). It is, however, critical to consider that each formulation is only valid for specific ranges of temperature and salinity:

For K1 and K2:

  • Cai and Wang (1998): S ranging between 0 and 40 and T ranging between 0.2 and 30oC.

  • Lueker et al. (2000): S ranging between 19 and 43 and T ranging between 2 and 35oC.

  • Millero et al. (2002): S ranging from 34 to 37 and T ranging between -1.6 and 35oC.

  • Millero et al. (2006): S ranging between 0.1 and 50 and T ranging between 1 and 50oC.

  • Millero (2010): S ranging between 1 and 50 and T ranging between 0 and 50oC. Millero (2010) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

  • Mojica Prieto et al. (2002): S ranging from 5 to 42 and T ranging between 0 and 45oC.

  • Papadimitriou et al. (2018): S ranging from 33 to 100 and T ranging between -6 to 25oC.

  • Roy et al. (1993): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Shockman & Byrne (2021): for K2, S ranging from 19.6 to 41 and T ranging between 15 to 35oC. For K1, formulation is that of Waters et al.

  • Sulpis et al. (2020): S ranging from 30.7 to 37.6 and T ranging between -1.7 to 31.8oC.

  • Waters et al.(2014): S ranging between 1 and 50 and T ranging between 0 and 50oC. Waters (2014) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

For Kf:

  • Perez and Fraga (1987): S ranging between 10 and 40 and T ranging between 9 and 33oC.

  • Dickson and Riley (1979 in Dickson and Goyet, 1994): S ranging between 0 and 45 and T ranging between 0 and 45oC.

For Ks:

  • Dickson (1990): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Khoo et al. (1977): S ranging between 20 and 45 and T ranging between 5 and 40oC.

The arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It is recommended to use either vectors with the same dimension or one vector for one argument and numbers for the other arguments.

Pressure corrections and pH scale:

  • For K0, the pressure correction term of Weiss (1974) is used.

  • For K1, K2, pK1, pK2, pK3, Kw, Kb, Khs and Ksi, the pressure correction was applied on the seawater scale. Hence, if needed, values were first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kf, the pressure correction was applied on the free scale. The formulation of Dickson and Riley (1979 in Dickson and Goyet, 1994) provides Kf on the free scale but that of Perez and Fraga (1987) provides it on the total scale. Hence, in that case, Kf was first transformed from the total scale to the free scale. With both formulations, the pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Ks, the pressure correction was applied on the free scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kn, The pressure correction was applied on the seawater scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

long and lat are used as conversion parameters from absolute to practical salinity: when seawater is not of standard composition, practical salinity alone is not sufficient to compute absolute salinity and vice-versa. One needs to know the density. When long and lat are given, density is inferred from WOA silicate concentration at given location. When they are not, an arbitrary geographic point is chosen: mid equatorial Atlantic. Note that this implies an error on computed salinity up to 0.02 g/kg.

Value

The function returns a data frame containing the following columns:

comment

The initial or final state water

S

Salinity

T

Temperature in degrees Celsius

P

Pressure in bar

pH

pH

CO2

CO2 concentration (mol/kg)

pCO2

pCO2, CO2 partial pressure (μ\muatm)

fCO2

fCO2, CO2 fugacity (μ\muatm)

HCO3

HCO3 concentration (mol/kg)

CO3

CO3 concentration (mol/kg)

DIC

DIC concentration (mol/kg)

ALK

ALK, total alkalinity (mol/kg)

OmegaAragonite

Omega aragonite, aragonite saturation state

OmegaCalcite

Omega calcite, calcite saturation state

Note

Warning: pCO2 estimates below 100 m are subject to considerable uncertainty. See Weiss (1974) and Orr et al. (2015)

Author(s)

Jean-Pierre Gattuso and Heloise Lavigne[email protected]

References

Cai W. J., and Wang Y., 1998. The chemistry, fluxes, and sources of carbon dioxide in the estuarine waters of the Satilla and Altamaha Rivers, Georgia. Limnology and Oceanography 43, 657-668.

Dickson A. G. and Riley J. P., 1979 The estimation of acid dissociation constants in seawater media from potentiometric titrations with strong base. I. The ionic product of water. Marine Chemistry 7, 89-99.

Dickson A. G., 1990 Standard potential of the reaction: AgCI(s) + 1/2H2(g) = Ag(s) + HCI(aq), and the standard acidity constant of the ion HSO4 in synthetic sea water from 273.15 to 318.15 K. Journal of Chemical Thermodynamics 22, 113-127.

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Gattuso J.-P. and Lavigne H., 2009. Perturbation experiments to investigate the impact of ocean acidification: approaches and software tools. Biogeosciences 6, 4413-4439.

Khoo H. K., Ramette R. W., Culberson C. H. and Bates R. G., 1977 Determination of Hydrogen Ion Concentration in Seawater from 5 to 40oC: Standard Potentials at Salinities from 20 to 45. Analytical Chemistry 49, 29-34.

Lee K., Tae-Wook K., Byrne R.H., Millero F.J., Feely R.A. and Liu Y-M, 2010 The universal ratio of the boron to chlorinity for the North Pacific and North Atlantoc oceans. Geochimica et Cosmochimica Acta 74 1801-1811.

Millero F. J., 1995 Thermodynamics of the carbon dioxide system in the oceans. Geochimica Cosmochimica Acta 59: 661-677.

Millero F. J., 2010 Carbonate constant for estuarine waters. Marine and Freshwater Research 61: 139-142.

Millero F. J., Graham T. B., Huang F., Bustos-Serrano H. and Pierrot D., 2006 Dissociation constants of carbonic acid in seawater as a function of salinity and temperature. Marine Chemistry 100, 80-84.

Orr J. C., Epitalon J.-M. and Gattuso J.-P., 2015. Comparison of seven packages that compute ocean carbonate chemistry. Biogeosciences 12, 1483-1510.

Uppstrom L.R., 1974 The boron/chlorinity ratio of the deep-sea water from the Pacific Ocean. Deep-Sea Research I 21 161-162.

Waters, J., Millero, F. J., and Woosley, R. J., 2014. Corrigendum to “The free proton concentration scale for seawater pH”, [MARCHE: 149 (2013) 8-22], Marine Chemistry 165, 66-67.

Examples

pmix(flag=24, var1=384, var2=2302e-6, pCO2s=1e6, wf=0.003, S=34.3, 
	T=16, P=0, pHscale="T", kf="pf", k1k2="l", ks="d", b="u74")

ppH

Description

Calculates the carbonate chemistry after pH manipulations through addition of acid or base

Usage

ppH(flag, sys, var1, var2, pCO2a, vol, N, S=35, T=20, P=0, Pt=0, 
	Sit=0, pHscale="T", k1k2="x", kf="x", ks="d", eos = "eos80", 
	long = 1e+20, lat = 1e+20)

Arguments

flag

Select the couple of variables available. The flags which can be used are:

flag = 1 pH and CO2 given

flag = 2 CO2 and HCO3 given

flag = 3 CO2 and CO3 given

flag = 4 CO2 and ALK given

flag = 5 CO2 and DIC given

flag = 6 pH and HCO3 given

flag = 7 pH and CO3 given

flag = 8 pH and ALK given

flag = 9 pH and DIC given

flag = 10 HCO3 and CO3 given

flag = 11 HCO3 and ALK given

flag = 12 HCO3 and DIC given

flag = 13 CO3 and ALK given

flag = 14 CO3 and DIC given

flag = 15 ALK and DIC given

flag = 21 pCO2 and pH given

flag = 22 pCO2 and HCO3 given

flag = 23 pCO2 and CO3 given

flag = 24 pCO2 and ALK given

flag = 25 pCO2 and DIC given

sys

0 if the manipulation is carried out in a system closed to the atmosphere or 1 if its is carried out in a system open to the atmosphere

var1

Value of the first variable in mol/kg, except for pH and for pCO2 in μ\muatm

var2

Value of the second variable in mol/kg, except for pH

pCO2a

CO2 partial pressure in the atmosphere pCO2 in μ\muatm. It is only used in systems open to the atmosphere (i.e. when sys=1)

vol

Volume of acid or base added in liter. By convention, it is given a negative sign for acid additions and a positive sign for base additions. The acid must be fortified with NaCl in order to have the same salinity than seawater.

N

Normality of the acid or base in mol/kg

S

Salinity

T

Temperature in degrees Celsius

P

Hydrostatic pressure in bar (surface = 0)

Pt

Concentration of total phosphate in mol/kg

Sit

Concentration of total silicate in mol/kg

k1k2

"cw" for using K1 and K2 from Cai & Wang (1998), "l" from Lueker et al. (2000), "m02" from Millero et al. (2002), "m06" from Millero et al. (2006), "m10" from Millero (2010), "mp2" from Mojica Prieto et al. (2002), "p18" from Papadimitriou et al. (2018), "r" from Roy et al. (1993), "sb21" from Shockman & Byrne (2021), "s20" from Sulpis et al. (2020), and "w14" from Waters et al. (2014). "x" is the default flag; the default value is then "l", except if T is outside the range 2 to 35oC and/or S is outside the range 19 to 43. In these cases, the default value is "w14".

kf

"pf" for using Kf from Perez and Fraga (1987) and "dg" for using Kf from Dickson and Riley (1979 in Dickson and Goyet, 1994). "x" is the default flag; the default value is then "pf", except if T is outside the range 9 to 33oC and/or S is outside the range 10 to 40. In these cases, the default is "dg".

ks

"d" for using Ks from Dickon (1990), "k" for using Ks from Khoo et al. (1977), default is "d"

pHscale

choice of pH scale: "T" for using the total scale, "F" for using the free scale and "SWS" for using the seawater scale, default is total scale

eos

"teos10" to specify T and S according to Thermodynamic Equation Of Seawater - 2010 (TEOS-10); "eos80" to specify T and S according to EOS-80.

long

longitude of data point, used when eos parameter is "teos10" as a conversion parameter from absolute to practical salinity.

lat

latitude of data point, used when eos parameter is "teos10".

Details

The Lueker et al. (2000) constants for K1 and K2, the Perez and Fraga (1987) constant for Kf and the Dickson (1990) constant for Ks are recommended by Dickson et al. (2007). It is, however, critical to consider that each formulation is only valid for specific ranges of temperature and salinity:

For K1 and K2:

  • Cai and Wang (1998): S ranging between 0 and 40 and T ranging between 0.2 and 30oC.

  • Lueker et al. (2000): S ranging between 19 and 43 and T ranging between 2 and 35oC.

  • Millero et al. (2002): S ranging from 34 to 37 and T ranging between -1.6 and 35oC.

  • Millero et al. (2006): S ranging between 0.1 and 50 and T ranging between 1 and 50oC.

  • Millero (2010): S ranging between 1 and 50 and T ranging between 0 and 50oC. Millero (2010) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

  • Mojica Prieto et al. (2002): S ranging from 5 to 42 and T ranging between 0 and 45oC.

  • Papadimitriou et al. (2018): S ranging from 33 to 100 and T ranging between -6 to 25oC.

  • Roy et al. (1993): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Shockman & Byrne (2021): for K2, S ranging from 19.6 to 41 and T ranging between 15 to 35oC. For K1, formulation is that of Waters et al.

  • Sulpis et al. (2020): S ranging from 30.7 to 37.6 and T ranging between -1.7 to 31.8oC.

  • Waters et al.(2014): S ranging between 1 and 50 and T ranging between 0 and 50oC. Waters (2014) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

For Kf:

  • Perez and Fraga (1987): S ranging between 10 and 40 and T ranging between 9 and 33oC.

  • Dickson and Riley (1979 in Dickson and Goyet, 1994): S ranging between 0 and 45 and T ranging between 0 and 45oC.

For Ks:

  • Dickson (1990): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Khoo et al. (1977): S ranging between 20 and 45 and T ranging between 5 and 40oC.

The arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It is recommended to use either vectors with the same dimension or one vector for one argument and numbers for the other arguments.

Pressure corrections and pH scale:

  • For K0, the pressure correction term of Weiss (1974) is used.

  • For K1, K2, pK1, pK2, pK3, Kw, Kb, Khs and Ksi, the pressure correction was applied on the seawater scale. Hence, if needed, values were first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kf, the pressure correction was applied on the free scale. The formulation of Dickson and Riley (1979 in Dickson and Goyet, 1994) provides Kf on the free scale but that of Perez and Fraga (1987) provides it on the total scale. Hence, in that case, Kf was first transformed from the total scale to the free scale. With both formulations, the pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Ks, the pressure correction was applied on the free scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kn, The pressure correction was applied on the seawater scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

long and lat are used as conversion parameters from absolute to practical salinity: when seawater is not of standard composition, practical salinity alone is not sufficient to compute absolute salinity and vice-versa. One needs to know the density. When long and lat are given, density is inferred from WOA silicate concentration at given location. When they are not, an arbitrary geographic point is chosen: mid equatorial Atlantic. Note that this implies an error on computed salinity up to 0.02 g/kg.

Value

The function returns a data frame containing the following columns:

comment

The initial or final state water

S

Salinity

T

Temperature in degrees Celsius

P

Pressure in bar

pH

pH

CO2

CO2 concentration (mol/kg)

pCO2

pCO2, CO2 partial pressure (μ\muatm)

fCO2

fCO2, CO2 fugacity (μ\muatm)

HCO3

HCO3 concentration (mol/kg)

CO3

CO3 concentration (mol/kg)

DIC

DIC concentration (mol/kg)

ALK

ALK, total alkalinity (mol/kg)

OmegaAragonite

Omega aragonite, aragonite saturation state

OmegaCalcite

Omega calcite, calcite saturation state

Note

Warning: pCO2 estimates below 100 m are subject to considerable uncertainty. See Weiss (1974) and Orr et al. (2015)

Author(s)

Jean-Pierre Gattuso and Heloise Lavigne[email protected]

References

Cai W. J., and Wang Y., 1998. The chemistry, fluxes, and sources of carbon dioxide in the estuarine waters of the Satilla and Altamaha Rivers, Georgia. Limnology and Oceanography 43, 657-668.

Dickson A. G., 1990 Standard potential of the reaction: AgCI(s) + 1/2H2(g) = Ag(s) + HCI(aq), and the standard acidity constant of the ion HSO4 in synthetic sea water from 273.15 to 318.15 K. Journal of Chemical Thermodynamics 22, 113-127.

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Khoo H. K., Ramette R. W., Culberson C. H. and Bates R. G., 1977 Determination of Hydrogen Ion Concentration in Seawater from 5 to 40oC: Standard Potentials at Salinities from 20 to 45. Analytical Chemistry 49, 29-34.

Gattuso J.-P. and Lavigne H., 2009 Perturbation experiments to investigate the impact of ocean acidification: approaches and software tools. Biogeosciences 6, 4413-4439.

Millero F. J., 2010 Carbonate constant for estuarine waters. Marine and Freshwater Research 61: 139-142.

Millero F. J., Graham T. B., Huang F., Bustos-Serrano H. and Pierrot D., 2006 Dissociation constants of carbonic acid in seawater as a function of salinity and temperature. Marine Chemistry 100, 80-84.

Orr J. C., Epitalon J.-M. and Gattuso J.-P., 2015. Comparison of seven packages that compute ocean carbonate chemistry. Biogeosciences 12, 1483-1510.

Waters, J., Millero, F. J., and Woosley, R. J., 2014. Corrigendum to “The free proton concentration scale for seawater pH”, [MARCHE: 149 (2013) 8-22], Marine Chemistry 165, 66-67.

See Also

buffer.

Examples

ppH(flag=24, sys=0, var1=384, var2=2302e-6, pCO2a=384, vol=-12e-3, 
	N=0.01, S=34.3, T=16, P=0, pHscale="T", kf="pf", k1k2="l", ks="d")

ppH(flag=24, sys=1, var1=384, var2=2302e-6, pCO2a=384, vol=-12e-3, 
	N=0.01, S=34.3, T=16, P=0, pHscale="T", kf="pf", k1k2="l", ks="d")

Molar ratio of CO2 released vs CaCO3 precipitated

Description

Returns the molar ratio of CO2 released vs CaCO3 precipitated described by Frankignoulle et al. (1994).

Usage

psi(flag, var1, var2, S=35, T=20, Patm, P=0, Pt=0, Sit=0, pHscale="T", 
	kf="x", k1k2="x", ks="d", eos = "eos80", long = 1e+20, lat = 1e+20)

Arguments

flag

select the couple of variables available. The flags which can be used are:

flag = 1 pH and CO2 given

flag = 2 CO2 and HCO3 given

flag = 3 CO2 and CO3 given

flag = 4 CO2 and ALK given

flag = 5 CO2 and DIC given

flag = 6 pH and HCO3 given

flag = 7 pH and CO3 given

flag = 8 pH and ALK given

flag = 9 pH and DIC given

flag = 10 HCO3 and CO3 given

flag = 11 HCO3 and ALK given

flag = 12 HCO3 and DIC given

flag = 13 CO3 and ALK given

flag = 14 CO3 and DIC given

flag = 15 ALK and DIC given

flag = 21 pCO2 and pH given

flag = 22 pCO2 and HCO3 given

flag = 23 pCO2 and CO3 given

flag = 24 pCO2 and ALK given

flag = 25 pCO2 and DIC given

var1

enter value of the first variable in mol/kg, except for pH and for pCO2 in μ\muatm

var2

enter value of the second variable in mol/kg, except for pH

S

Salinity

T

Temperature in degrees Celsius

Patm

Surface atmospheric pressure in atm, default is 1 atm

P

Hydrostatic pressure in bar (surface = 0)

Pt

Concentration of total phosphate in mol/kg; set to 0 if NA

Sit

Concentration of total silicate in mol/kg; set to 0 if NA

pHscale

choice of pH scale: "T" for the total scale, "F" for the free scale and "SWS" for using the seawater scale, default is "T" (total scale)

k1k2

"cw" for using K1 and K2 from Cai & Wang (1998), "l" from Lueker et al. (2000), "m02" from Millero et al. (2002), "m06" from Millero et al. (2006), "m10" from Millero (2010), "mp2" from Mojica Prieto et al. (2002), "p18" from Papadimitriou et al. (2018), "r" from Roy et al. (1993), "sb21" from Shockman & Byrne (2021), "s20" from Sulpis et al. (2020), and "w14" from Waters et al. (2014). "x" is the default flag; the default value is then "l", except if T is outside the range 2 to 35oC and/or S is outside the range 19 to 43. In these cases, the default value is "w14".

kf

"pf" for using Kf from Perez and Fraga (1987) and "dg" for using Kf from Dickson and Riley (1979 in Dickson and Goyet, 1994). "x" is the default flag; the default value is then "pf", except if T is outside the range 9 to 33oC and/or S is outside the range 10 to 40. In these cases, the default is "dg".

ks

"d" for using Ks from Dickon (1990), "k" for using Ks from Khoo et al. (1977), default is "d"

eos

"teos10" to specify T and S according to Thermodynamic Equation Of Seawater - 2010 (TEOS-10); "eos80" to specify T and S according to EOS-80.

long

longitude of data point, used when eos parameter is "teos10" as a conversion parameter from absolute to practical salinity.

lat

latitude of data point, used when eos parameter is "teos10".

Details

The Lueker et al. (2000) constants for K1 and K2, the Perez and Fraga (1987) constant for Kf and the Dickson (1990) constant for Ks are recommended by Dickson et al. (2007). It is, however, critical to consider that each formulation is only valid for specific ranges of temperature and salinity:

For K1 and K2:

  • Cai and Wang (1998): S ranging between 0 and 40 and T ranging between 0.2 and 30oC.

  • Lueker et al. (2000): S ranging between 19 and 43 and T ranging between 2 and 35oC.

  • Millero et al. (2002): S ranging from 34 to 37 and T ranging between -1.6 and 35oC.

  • Millero et al. (2006): S ranging between 0.1 and 50 and T ranging between 1 and 50oC.

  • Millero (2010): S ranging between 1 and 50 and T ranging between 0 and 50oC. Millero (2010) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

  • Mojica Prieto et al. (2002): S ranging from 5 to 42 and T ranging between 0 and 45oC.

  • Papadimitriou et al. (2018): S ranging from 33 to 100 and T ranging between -6 to 25oC.

  • Roy et al. (1993): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Shockman & Byrne (2021): for K2, S ranging from 19.6 to 41 and T ranging between 15 to 35oC. For K1, formulation is that of Waters et al.

  • Sulpis et al. (2020): S ranging from 30.7 to 37.6 and T ranging between -1.7 to 31.8oC.

  • Waters et al.(2014): S ranging between 1 and 50 and T ranging between 0 and 50oC. Waters (2014) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

For Kf:

  • Perez and Fraga (1987): S ranging between 10 and 40 and T ranging between 9 and 33oC.

  • Dickson and Riley (1979 in Dickson and Goyet, 1994): S ranging between 0 and 45 and T ranging between 0 and 45oC.

For Ks:

  • Dickson (1990): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Khoo et al. (1977): S ranging between 20 and 45 and T ranging between 5 and 40oC.

The arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It is recommended to use either vectors with the same dimension or one vector for one argument and numbers for the other arguments.

Pressure corrections and pH scale:

  • For K0, the pressure correction term of Weiss (1974) is used.

  • For K1, K2, pK1, pK2, pK3, Kw, Kb, Khs and Ksi, the pressure correction was applied on the seawater scale. Hence, if needed, values were first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kf, the pressure correction was applied on the free scale. The formulation of Dickson and Riley (1979 in Dickson and Goyet, 1994) provides Kf on the free scale but that of Perez and Fraga (1987) provides it on the total scale. Hence, in that case, Kf was first transformed from the total scale to the free scale. With both formulations, the pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Ks, the pressure correction was applied on the free scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kn, The pressure correction was applied on the seawater scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

long and lat are used as conversion parameters from absolute to practical salinity: when seawater is not of standard composition, practical salinity alone is not sufficient to compute absolute salinity and vice-versa. One needs to know the density. When long and lat are given, density is inferred from WOA silicate concentration at given location. When they are not, an arbitrary geographic point is chosen: mid equatorial Atlantic. Note that this implies an error on computed salinity up to 0.02 g/kg.

Value

The function returns a data frame containing the following columns:

psi

ratio of CO2 released vs CaCO3 precipitated (mol/mol)

Author(s)

Jean-Pierre Gattuso and Heloise Lavigne [email protected]

References

Cai W. J., and Wang Y., 1998. The chemistry, fluxes, and sources of carbon dioxide in the estuarine waters of the Satilla and Altamaha Rivers, Georgia. Limnology and Oceanography 43, 657-668.

Dickson A. G., 1990 Standard potential of the reaction: AgCI(s) + 1/2H2(g) = Ag(s) + HCI(aq), and the standard acidity constant of the ion HSO4 in synthetic sea water from 273.15 to 318.15 K. Journal of Chemical Thermodynamics 22, 113-127.

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Khoo H. K., Ramette R. W., Culberson C. H. and Bates R. G., 1977 Determination of Hydrogen Ion Concentration in Seawater from 5 to 40oC: Standard Potentials at Salinities from 20 to 45. Analytical Chemistry 49, 29-34.

Frankignoulle M., 1994 A complete set of buffer factors for acid/base CO2 system in seawater. Journal of Marine Systems 5, 111-118.

Frankignoulle M., Canon C. and Gattuso J.P., 1994 Marine calcification as a source of carbon dioxide- Positive feedback of increasing atmospheric CO2. Limnology and Oceanography 2, 458-462.

Millero F. J., 2010 Carbonate constant for estuarine waters. Marine and Freshwater Research 61: 139-142.

Millero F. J., Graham T. B., Huang F., Bustos-Serrano H. and Pierrot D., 2006 Dissociation constants of carbonic acid in seawater as a function of salinity and temperature. Marine Chemistry 100, 80-84.

Waters, J., Millero, F. J., and Woosley, R. J., 2014. Corrigendum to “The free proton concentration scale for seawater pH”, [MARCHE: 149 (2013) 8-22], Marine Chemistry 165, 66-67.

See Also

speciation.

Examples

## Calculation using the numerical example given in Frankignoulle et al. (1994)
psi(flag=24, var1=350, var2=2400e-6, S=35, T=25, P=0, Pt=0, 
	Sit=0, pHscale="T", kf="pf", k1k2="l", ks="d")

pTA

Description

Calculates the carbonate chemistry following addition of CO32CO_3^{2-} or HCO3HCO_3^-

Usage

pTA(flag, sys=0, var1, var2, pCO2a, co3, hco3, S=35, T=20, P=0, 
	Pt=0, Sit=0, k1k2="x", kf="x", ks="d", pHscale="T", b="u74", 
	eos = "eos80", long = 1e+20, lat = 1e+20)

Arguments

flag

select the couple of variables available. The flags which can be used are:

flag = 1 pH and CO2 given

flag = 2 CO2 and HCO3 given

flag = 3 CO2 and CO3 given

flag = 4 CO2 and ALK given

flag = 5 CO2 and DIC given

flag = 6 pH and HCO3 given

flag = 7 pH and CO3 given

flag = 8 pH and ALK given

flag = 9 pH and DIC given

flag = 10 HCO3 and CO3 given

flag = 11 HCO3 and ALK given

flag = 12 HCO3 and DIC given

flag = 13 CO3 and ALK given

flag = 14 CO3 and DIC given

flag = 15 ALK and DIC given

flag = 21 pCO2 and pH given

flag = 22 pCO2 and HCO3 given

flag = 23 pCO2 and CO3 given

flag = 24 pCO2 and ALK given

flag = 25 pCO2 and DIC given

sys

0 if the manipulation is carried out in a system closed to the atmosphere or 1 if its is carried out in a system open to the atmosphere

var1

Value of the first variable in mol/kg, except for pH and for pCO2 in μ\muatm

var2

Value of the second variable in mol/kg, except for pH

pCO2a

CO2 partial pressure in the atmosphere pCO2 in μ\muatm. It is only used in systems open to the atmosphere (i.e. when sys=1)

co3

Amount of CO32CO_3^{2-} added in molkg1mol\,kg^{-1}

hco3

Amount of HCO32HCO_3^{2-} added in molkg1mol\,kg^{-1}

S

Salinity

T

Temperature in degrees Celsius

P

Hydrostatic pressure in bar (surface = 0)

Pt

Concentration of total phosphate in mol/kg

Sit

Concentration of total silicate in mol/kg

k1k2

"cw" for using K1 and K2 from Cai & Wang (1998), "l" from Lueker et al. (2000), "m02" from Millero et al. (2002), "m06" from Millero et al. (2006), "m10" from Millero (2010), "mp2" from Mojica Prieto et al. (2002), "p18" from Papadimitriou et al. (2018), "r" from Roy et al. (1993), "sb21" from Shockman & Byrne (2021), "s20" from Sulpis et al. (2020), and "w14" from Waters et al. (2014). "x" is the default flag; the default value is then "l", except if T is outside the range 2 to 35oC and/or S is outside the range 19 to 43. In these cases, the default value is "w14".

kf

"pf" for using Kf from Perez and Fraga (1987) and "dg" for using Kf from Dickson and Riley (1979 in Dickson and Goyet, 1994). "x" is the default flag; the default value is then "pf", except if T is outside the range 9 to 33oC and/or S is outside the range 10 to 40. In these cases, the default is "dg".

ks

"d" for using Ks from Dickon (1990), "k" for using Ks from Khoo et al. (1977), default is "d"

pHscale

"T" for the total scale, "F" for the free scale and "SWS" for using the seawater scale, default is "T" (total scale)

b

Concentration of total boron. "l10" for the Lee et al. (2010) formulation or "u74" for the Uppstrom (1974) formulation, default is "u74".

eos

"teos10" to specify T and S according to Thermodynamic Equation Of Seawater - 2010 (TEOS-10); "eos80" to specify T and S according to EOS-80.

long

longitude of data point, used when eos parameter is "teos10" as a conversion parameter from absolute to practical salinity.

lat

latitude of data point, used when eos parameter is "teos10".

Details

The Lueker et al. (2000) constants for K1 and K2, the Perez and Fraga (1987) constant for Kf and the Dickson (1990) constant for Ks are recommended by Dickson et al. (2007). It is, however, critical to consider that each formulation is only valid for specific ranges of temperature and salinity:

For K1 and K2:

  • Cai and Wang (1998): S ranging between 0 and 40 and T ranging between 0.2 and 30oC.

  • Lueker et al. (2000): S ranging between 19 and 43 and T ranging between 2 and 35oC.

  • Millero et al. (2002): S ranging from 34 to 37 and T ranging between -1.6 and 35oC.

  • Millero et al. (2006): S ranging between 0.1 and 50 and T ranging between 1 and 50oC.

  • Millero (2010): S ranging between 1 and 50 and T ranging between 0 and 50oC. Millero (2010) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

  • Mojica Prieto et al. (2002): S ranging from 5 to 42 and T ranging between 0 and 45oC.

  • Papadimitriou et al. (2018): S ranging from 33 to 100 and T ranging between -6 to 25oC.

  • Roy et al. (1993): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Shockman & Byrne (2021): for K2, S ranging from 19.6 to 41 and T ranging between 15 to 35oC. For K1, formulation is that of Waters et al.

  • Sulpis et al. (2020): S ranging from 30.7 to 37.6 and T ranging between -1.7 to 31.8oC.

  • Waters et al.(2014): S ranging between 1 and 50 and T ranging between 0 and 50oC. Waters (2014) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

For K0:

  • Perez and Fraga (1987): S ranging between 10 and 40 and T ranging between 9 and 33oC.

  • Dickson and Riley (1979 in Dickson and Goyet, 1994): S ranging between 0 and 45 and T ranging between 0 and 45oC.

For Ks:

  • Dickson (1990): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Khoo et al. (1977): S ranging between 20 and 45 and T ranging between 5 and 40oC.

The arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It is recommended to use either vectors with the same dimension or one vector for one argument and numbers for the other arguments.

Pressure corrections and pH scale:

  • For K0, the pressure correction term of Weiss (1974) is used.

  • For K1, K2, pK1, pK2, pK3, Kw, Kb, Khs and Ksi, the pressure correction was applied on the seawater scale. Hence, if needed, values were first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kf, the pressure correction was applied on the free scale. The formulation of Dickson and Riley (1979 in Dickson and Goyet, 1994) provides Kf on the free scale but that of Perez and Fraga (1987) provides it on the total scale. Hence, in that case, Kf was first transformed from the total scale to the free scale. With both formulations, the pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Ks, the pressure correction was applied on the free scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kn, The pressure correction was applied on the seawater scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

long and lat are used as conversion parameters from absolute to practical salinity: when seawater is not of standard composition, practical salinity alone is not sufficient to compute absolute salinity and vice-versa. One needs to know the density. When long and lat are given, density is inferred from WOA silicate concentration at given location. When they are not, an arbitrary geographic point is chosen: mid equatorial Atlantic. Note that this implies an error on computed salinity up to 0.02 g/kg.

Value

The function returns a data frame containing the following columns:

comment

The initial or final state water

S

Salinity

T

Temperature in degrees Celsius

P

Pressure in bar

pH

pH

CO2

CO2 concentration (mol/kg)

pCO2

pCO2, CO2 partial pressure (μ\muatm)

fCO2

fCO2, CO2 fugacity (μ\muatm)

HCO3

HCO3 concentration (mol/kg)

CO3

CO3 concentration (mol/kg)

DIC

DIC concentration (mol/kg)

ALK

ALK, total alkalinity (mol/kg)

OmegaAragonite

Omega aragonite, aragonite saturation state

OmegaCalcite

Omega calcite, calcite saturation state

Note

Warning: pCO2 estimates below 100 m are subject to considerable uncertainty. See Weiss (1974) and Orr et al. (2015)

Author(s)

Jean-Pierre Gattuso [email protected]

References

Cai W. J., and Wang Y., 1998. The chemistry, fluxes, and sources of carbon dioxide in the estuarine waters of the Satilla and Altamaha Rivers, Georgia. Limnology and Oceanography 43, 657-668.

Dickson A. G. and Riley J. P., 1979 The estimation of acid dissociation constants in seawater media from potentiometric titrations with strong base. I. The ionic product of water. Marine Chemistry 7, 89-99.

Dickson A. G., 1990 Standard potential of the reaction: AgCI(s) + 1/2H2(g) = Ag(s) + HCI(aq), and the standard acidity constant of the ion HSO4 in synthetic sea water from 273.15 to 318.15 K. Journal of Chemical Thermodynamics 22, 113-127.

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Gattuso J.-P. and Lavigne H., 2009 Perturbation experiments to investigate the impact of ocean acidification: approaches and software tools. Biogeosciences 6, 4413-4439.

Khoo H. K., Ramette R. W., Culberson C. H. and Bates R. G., 1977 Determination of Hydrogen Ion Concentration in Seawater from 5 to 40oC: Standard Potentials at Salinities from 20 to 45. Analytical Chemistry 49, 29-34.

Lee K., Tae-Wook K., Byrne R.H., Millero F.J., Feely R.A. and Liu Y-M, 2010 The universal ratio of the boron to chlorinity for the North Pacific and North Atlantoc oceans. Geochimica et Cosmochimica Acta 74 1801-1811.

Millero F. J., 1995 Thermodynamics of the carbon dioxide system in the oceans. Geochimica Cosmochimica Acta 59: 661-677.

Millero F. J., 2010 Carbonate constant for estuarine waters. Marine and Freshwater Research 61: 139-142.

Millero F. J., Graham T. B., Huang F., Bustos-Serrano H. and Pierrot D., 2006 Dissociation constants of carbonic acid in seawater as a function of salinity and temperature. Marine Chemistry 100, 80-84.

Orr J. C., Epitalon J.-M. and Gattuso J.-P., 2015. Comparison of seven packages that compute ocean carbonate chemistry. Biogeosciences 12, 1483-1510.

Uppstrom L.R., 1974 The boron/chlorinity ratio of the deep-sea water from the Pacific Ocean. Deep-Sea Research I 21 161-162.

Waters, J., Millero, F. J., and Woosley, R. J., 2014. Corrigendum to “The free proton concentration scale for seawater pH”, [MARCHE: 149 (2013) 8-22], Marine Chemistry 165, 66-67.

Weiss, R. F., 1974. Carbon dioxide in water and seawater: the solubility of a non-ideal gas, Mar. Chem., 2, 203-215.

Examples

pTA(flag=24, sys=0, var1=384, var2=2302e-6, pCO2a=384, co3=260e-6, 
	hco3=1000e-6, S=34.3, T=16, P=0, pHscale="T", kf="pf", k1k2="l", ks="d", b="u74")

pTA(flag=24, sys=1, var1=384, var2=2302e-6, pCO2a=384, co3=260e-6, 
	hco3=1000e-6, S=34.3, T=16, P=0, pHscale="T", kf="pf", k1k2="l", ks="d", b="u74")

Density of seawater (kg/m3)

Description

Calculates the density of seawater (kg m3kg\ m^{-3})

Usage

rho(S = 35, T = 25, P = 0)

Arguments

S

Practical Salinity (PSS-78), default is 35

T

Temperature in degrees Celsius (ITS-90), default is 25oC

P

Hydrostatic pressure in bar (surface = 0), default is 0

Value

rho

Density of seawater (kg/m3)

Author(s)

Aurelien Proye and Jean-Pierre Gattuso [email protected]

References

Millero F. J. and Poisson A., 1981 International one-atmosphere equation of state of seawater. Deep-Sea Research 28A, 625-629.

Examples

rho(35,25,0)

From absolute to practical salinity

Description

Converts from absolute to practical salinity (SP). Salinity conversion depends on total alkalinity as well as the concentrations of dissolved inorganic carbon, nitrate and silicate.

Usage

sa2sp_chem(SA, TA=2300e-6, DIC=2000e-6, NO3=0, SIOH4=0)

Arguments

SA

Absolute salinity in g/kg

TA

Total alkalinity, in mol/kg, default is 2300 µmol/kg

DIC

Dissolved inorganic carbon concentration in mol/kg, default is 2000 µmol/kg

NO3

Total nitrate concentration in mol/kg, default is 0

SIOH4

Total silicate concentration in mol/kg, default is 0

Details

Convert from absolute to practical salinity from carbon system parameters and ion concentration which most affect water density anomalies.

Value

SP

Practical salinity (in psu)

Author(s)

Jean-Marie Epitalon

References

McDougall T. J., Jackett D. R., Millero F. J., Pawlowicz R. and Barker P. M., 2012. A global algorithm for estimating Absolute Salinity. Ocean Science 8, 1123-1134.

Pawlowicz R., Wright D. G. and Millero F. J., 2011. The effects of biogeochemical processes on oceanic conductivity/salinity/density relationships and the characterization of real seawater. Ocean Science 7, 363-387.

Pawlowicz R., 2013. What every oceanographer needs to know about TEOS-10 (The TEOS-10 Primer). http://www.teos-10.org/

See Also

sp2sa_chem does the reverse, sa2sp_geo

Examples

# Calculate the practical salinity of a sample with Absolute Salinity of 35 g/kg,
   # Total Alkalinity of 0.00234 mol/kg and DIC of 0.00202 mol/kg
   SP <- sa2sp_chem(SA=35, TA=0.00234, DIC=0.00202)

From absolute to practical salinity

Description

Converts from absolute to practical salinity based on depth and geographic location.

Usage

sa2sp_geo(SA, P=0, long=1.e20, lat=1.e20)

Arguments

SA

Absolute salinity in g/kg

P

Sea water pressure in dbar

long

Longitude in decimal degrees [ 0 ... +360 ] or [ -180 ... +180 ]

lat

Latitude in decimal degrees [-90 ... 90]

Details

This function is almost an alias of subroutine gsw_SP_from_SA from gsw package on which it relies. The only difference is in that depth and location are optional. If location is not given, or incomplete (either longitude or latitude missing), an arbitrary location is chosen: the mid equatorial atlantic ocean. Note that this implies an error on computed SA ranging from 0 up to 0.02 g/kg.

Value

SP

Practical salinity (psu)

Author(s)

Jean-Marie Epitalon

References

McDougall T. J., Jackett D. R., Millero F. J., Pawlowicz R. and Barker P. M., 2012. A global algorithm for estimating Absolute Salinity. Ocean Science 8, 1123-1134.

Pawlowicz R., 2013. What every oceanographer needs to know about TEOS-10 (The TEOS-10 Primer). http://www.teos-10.org/

See Also

sp2sa_geo does the reverse, sa2sp_chem

Examples

# Calculate the practical salinity of a sample whose absolute Salinity is 35,
   # depth is 10 dbar and location is 188 degrees East and 4 degrees North.
   SP <- sa2sp_geo(35, 10, 188, 4)

Test data file (at P=0) to test the use of the carb function

Description

The variables are:

  • Flag indicating which couple of variables is used

  • Value of the first variable in mol/kg, except for pH and for pCO2 in μ\muatm

  • Value of the second variable in mol/kg, except for pH

  • Salinity

  • Temperature in degrees Celsius

  • Hydrostatic pressure in bar (surface = 0)

  • Value of the concentration of total phosphate in mol/kg

  • Value of the total silicate in mol/kg

Usage

seacarb_test_P0

Format

A data frame with 20 rows and 8 variables

Source

None, these data were invented for this purpose. The input variables were chosen in order to check that the carbonate chemistry is identical for all flags.


Test data file (at P=300) to test the use of the carb function

Description

The variables are:

  • Flag indicating which couple of variables is used

  • Value of the first variable in mol/kg, except for pH and for pCO2 in μ\muatm

  • Value of the second variable in mol/kg, except for pH

  • Salinity

  • Temperature in degrees Celsius

  • Hydrostatic pressure in bar (P=300)

  • Value of the concentration of total phosphate in mol/kg

  • Value of the total silicate in mol/kg

Usage

seacarb_test_P300

Format

A data frame with 20 rows and 8 variables

Source

None, these data were invented for this purpose. The input variables were chosen in order to check that the carbonate chemistry is identical for all flags.


Test seaFET data file

Description

Short test file for using with functions sf_calc and sf_calib. It is an excerpt of a file produced by a SeaFET pH sensor.

Usage

seaFET

Format

A data frame with 8 variables (datetime, Eint, Eext, Salinity, Temperature, pHspectro, E0int25, E0ext25) and 10 rows


Calculation of calibrated pH for seaFET sensor

Description

The function sf_calc() calculates pH time series (pHint_tot and pHext_tot) for SeaFET pH sensors, using calibration coefficients E0int25 and E0ext25 from the function sf_calib(). Both functions are R-adaptations from MATLAB scripts published by Bresnahan et al. (2014).

Usage

sf_calc(calEint=0.0865, calEext= -0.93, E0int25 =-0.39, 
  E0ext25=-1.46, calT=16.2, calSal=35.6)

Arguments

calEint

EINT (V), default is 0.0865

calEext

EEXT (V), default is -0.93

E0int25

Coeficient of calibration related to the internal sensor and obtained via sf_calib function, default is -0.39. If time-serie, we use the mean per periode of deployement

E0ext25

Coeficient of calibration related to the external sensor and obtained via sf_calib function, default is -1.46. If time-serie, we use the mean per periode of deployement

calT

Temperature in degrees Celsius, default is 16.2

calSal

Salinity, default is 35.6

Details

Input values should be vectors of equal length. E0int25 and E0ext25 should be constant throughout the time series. When multiple reference samples are available for one SeaFET deployment, mean E0int25 and mean E0ext25 should be calculated and used in sf_calc(). Each unique SeaFET deployment requires a new calculation of mean E0int25 and mean E0ext25 based on reference pH samples (total hydrogen ion scale). For detailed SeaFET calibration instructions and recommendations see Bresnahan et al. (2014) and Rivest et al. (2016).

Value

This function returns a dataframe comprising 2 variables:

pHint_tot

Calibrated pH of the internal sensor at in situ temperature.

pHext_tot

Calibrated pH of the external sensor at in situ temperature.

Author(s)

Samir Alliouane, Lydia Kapsenberg, Jean-Pierre Gattuso [email protected]

References

Bresnahan, P. J. J., Martz, T. R., Takeshita, Y., Johnson, K. S., and LaShomb, M., 2014. Best practices for autonomous measurement of seawater pH with the Honeywell Durafet. Methods Oceanogr. 9, 44-60.

Martz, T.R., Connery, J.G., and Johnson, K.S., 2010. Testing the Honeywell Durafet for seawater pH applications. Limnol. Oceanogr. Meth. 8, 172-184.

Rivest, E.B., O'Brien, M., Kapsenberg, L., Gotschalk, C.C., Blanchette, C.A., Hoshijima, U., and Hofmann, G.E., 2016. Beyond the benchtop and the benthos: dataset management planning and design for time series of ocean carbonate chemistry associated with Durafet(c)-based pH sensors. Ecological Informatics 36, 209-220.

See Also

sf_calib.

Examples

sf_calc(calEint=0.0865, calEext= -0.93, E0int25 =-0.39, 
  E0ext25=-1.46, calT=16.2, calSal=35.6)

## Using the test file seaFET
sf_calc(calEint=seaFET$Eint, calEext=seaFET$Eext, 
  E0int25=seaFET$E0int25, E0ext25=seaFET$E0ext25, 
  calT=seaFET$Temperature, calSal=seaFET$Salinity)

Calibration coefficients for seaFET sensor

Description

Calibration coefficients E0INT,25, E0EXT,25

Usage

sf_calib(calEint=0.0865, calEext=-0.93, calpH=8.132, calT=16.2, calSal=35.6)

Arguments

calEint

EINT (V), default is 0.0865

calEext

EEXT (V), default is -0.93

calpH

spectrophotometric pH in Total scale, default is 8.132

calT

Temperature in degrees Celsius, default is 16.2

calSal

Salinity, default is 35.6

Details

Outputs E0INT25 and E0EXT25 must be calculated for each reference sample collected during a SeaFET deployment. Multiple E0INT25 and E0EXT25 may be calculated if there is more than one reference sample for a given deployment. As such, arguments can be given as unique numbers or as vectors (vectors should be of the same length).

It is critical that Eint (calEint) and Eext (calEext) recorded by the SeaFET match reference sample measurements of temperature (calT), salinity (calSal), and spectrophotometric pH (calpH, total hydrogen ion scale) taken at the same time. Note that SeaFET temperature measurements may require calibration via an applied offset. When possible, calibrated CTD temperature and salinity measurements may be used, while spectrophotometric pH measurements always require discrete 'reference' water samples (unless in situ, certified, seawater-based, Tris pH buffer is used). The accepted time offset between collection of reference samples and SeaFET measurements depends on the hydrology and pH variability of the location. For detailed SeaFET calibration instructions and recommendations see Bresnahan et al. (2014) and Rivest et al. (2016).

Value

This function returns a dataframe comprising 2 variables:

E0int25

Calibration coefficients of the internal sensor at 25oC.

E0ext25

Calibration coefficients of the external sensor at 25oC.

Author(s)

Samir Alliouane, Lydia Kapsenberg, Jean-Pierre Gattuso [email protected]

References

Bresnahan, P. J. J., Martz, T. R., Takeshita, Y., Johnson, K. S., and LaShomb, M., 2014. Best practices for autonomous measurement of seawater pH with the Honeywell Durafet. Methods Oceanogr. 9, 44-60.

Martz, T.R., Connery, J.G., and Johnson, K.S., 2010. Testing the Honeywell Durafet for seawater pH applications. Limnol. Oceanogr. Meth. 8, 172-184.

Rivest, E.B., O'Brien, M., Kapsenberg, L., Gotschalk, C.C., Blanchette, C.A., Hoshijima, U., and Hofmann, G.E., 2016. Beyond the benchtop and the benthos: dataset management planning and design for time series of ocean carbonate chemistry associated with Durafet(c)-based pH sensors. Ecological Informatics 36, 209-220.

See Also

sf_calc.

Examples

sf_calib(calEint=0.0865, calEext=-0.93, calpH=8.132, calT=16.2, calSal=35.6)

## Using the test file seaFET
sf_calib(calEint=seaFET$Eint, calEext=seaFET$Eext, 
  calpH=seaFET$pHspectro, calT=seaFET$Temperature, 
  calSal=seaFET$Salinity)

Parameters of the seawater carbonate system including the substrate-inhibitor-ratio (SIR)

Description

This function is a modification of carb. It returns parameters of the seawater carbonate system, as well as additional parameters relevant to the substrate-inhibitor-ratio (SIR).

Usage

sir(flag, var1, var2, S = 35, T = 25, Patm = 1, P = 0, 
               Pt = 0, Sit = 0, k1k2 = "x", kf = "x", ks = "d", pHscale = "T", 
               b = "u74", gas = "potential", warn = "y", eos = "eos80", 
               long = 1e+20, lat = 1e+20)

Arguments

flag

select the couple of variables available. The flags which can be used are:

flag = 1 pH and CO2 given

flag = 2 CO2 and HCO3 given

flag = 3 CO2 and CO3 given

flag = 4 CO2 and ALK given

flag = 5 CO2 and DIC given

flag = 6 pH and HCO3 given

flag = 7 pH and CO3 given

flag = 8 pH and ALK given

flag = 9 pH and DIC given

flag = 10 HCO3 and CO3 given

flag = 11 HCO3 and ALK given

flag = 12 HCO3 and DIC given

flag = 13 CO3 and ALK given

flag = 14 CO3 and DIC given

flag = 15 ALK and DIC given

flag = 21 pCO2 and pH given

flag = 22 pCO2 and HCO3 given

flag = 23 pCO2 and CO3 given

flag = 24 pCO2 and ALK given

flag = 25 pCO2 and DIC given

var1

Value of the first variable in mol/kg, except for pH and for pCO2 in μ\muatm

var2

Value of the second variable in mol/kg, except for pH

S

Salinity

T

Temperature in degrees Celsius

Patm

Surface atmospheric pressure in atm, default is 1 atm

P

Hydrostatic pressure in bar (surface = 0)

Pt

Concentration of total phosphate in mol/kg; set to 0 if NA

Sit

Concentration of total silicate in mol/kg; set to 0 if NA

k1k2

"cw" for using K1 and K2 from Cai & Wang (1998), "l" from Lueker et al. (2000), "m02" from Millero et al. (2002), "m06" from Millero et al. (2006), "m10" from Millero (2010), "mp2" from Mojica Prieto et al. (2002), "p18" from Papadimitriou et al. (2018), "r" from Roy et al. (1993), "sb21" from Shockman & Byrne (2021), "s20" from Sulpis et al. (2020), and "w14" from Waters et al. (2014). "x" is the default flag; the default value is then "l", except if T is outside the range 2 to 35oC and/or S is outside the range 19 to 43. In these cases, the default value is "w14".

kf

"pf" for using Kf from Perez and Fraga (1987) and "dg" for using Kf from Dickson and Riley (1979 in Dickson and Goyet, 1994). "x" is the default flag; the default value is then "pf", except if T is outside the range 9 to 33oC and/or S is outside the range 10 to 40. In these cases, the default is "dg".

ks

"d" for using Ks from Dickson (1990) and "k" for using Ks from Khoo et al. (1977), default is "d"

pHscale

"T" for the total scale, "F" for the free scale and "SWS" for using the seawater scale, default is "T" (total scale)

b

Concentration of total boron. "l10" for the Lee et al. (2010) formulation or "u74" for the Uppstrom (1974) formulation, default is "u74"

gas

used to indicate the convention for INPUT pCO2, i.e., when it is an input variable (flags 21 to 25): "insitu" indicates it is referenced to in situ pressure and in situ temperature; "potential" indicates it is referenced to 1 atm pressure and potential temperature; and "standard" indicates it is referenced to 1 atm pressure and in situ temperature. All three options should give identical results at surface pressure. This option is not used when pCO2 is not an input variable (flags 1 to 15). The default is "potential".

warn

"y" to show warnings when T or S go beyond the valid range for constants; "n" to supress warnings. The default is "y".

eos

"teos10" to specify T and S according to Thermodynamic Equation Of Seawater - 2010 (TEOS-10); "eos80" to specify T and S according to EOS-80.

long

longitude of data point, used when eos parameter is "teos10" as a conversion parameter from absolute to practical salinity.

lat

latitude of data point, used when eos parameter is "teos10".

Details

Calculates the "substrate-inhibitor ratio (SIR)" (i.e. [HCO3-]/[H+]) which is used as a metric to predict carbonate chemistry dependency of biotic calcium carbonate formation (Bach, 2015). Please note that hydrogen ion concentrations in the output [HCO3-]/[H+] are on the free scale, regardless of the input pH scale. We have included pH and [H+] outputs on multiple scales as a teaching exercise to show how calculating the SIR on different scales changes its meaning.

The function is based on carb and therefore also returns parameters of the seawater carbonate system.

carb details:

The Lueker et al. (2000) constants for K1 and K2, the Perez and Fraga (1987) constant for Kf and the Dickson (1990) constant for Ks are recommended by Dickson et al. (2007). It is, however, critical to consider that each formulation is only valid for specific ranges of temperature and salinity:

For K1 and K2:

  • Cai and Wang (1998): S ranging between 0 and 40 and T ranging between 0.2 and 30oC.

  • Roy et al. (1993): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Lueker et al. (2000): S ranging between 19 and 43 and T ranging between 2 and 35oC.

  • Mojica Prieto et al. (2002): S ranging from 5 to 42 and T ranging between 0 and 45oC.

  • Millero et al. (2002): S ranging from 34 to 37 and T ranging between -1.6 and 35oC.

  • Millero et al. (2006): S ranging between 0.1 and 50 and T ranging between 1 and 50oC.

  • Millero (2010): S ranging between 1 and 50 and T ranging between 0 and 50oC. Millero (2010) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

  • Waters et al.(2014): S ranging between 1 and 50 and T ranging between 0 and 50oC. Waters (2014) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

  • Papadimitriou et al. (2018): S ranging from 33 to 100 and T ranging between -6 to 25oC.

  • Sulpis et al. (2020): S ranging from 30.7 to 37.6 and T ranging between -1.7 to 31.8oC.

  • Shockman & Byrne (2021): for K2, S ranging from 19.6 to 41 and T ranging between 15 to 35oC. For K1, formulation is that of Waters et al.

For Kf:

  • Perez and Fraga (1987): S ranging between 10 and 40 and T ranging between 9 and 33oC.

  • Dickson and Riley (1979 in Dickson and Goyet, 1994): S ranging between 0 and 45 and T ranging between 0 and 45oC.

For Ks:

  • Dickson (1990): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Khoo et al. (1977): S ranging between 20 and 45 and T ranging between 5 and 40oC.

The arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It is recommended to use either vectors with the same dimension or one vector for one argument and numbers for the other arguments.

Pressure corrections and pH scale:

  • For K0, the pressure correction term of Weiss (1974) is used.

  • For K1, K2, pK1, pK2, pK3, Kw, Kb, Khs and Ksi, the pressure correction was applied on the seawater scale. Hence, if needed, values were first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kf, the pressure correction was applied on the free scale. The formulation of Dickson and Riley (1979 in Dickson and Goyet, 1994) provides Kf on the free scale but that of Perez and Fraga (1987) provides it on the total scale. Hence, in that case, Kf was first transformed from the total scale to the free scale. With both formulations, the pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Ks, the pressure correction was applied on the free scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kn, The pressure correction was applied on the seawater scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

long and lat are used as conversion parameters from absolute to practical salinity: when seawater is not of standard composition, practical salinity alone is not sufficient to compute absolute salinity and vice-versa. One needs to know the density. When long and lat are given, density is inferred from WOA silicate concentration at given location. When they are not, an arbitrary geographic point is chosen: mid equatorial Atlantic. Note that this implies an error on computed salinity up to 0.02 g/kg.

Value

The function returns a data frame containing the following columns:

S

Salinity

T

Temperature in degrees Celsius

Patm

Surface atmospheric pressure in atm

P

Hydrostatic pressure in bar

pH

pH

CO2

CO2 concentration (mol/kg)

pCO2

"standard" pCO2, CO2 partial pressure computed at in situ temperature and atmospheric pressure (μ\muatm)

fCO2

"standard" fCO2, CO2 fugacity computed at in situ temperature and atmospheric pressure (μ\muatm)

pCO2pot

"potential" pCO2, CO2 partial pressure computed at potential temperature and atmospheric pressure (μ\muatm)

fCO2pot

"potential" fCO2, CO2 fugacity computed at potential temperature and atmospheric pressure (μ\muatm)

pCO2insitu

"in situ" pCO2, CO2 partial pressure computed at in situ temperature and total pressure (atm + hydrostatic) (μ\muatm)

fCO2insitu

"in situ" fCO2, CO2 fugacity computed at in situ temperature and total pressure (atm + hydrostatic) (μ\muatm)

HCO3

HCO3 concentration (mol/kg)

CO3

CO3 concentration (mol/kg)

DIC

DIC concentration (mol/kg)

ALK

ALK, total alkalinity (mol/kg)

OmegaAragonite

Omega aragonite, aragonite saturation state

OmegaCalcite

Omega calcite, calcite saturation state

SIR

substrate inhibitor ratio: [HCO3]/[H_free] (mol:μ\mumol)

H_free

H ion concentration on free scale (μ\mumol/kg)

H_sws

H ion concentration on seawater scale (μ\mumol/kg)

H_t

H ion concentration on total scale (μ\mumol/kg)

pH_free

pH calculated on the free scale

pH_sws

pH calculated on the seawater scale

pH_t

pH calculated on the total scale

Note

Warning: pCO2 estimates below 100 m are subject to considerable uncertainty. See Weiss (1974) and Orr et al. (2015)

Author(s)

Kimberlee Baldry, Lennart Bach and Jean-Pierre Gattuso, [email protected]

References

Bach L. T., 2015 Reconsidering the role of carbonate ion concentration in calcification by marine organisms. Biogeosciences 12, 4939-4951.

Cai W. J., and Wang Y., 1998. The chemistry, fluxes, and sources of carbon dioxide in the estuarine waters of the Satilla and Altamaha Rivers, Georgia. Limnology and Oceanography 43, 657-668.

Dickson A. G. and Riley J. P., 1979 The estimation of acid dissociation constants in seawater media from potentiometric titrations with strong base. I. The ionic product of water. Marine Chemistry 7, 89-99.

Dickson A. G., 1990 Standard potential of the reaction: AgCI(s) + 1/2H2(g) = Ag(s) + HCI(aq), and the standard acidity constant of the ion HSO4 in synthetic sea water from 273.15 to 318.15 K. Journal of Chemical Thermodynamics 22, 113-127.

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Khoo H. K., Ramette R. W., Culberson C. H. and Bates R. G., 1977 Determination of Hydrogen ion concentration in seawater from 5 to 40oC: standard potentials at salinities from 20 to 45. Analytical Chemistry 49, 29-34.

Lee K., Tae-Wook K., Byrne R.H., Millero F.J., Feely R.A. and Liu Y-M, 2010 The universal ratio of the boron to chlorinity for the North Pacific and North Atlantoc oceans. Geochimica et Cosmochimica Acta 74 1801-1811.

Lueker T. J., Dickson A. G. and Keeling C. D., 2000 Ocean pCO2 calculated from dissolved inorganic carbon, alkalinity, and equations for K1 and K2: validation based on laboratory measurements of CO2 in gas and seawater at equilibrium. Marine Chemistry 70 105-119.

Millero F. J., 1995. Thermodynamics of the carbon dioxide system in the oceans. Geochimica Cosmochimica Acta 59: 661-677.

Millero F. J., 2010. Carbonate constant for estuarine waters. Marine and Freshwater Research 61: 139-142.

Millero F. J., Graham T. B., Huang F., Bustos-Serrano H. and Pierrot D., 2006. Dissociation constants of carbonic acid in seawater as a function of salinity and temperature. Marine Chemistry 100, 80-84.

Orr J. C., Epitalon J.-M. and Gattuso J.-P., 2015. Comparison of seven packages that compute ocean carbonate chemistry. Biogeosciences 12, 1483-1510.

Perez F. F. and Fraga F., 1987 Association constant of fluoride and hydrogen ions in seawater. Marine Chemistry 21, 161-168.

Roy R. N., Roy L. N., Vogel K. M., Porter-Moore C., Pearson T., Good C. E., Millero F. J. and Campbell D. M., 1993. The dissociation constants of carbonic acid in seawater at salinities 5 to 45 and temperatures 0 to 45oC. Marine Chemistry 44, 249-267.

Schockman, K.M., Byrne, R.H., 2021. Spectrophotometric determination of the bicarbonate dissociation constant in seawater, Geochimica et Cosmochimica Acta.

Uppstrom L.R., 1974 The boron/chlorinity ratio of the deep-sea water from the Pacific Ocean. Deep-Sea Research I 21, 161-162.

Waters, J., Millero, F. J., and Woosley, R. J., 2014. Corrigendum to “The free proton concentration scale for seawater pH”, [MARCHE: 149 (2013) 8-22], Marine Chemistry 165, 66-67.

Weiss, R. F., 1974. Carbon dioxide in water and seawater: the solubility of a non-ideal gas, Mar. Chem., 2, 203-215.

Weiss, R. F. and Price, B. A., 1980. Nitrous oxide solubility in water and seawater, Marine Chemistry, 8, 347-359.

Zeebe R. E. and Wolf-Gladrow D. A., 2001 CO2 in seawater: equilibrium, kinetics, isotopes. Amsterdam: Elsevier, 346 pp.

Examples

## With a couple of variables
sir(flag=8, var1=8.2, var2=0.00234, S=35, T=25, P=0, Patm=1.0, Pt=0, Sit=0,
	pHscale="T", kf="pf", k1k2="l", ks="d", b="u74")

## Using vectors as arguments
flag <- c(8, 2, 8)
var1 <- c(8.2, 7.477544e-06, 8.2)
var2 <- c(0.002343955, 0.001649802, 2400e-6)
S <- c(35, 35, 30)
T <- c(25, 25, 30)
P <- c(0, 0, 0)
Pt <- c(0, 0, 0)
Sit <- c(0, 0, 0)
kf <- c("pf", "pf", "pf")
k1k2 <- c("l", "l", "l")
pHscale <- c("T", "T", "T")
b <- c("l10", "l10", "l10")
sir(flag=flag, var1=var1, var2=var2, S=S, T=T, P=P,
  Pt=Pt, Sit=Sit, kf=kf, k1k2=k1k2, pHscale=pHscale, b=b)

## Test with all flags 
flag <- c((1:15), (21:25))
var1 <- c(8.200000, 7.308171e-06, 7.308171e-06, 7.308171e-06, 7.308171e-06, 
	8.2, 8.2, 8.2, 8.2, 0.001646857, 0.001646857, 0.001646857, 0.0002822957, 
	0.0002822957, 0.00234, 258.2164, 258.2164, 258.2164, 258.2164, 258.2164 )
var2 <- c(7.308171e-06, 0.001646857, 0.0002822957, 0.00234, 0.001936461, 
	0.001646857, 0.0002822957, 0.00234, 0.001936461, 0.0002822957, 
	0.00234, 0.001936461,  0.00234, 0.001936461, 0.001936461, 8.2, 
	0.001646857, 0.0002822957, 0.00234, 0.001936461)
sir(flag=flag, var1=var1, var2=var2)

## Test using a data frame 
data(seacarb_test_P0)	#test data set for P=0 (surface)
tab <- seacarb_test_P0[14:19,]

## method 1 using the column numbers
sir(flag=tab[[1]], var1=tab[[2]], var2=tab[[3]], S=tab[[4]], T=tab[[5]], 
P=tab[[6]], Sit=tab[[8]], Pt=tab[[7]])

## method 2 using the column names
sir(flag=tab$flag, var1=tab$var1, var2=tab$var2, S=tab$S, T=tab$T, 
P=tab$P, Sit=tab$Sit, Pt=tab$Pt)

Parameters of the seawater carbonate system with boron addition, including the substrate-inhibitor-ratio (SIR)

Description

This function is a modification of carbb. It returns parameters of the seawater carbonate system when boron is added, as well as additional parameters relevant to the SIR.

Usage

sir_b(flag, var1, var2, S=35, T=25, Patm=1, P=0, Pt=0, Sit=0, 
  k1k2="x", kf="x", ks="d", pHscale="T", b="u74", gas="potential", badd=0, 
  warn="y", eos = "eos80", long = 1e+20, lat = 1e+20)

Arguments

flag

select the couple of variables available. The flags which can be used are:

flag = 1 pH and CO2 given

flag = 2 CO2 and HCO3 given

flag = 3 CO2 and CO3 given

flag = 4 CO2 and ALK given

flag = 5 CO2 and DIC given

flag = 6 pH and HCO3 given

flag = 7 pH and CO3 given

flag = 8 pH and ALK given

flag = 9 pH and DIC given

flag = 10 HCO3 and CO3 given

flag = 11 HCO3 and ALK given

flag = 12 HCO3 and DIC given

flag = 13 CO3 and ALK given

flag = 14 CO3 and DIC given

flag = 15 ALK and DIC given

flag = 21 pCO2 and pH given

flag = 22 pCO2 and HCO3 given

flag = 23 pCO2 and CO3 given

flag = 24 pCO2 and ALK given

flag = 25 pCO2 and DIC given

var1

Value of the first variable in mol/kg, except for pH and for pCO2 in μ\muatm

var2

Value of the second variable in mol/kg, except for pH

S

Salinity

T

Temperature in degrees Celsius

Patm

Surface atmospheric pressure in atm, default is 1 atm

P

Hydrostatic pressure in bar (surface = 0)

Pt

Concentration of total phosphate in mol/kg; set to 0 if NA

Sit

Concentration of total silicate in mol/kg; set to 0 if NA

k1k2

"cw" for using K1 and K2 from Cai & Wang (1998), "l" from Lueker et al. (2000), "m02" from Millero et al. (2002), "m06" from Millero et al. (2006), "m10" from Millero (2010), "mp2" from Mojica Prieto et al. (2002), "p18" from Papadimitriou et al. (2018), "r" from Roy et al. (1993), "sb21" from Shockman & Byrne (2021), "s20" from Sulpis et al. (2020), and "w14" from Waters et al. (2014). "x" is the default flag; the default value is then "l", except if T is outside the range 2 to 35oC and/or S is outside the range 19 to 43. In these cases, the default value is "w14".

kf

"pf" for using Kf from Perez and Fraga (1987) and "dg" for using Kf from Dickson and Riley (1979 in Dickson and Goyet, 1994). "x" is the default flag; the default value is then "pf", except if T is outside the range 9 to 33oC and/or S is outside the range 10 to 40. In these cases, the default is "dg".

ks

"d" for using Ks from Dickson (1990) and "k" for using Ks from Khoo et al. (1977), default is "d"

pHscale

"T" for the total scale, "F" for the free scale and "SWS" for using the seawater scale, default is "T" (total scale)

b

Concentration of total boron. "l10" for the Lee et al. (2010) formulation or "u74" for the Uppstrom (1974) formulation, default is "u74"

gas

used to indicate the convention for INPUT pCO2, i.e., when it is an input variable (flags 21 to 25): "insitu" indicates it is referenced to in situ pressure and in situ temperature; "potential" indicates it is referenced to 1 atm pressure and potential temperature; and "standard" indicates it is referenced to 1 atm pressure and in situ temperature. All three options should give identical results at surface pressure. This option is not used when pCO2 is not an input variable (flags 1 to 15). The default is "potential".

badd

Amount of boron added in mol/kg.

warn

"y" to show warnings when T or S go beyond the valid range for constants; "n" to supress warnings. The default is "y".

eos

"teos10" to specify T and S according to Thermodynamic Equation Of Seawater - 2010 (TEOS-10); "eos80" to specify T and S according to EOS-80.

long

longitude of data point, used when eos parameter is "teos10" as a conversion parameter from absolute to practical salinity.

lat

latitude of data point, used when eos parameter is "teos10".

Details

Calculates the "substrate-inhibitor ratio (SIR)" (i.e. [HCO3-]/[H+]) which is used as a metric to predict carbonate chemistry dependency of biotic calcium carbonate formation (Bach, 2015). Please note that hydrogen ion concentrations in the output [HCO3-]/[H+] are on the free scale, regardless of the input pH scale. We have included pH and [H+] outputs on multiple scales as a teaching exercise to show how calculating the SIR on different scales changes its meaning.

The function is based on carbb and therefore also returns parameters of the seawater carbonate system when boron is added.

carbb details:

The Lueker et al. (2000) constants for K1 and K2, the Perez and Fraga (1987) constant for Kf and the Dickson (1990) constant for Ks are recommended by Dickson et al. (2007). It is, however, critical to consider that each formulation is only valid for specific ranges of temperature and salinity:

For K1 and K2:

  • Cai and Wang (1998): S ranging between 0 and 40 and T ranging between 0.2 and 30oC.

  • Lueker et al. (2000): S ranging between 19 and 43 and T ranging between 2 and 35oC.

  • Mojica Prieto et al. (2002): S ranging from 5 to 42 and T ranging between 0 and 45oC.

  • Millero et al. (2002): S ranging from 34 to 37 and T ranging between -1.6 and 35oC.

  • Millero et al. (2006): S ranging between 0.1 and 50 and T ranging between 1 and 50oC.

  • Millero (2010): S ranging between 1 and 50 and T ranging between 0 and 50oC. Millero (2010) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

  • Papadimitriou et al. (2018): S ranging from 33 to 100 and T ranging between -6 to 25oC.

  • Roy et al. (1993): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Shockman & Byrne (2021): for K2, S ranging from 19.6 to 41 and T ranging between 15 to 35oC. For K1, formulation is that of Waters et al.

  • Sulpis et al. (2020): S ranging from 30.7 to 37.6 and T ranging between -1.7 to 31.8oC.

  • Waters et al.(2014): S ranging between 1 and 50 and T ranging between 0 and 50oC. Waters (2014) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

For Kf:

  • Perez and Fraga (1987): S ranging between 10 and 40 and T ranging between 9 and 33oC.

  • Dickson and Riley (1979 in Dickson and Goyet, 1994): S ranging between 0 and 45 and T ranging between 0 and 45oC.

For Ks:

  • Dickson (1990): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Khoo et al. (1977): S ranging between 20 and 45 and T ranging between 5 and 40oC.

The arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It is recommended to use either vectors with the same dimension or one vector for one argument and numbers for the other arguments.

Pressure corrections and pH scale:

  • For K0, the pressure correction term of Weiss (1974) is used.

  • For K1, K2, pK1, pK2, pK3, Kw, Kb, Khs and Ksi, the pressure correction was applied on the seawater scale. Hence, if needed, values were first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kf, the pressure correction was applied on the free scale. The formulation of Dickson and Riley (1979 in Dickson and Goyet, 1994) provides Kf on the free scale but that of Perez and Fraga (1987) provides it on the total scale. Hence, in that case, Kf was first transformed from the total scale to the free scale. With both formulations, the pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Ks, the pressure correction was applied on the free scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kn, The pressure correction was applied on the seawater scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

long and lat are used as conversion parameters from absolute to practical salinity: when seawater is not of standard composition, practical salinity alone is not sufficient to compute absolute salinity and vice-versa. One needs to know the density. When long and lat are given, density is inferred from WOA silicate concentration at given location. When they are not, an arbitrary geographic point is chosen: mid equatorial Atlantic. Note that this implies an error on computed salinity up to 0.02 g/kg.

Value

The function returns a data frame containing the following columns:

S

Salinity

T

Temperature in degrees Celsius

Patm

Surface atmospheric pressure in atm

P

Hydrostatic pressure in bar

pH

pH

CO2

CO2 concentration (mol/kg)

pCO2

"standard" pCO2, CO2 partial pressure computed at in situ temperature and atmospheric pressure (μ\muatm)

fCO2

"standard" fCO2, CO2 fugacity computed at in situ temperature and atmospheric pressure (μ\muatm)

pCO2pot

"potential" pCO2, CO2 partial pressure computed at potential temperature and atmospheric pressure (μ\muatm)

fCO2pot

"potential" fCO2, CO2 fugacity computed at potential temperature and atmospheric pressure (μ\muatm)

pCO2insitu

"in situ" pCO2, CO2 partial pressure computed at in situ temperature and total pressure (atm + hydrostatic) (μ\muatm)

fCO2insitu

"in situ" fCO2, CO2 fugacity computed at in situ temperature and total pressure (atm + hydrostatic) (μ\muatm)

HCO3

HCO3 concentration (mol/kg)

CO3

CO3 concentration (mol/kg)

DIC

DIC concentration (mol/kg)

ALK

ALK, total alkalinity (mol/kg)

OmegaAragonite

Omega aragonite, aragonite saturation state

OmegaCalcite

Omega calcite, calcite saturation state

SIR

substrate inhibitor ratio: [HCO3]/[HCO3]/[H_free] (mol:μ\mumol)

H_free

H ion concentration on free scale (μ\mumol/kg)

H_sws

H ion concentration on seawater scale (μ\mumol/kg)

H_t

H ion concentration on total scale (μ\mumol/kg)

pH_free

pH calculated on the free scale

pH_sws

pH calculated on the seawater scale

pH_t

pH calculated on the total scale

Note

Warning: pCO2 estimates below 100 m are subject to considerable uncertainty. See Weiss (1974) and Orr et al. (2015)

Author(s)

Kimberlee Baldry, Lennart Bach and Jean-Pierre Gattuso, [email protected]

References

Bach L. T., 2015 Reconsidering the role of carbonate ion concentration in calcification by marine organisms. Biogeosciences 12, 4939-4951.

Cai W. J., and Wang Y., 1998. The chemistry, fluxes, and sources of carbon dioxide in the estuarine waters of the Satilla and Altamaha Rivers, Georgia. Limnology and Oceanography 43, 657-668.

Khoo H. K., Ramette R. W., Culberson C. H. and Bates R. G., 1977 Determination of Hydrogen ion concentration in seawater from 5 to 40oC: standard potentials at salinities from 20 to 45. Analytical Chemistry 49, 29-34.

Lee K., Tae-Wook K., Byrne R.H., Millero F.J., Feely R.A. and Liu Y-M, 2010 The universal ratio of the boron to chlorinity for the North Pacific and North Atlantoc oceans. Geochimica et Cosmochimica Acta 74 1801-1811.

Lueker T. J., Dickson A. G. and Keeling C. D., 2000 Ocean pCO2 calculated from dissolved inorganic carbon, alkalinity, and equations for K1 and K2: validation based on laboratory measurements of CO2 in gas and seawater at equilibrium. Marine Chemistry 70 105-119.

Millero F. J., 1995. Thermodynamics of the carbon dioxide system in the oceans. Geochimica Cosmochimica Acta 59: 661-677.

Millero F. J., 2010. Carbonate constant for estuarine waters. Marine and Freshwater Research 61: 139-142.

Millero F. J., Graham T. B., Huang F., Bustos-Serrano H. and Pierrot D., 2006. Dissociation constants of carbonic acid in seawater as a function of salinity and temperature. Marine Chemistry 100, 80-84.

Orr J. C., Epitalon J.-M. and Gattuso J.-P., 2015. Comparison of seven packages that compute ocean carbonate chemistry. Biogeosciences 12, 1483-1510.

Perez F. F. and Fraga F., 1987 Association constant of fluoride and hydrogen ions in seawater. Marine Chemistry 21, 161-168.

Roy R. N., Roy L. N., Vogel K. M., Porter-Moore C., Pearson T., Good C. E., Millero F. J. and Campbell D. M., 1993. The dissociation constants of carbonic acid in seawater at salinities 5 to 45 and temperatures 0 to 45oC. Marine Chemistry 44, 249-267.

Schockman, K.M., Byrne, R.H., 2021. Spectrophotometric determination of the bicarbonate dissociation constant in seawater, Geochimica et Cosmochimica Acta.

Uppstrom L.R., 1974 The boron/chlorinity ratio of the deep-sea water from the Pacific Ocean. Deep-Sea Research I 21 161-162.

Weiss, R. F., 1974. Carbon dioxide in water and seawater: the solubility of a non-ideal gas, Mar. Chem., 2, 203-215.

Weiss, R. F. and Price, B. A., 1980. Nitrous oxide solubility in water and seawater, Marine Chemistry, 8, 347-359.

Zeebe R. E. and Wolf-Gladrow D. A., 2001 CO2 in seawater: equilibrium, kinetics, isotopes. Amsterdam: Elsevier, 346 pp.

Examples

## With a couple of variables
sir_b(flag=8, var1=8.2, var2=0.00234, S=35, T=25, P=0, Patm=1.0, 
  Pt=0, Sit=0,pHscale="T", kf="pf", k1k2="l", ks="d", b="u74", badd=0)

Parameters of the seawater carbonate system including the substrate-inhibitor-ratio (SIR) - extension of carb

Description

This function is a modification of carb. It returns parameters of the seawater carbonate system, including the ammonium and sulfide acid-base systems, as well as full acid-base speciation and additional parameters relevant to the SIR.

Usage

sir_full(flag, var1, var2, S=35, T=25, Patm=1, P=0, Pt=0, Sit=0,
        k1k2="x", kf="x", ks="d", pHscale="T", b="u74", gas="potential",
        NH4t=0, HSt=0)

Arguments

flag

select the couple of variables available. The flags which can be used are:

flag = 1 pH and CO2 given

flag = 2 CO2 and HCO3 given

flag = 3 CO2 and CO3 given

flag = 4 CO2 and ALK given

flag = 5 CO2 and DIC given

flag = 6 pH and HCO3 given

flag = 7 pH and CO3 given

flag = 8 pH and ALK given

flag = 9 pH and DIC given

flag = 10 HCO3 and CO3 given

flag = 11 HCO3 and ALK given

flag = 12 HCO3 and DIC given

flag = 13 CO3 and ALK given

flag = 14 CO3 and DIC given

flag = 15 ALK and DIC given

flag = 21 pCO2 and pH given

flag = 22 pCO2 and HCO3 given

flag = 23 pCO2 and CO3 given

flag = 24 pCO2 and ALK given

flag = 25 pCO2 and DIC given

var1

Value of the first variable in mol/kg-soln, except for pH and for pCO2 in μ\muatm

var2

Value of the second variable in mol/kg-soln, except for pH

S

Salinity

T

Temperature in degrees Celsius

Patm

Surface atmospheric pressure in atm, default is 1 atm

P

Hydrostatic pressure in bar (surface = 0)

Pt

Concentration of total phosphate in mol/kg-soln; set to 0 if NA

Sit

Concentration of total silicate in mol/kg-soln; set to 0 if NA

k1k2

"cw" for using K1 and K2 from Cai & Wang (1998), "l" from Lueker et al. (2000), "m02" from Millero et al. (2002), "m06" from Millero et al. (2006), "m10" from Millero (2010), "mp2" from Mojica Prieto et al. (2002), "p18" from Papadimitriou et al. (2018), "r" from Roy et al. (1993), "sb21" from Shockman & Byrne (2021), "s20" from Sulpis et al. (2020), and "w14" from Waters et al. (2014). "x" is the default flag; the default value is then "l", except if T is outside the range 2 to 35oC and/or S is outside the range 19 to 43. In these cases, the default value is "w14".

kf

"pf" for using Kf from Perez and Fraga (1987) and "dg" for using Kf from Dickson and Riley (1979 in Dickson and Goyet, 1994). "x" is the default flag; the default value is then "pf", except if T is outside the range 9 to 33oC and/or S is outside the range 10 to 40. In these cases, the default is "dg".

ks

"d" for using Ks from Dickson (1990) and "k" for using Ks from Khoo et al. (1977), default is "d"

pHscale

"T" for the total scale, "F" for the free scale and "SWS" for using the seawater scale, default is "T" (total scale)

b

Concentration of total boron. "l10" for the Lee et al. (2010) formulation or "u74" for the Uppstrom (1974) formulation, default is "u74"

gas

used to indicate the convention for INPUT pCO2, i.e., when it is an input variable (flags 21 to 25): "insitu" indicates it is referenced to in situ pressure and in situ temperature; "potential" indicates it is referenced to 1 atm pressure and potential temperature; and "standard" indicates it is referenced to 1 atm pressure and in situ temperature. All three options should give identical results at surface pressure. This option is not used when pCO2 is not an input variable (flags 1 to 15). The default is "potential".

NH4t

Concentration of total ammonium in mol/kg-soln; set to 0 if NA

HSt

Concentration of total hydrogen sulfide in mol/kg-soln; set to 0 if NA

Details

Calculates the "substrate-inhibitor ratio (SIR)" (i.e. [HCO3-]/[H+]) which is used as a metric to predict carbonate chemistry dependency of biotic calcium carbonate formation (Bach, 2015). Please note that hydrogen ion concentrations in the output [HCO3-]/[H+] are on the free scale, regardless of the input pH scale. We have included pH and [H+] outputs on multiple scales as a teaching exercise to show how calculating the SIR on different scales changes its meaning.

The function is based on carbfull and therefore also returns parameters of the seawater carbonate system, including the ammonium and sulfide acid- base systems, as well as full acid-base speciation.

carbfull details:

The Lueker et al. (2000) constants for K1 and K2, the Perez and Fraga (1987) constant for Kf and the Dickson (1990) constant for Ks are recommended by Dickson et al. (2007). It is, however, critical to consider that each formulation is only valid for specific ranges of temperature and salinity:

For K1 and K2:

  • Cai and Wang (1998): S ranging between 0 and 40 and T ranging between 0.2 and 30oC.

  • Roy et al. (1993): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Lueker et al. (2000): S ranging between 19 and 43 and T ranging between 2 and 35oC.

  • Mojica Prieto et al. (2002): S ranging from 5 to 42 and T ranging between 0 and 45oC.

  • Millero et al. (2002): S ranging from 34 to 37 and T ranging between -1.6 and 35oC.

  • Millero et al. (2006): S ranging between 0.1 and 50 and T ranging between 1 and 50oC.

  • Millero (2010): S ranging between 1 and 50 and T ranging between 0 and 50oC. Millero (2010) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

  • Waters et al.(2014): S ranging between 1 and 50 and T ranging between 0 and 50oC. Waters (2014) provides a K1 and K2 formulation for the seawater, total and free pH scales. Therefore, when this method is used and if P=0, K1 and K2 are computed with the formulation corresponding to the pH scale given in the flag "pHscale".

  • Papadimitriou et al. (2018): S ranging from 33 to 100 and T ranging between -6 to 25oC.

  • Sulpis et al. (2020): S ranging from 30.7 to 37.6 and T ranging between -1.7 to 31.8oC.

  • Shockman & Byrne (2021): for K2, S ranging from 19.6 to 41 and T ranging between 15 to 35oC. For K1, formulation is that of Waters et al.

For Kf:

  • Perez and Fraga (1987): S ranging between 10 and 40 and T ranging between 9 and 33oC.

  • Dickson and Riley (1979 in Dickson and Goyet, 1994): S ranging between 0 and 45 and T ranging between 0 and 45oC.

For Ks:

  • Dickson (1990): S ranging between 5 and 45 and T ranging between 0 and 45oC.

  • Khoo et al. (1977): S ranging between 20 and 45 and T ranging between 5 and 40oC.

The arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It is recommended to use either vectors with the same dimension or one vector for one argument and numbers for the other arguments.

Pressure corrections and pH scale:

  • For K0, the pressure correction term of Weiss (1974) is used.

  • For K1, K2, pK1, pK2, pK3, Kw, Kb, Khs, Ksi and K2si, the pressure correction was applied on the seawater scale. Hence, if needed, values were first transformed from the total scale to the seawater scale, the pressure correction applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kf, the pressure correction was applied on the free scale. The formulation of Dickson and Riley (1979 in Dickson and Goyet, 1994) provides Kf on the free scale but that of Perez and Fraga (1987) provides it on the total scale. Hence, in that case, Kf was first transformed from the total scale to the free scale. With both formulations, the pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Ks, the pressure correction was applied on the free scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

  • For Kn, the pressure correction was applied on the seawater scale. The pressure correction was applied as described by Millero (1995), and the value was transformed back to the required scale (T, F or SWS).

Value

The function returns a data frame containing the following columns:

S

Salinity

T

Temperature in degrees Celsius

Patm

Surface atmospheric pressure in atm

P

Hydrostatic pressure in bar

pH

pH

CO2

CO2 concentration (mol/kg-soln)

pCO2

"standard" pCO2, CO2 partial pressure computed at in situ temperature and atmospheric pressure (μ\muatm)

fCO2

"standard" fCO2, CO2 fugacity computed at in situ temperature and atmospheric pressure (μ\muatm)

pCO2pot

"potential" pCO2, CO2 partial pressure computed at potential temperature and atmospheric pressure (μ\muatm)

fCO2pot

"potential" fCO2, CO2 fugacity computed at potential temperature and atmospheric pressure (μ\muatm)

pCO2insitu

"in situ" pCO2, CO2 partial pressure computed at in situ temperature and total pressure (atm + hydrostatic) (μ\muatm)

fCO2insitu

"in situ" fCO2, CO2 fugacity computed at in situ temperature and total pressure (atm + hydrostatic) (μ\muatm)

HCO3

HCO3 concentration (mol/kg-soln)

CO3

CO3 concentration (mol/kg-soln)

DIC

DIC concentration (mol/kg-soln)

ALK

ALK, total alkalinity (mol/kg-soln)

OmegaAragonite

Omega aragonite, aragonite saturation state

OmegaCalcite

Omega calcite, calcite saturation state

NH4

NH4 concentration (mol/kg-soln)

NH3

NH3 concentration (mol/kg-soln)

BOH3

B(OH)3 concentration (mol/kg-soln)

BOH4

B(OH)4 concentration (mol/kg-soln)

H3PO4

H3PO4 concentration (mol/kg-soln)

H2PO4

H2PO4 concentration (mol/kg-soln)

HPO4

HPO4 concentration (mol/kg-soln)

PO4

PO4 concentration (mol/kg-soln)

H2S

H2S concentration (mol/kg-soln)

HS

HS concentration (mol/kg-soln)

SiOH4

SiOH4 concentration (mol/kg-soln)

SiOOH3

SiOOH3 concentration (mol/kg-soln)

SiO2OH2

SiO2OH2 concentration (mol/kg-soln)

HF

HF concentration (mol/kg-soln)

F

F concentration (mol/kg-soln)

HSO4

HSO4 concentration (mol/kg-soln)

SO4

SO4 concentration (mol/kg-soln)

H

H concentration at specified pH scale (mol/kg-soln)

OH

OH concentration (mol/kg-soln)

NH4t

Supplied NHt concentration (mol/kg-soln); values are recycled if necessary

BOR

Calculated total borate concentration (mol/kg-soln)

Pt

Supplied Pt concentration (mol/kg-soln); values are recycled if necessary

HSt

Supplied HSt concentration (mol/kg-soln); values are recycled if necessary

Sit

Supplied Sit concentration (mol/kg-soln); values are recycled if necessary

FLUO

Calculated total fluoride concentration (mol/kg-soln)

ST

Calculated total sulfate concentration (mol/kg-soln)

SIR

substrate inhibitor ratio: [HCO3]/[H_free] (mol:μ\mumol)

H_free

H ion concentration on free scale (μ\mumol/kg)

H_sws

H ion concentration on seawater scale (μ\mumol/kg)

H_t

H ion concentration on total scale (μ\mumol/kg)

pH_free

pH calculated on the free scale

pH_sws

pH calculated on the seawater scale

pH_t

pH calculated on the total scale

Note

Warning: pCO2 estimates below 100 m are subject to considerable uncertainty. See Weiss (1974) and Orr et al. (2014)

Author(s)

Kimberlee Baldry, Lennart Bach and Jean-Pierre Gattuso, [email protected]

References

Bach L. T., 2015 Reconsidering the role of carbonate ion concentration in calcification by marine organisms. Biogeosciences 12, 4939-4951.

Cai W. J., and Wang Y., 1998. The chemistry, fluxes, and sources of carbon dioxide in the estuarine waters of the Satilla and Altamaha Rivers, Georgia. Limnology and Oceanography 43, 657-668.

Dickson A. G. and Riley J. P., 1979 The estimation of acid dissociation constants in seawater media from potentiometric titrations with strong base. I. The ionic product of water. Marine Chemistry 7, 89-99.

Dickson A. G., 1990 Standard potential of the reaction: AgCI(s) + 1/2H2(g) = Ag(s) + HCI(aq), and the standard acidity constant of the ion HSO4 in synthetic sea water from 273.15 to 318.15 K. Journal of Chemical Thermodynamics 22, 113-127.

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Khoo H. K., Ramette R. W., Culberson C. H. and Bates R. G., 1977 Determination of Hydrogen Ion Concentration in Seawater from 5 to 40oC: Standard Potentials at Salinities from 20 to 45. Analytical Chemistry 22, vol49 29-34.

Lee K., Tae-Wook K., Byrne R.H., Millero F.J., Feely R.A. and Liu Y-M, 2010 The universal ratio of the boron to chlorinity for the North Pacific and North Atlantoc oceans. Geochimica et Cosmochimica Acta 74 1801-1811.

Lueker T. J., Dickson A. G. and Keeling C. D., 2000 Ocean pCO2 calculated from dissolved inorganic carbon, alkalinity, and equations for K1 and K2: validation based on laboratory measurements of CO2 in gas and seawater at equilibrium. Marine Chemistry 70 105-119.

Millero F. J., 1995. Thermodynamics of the carbon dioxide system in the oceans. Geochimica Cosmochimica Acta 59: 661-677.

Millero F. J., 2010. Carbonate constant for estuarine waters. Marine and Freshwater Research 61: 139-142.

Millero F. J., Graham T. B., Huang F., Bustos-Serrano H. and Pierrot D., 2006. Dissociation constants of carbonic acid in seawater as a function of salinity and temperature. Marine Chemistry 100, 80-84.

Orr J. C., Epitalon J.-M. and Gattuso J.-P., 2014. Comparison of seven packages that compute ocean carbonate chemistry. Biogeosciences Discussions 11, 5327-5397.

Perez F. F. and Fraga F., 1987 Association constant of fluoride and hydrogen ions in seawater. Marine Chemistry 21, 161-168.

Roy R. N., Roy L. N., Vogel K. M., Porter-Moore C., Pearson T., Good C. E., Millero F. J. and Campbell D. M., 1993. The dissociation constants of carbonic acid in seawater at salinities 5 to 45 and temperatures 0 to 45oC. Marine Chemistry 44, 249-267.

Schockman, K.M., Byrne, R.H., 2021. Spectrophotometric determination of the bicarbonate dissociation constant in seawater, Geochimica et Cosmochimica Acta.

Uppstrom L.R., 1974 The boron/chlorinity ratio of the deep-sea water from the Pacific Ocean. Deep-Sea Research I 21 161-162.

Waters, J., Millero, F. J., and Woosley, R. J., 2014. Corrigendum to “The free proton concentration scale for seawater pH”, [MARCHE: 149 (2013) 8-22], Mar. Chem. 165, 66-67.

Weiss, R. F., 1974. Carbon dioxide in water and seawater: the solubility of a non-ideal gas, Mar. Chem., 2, 203-215.

Weiss, R. F. and Price, B. A., 1980. Nitrous oxide solubility in water and seawater, Mar. Chem., 8, 347-359.

Zeebe R. E. and Wolf-Gladrow D. A., 2001 CO2 in seawater: equilibrium, kinetics, isotopes. Amsterdam: Elsevier, 346 pp.

Examples

## With a couple of variables
sir_full(flag=8, var1=8.2, var2=0.00234, S=35, T=25, P=0, Patm=1.0, Pt=0, Sit=0,
	pHscale="T", kf="pf", k1k2="l", ks="d", b="u74", gas="potential", NH4t=0, HSt=0)

## With a couple of variables and non-zero nutrient concentrations
sir_full(flag=8, var1=8.2, var2=0.00234, S=35, T=25, P=0, Patm=1.0, Pt=5e-6, Sit=2e-6,
	pHscale="T", kf="pf", k1k2="l", ks="d", b="u74", gas="potential", NH4t=10e-6, HSt=0.1e-6)

## Using vectors as arguments
flag <- c(8, 2, 8)
var1 <- c(8.2, 7.477544e-06, 8.2)
var2 <- c(0.002343955, 0.001649802, 2400e-6)
S <- c(35, 35, 30)
T <- c(25, 25, 30)
P <- c(0, 0, 0)
Pt <- c(0, 0, 0)
Sit <- c(0, 0, 0)
kf <- c("pf", "pf", "pf")
k1k2 <- c("l", "l", "l")
pHscale <- c("T", "T", "T")
b <- c("l10", "l10", "l10")
gas <- c("potential", "potential", "potential")
NH4t <- c(0, 0, 0)
HSt <- c(0, 0, 0)
sir_full(flag=flag, var1=var1, var2=var2, S=S, T=T, P=P, Pt=Pt, Sit=Sit, 
  kf=kf, k1k2=k1k2, pHscale=pHscale, b=b, gas=gas, NH4t=NH4t, HSt=HSt)

## Test with all flags 
flag <- c((1:15), (21:25))
var1 <- c(8.200000, 7.308171e-06, 7.308171e-06, 7.308171e-06, 7.308171e-06, 
	8.2, 8.2, 8.2, 8.2, 0.001646857, 0.001646857, 0.001646857, 0.0002822957, 
	0.0002822957, 0.00234, 258.2164, 258.2164, 258.2164, 258.2164, 258.2164 )
var2 <- c(7.308171e-06, 0.001646857, 0.0002822957, 0.00234, 0.001936461, 
	0.001646857, 0.0002822957, 0.00234, 0.001936461, 0.0002822957, 
	0.00234, 0.001936461,  0.00234, 0.001936461, 0.001936461, 8.2, 
	0.001646857, 0.0002822957, 0.00234, 0.001936461)
sir_full(flag=flag, var1=var1, var2=var2)

From Practical to absolute salinity

Description

Converts from practical to absolute salinity based on total alkalinity as well as on the concentrations of dissolved inorganic carbon, nitrate and silicate.

Usage

sp2sa_chem(SP, TA=2300e-6, DIC=2000e-6, NO3=0, SIOH4=0)

Arguments

SP

Practical salinity on the practical salinity scale

TA

Total alkalinity, in mol/kg, default is 2300 µmol/kg

DIC

Dissolved inorganic carbon concentration in mol/kg, default is 2000 µmol/kg

NO3

Total nitrate concentration in mol/kg, default is 0

SIOH4

Total silicate concentration in mol/kg, default is 0

Details

Converts from practical to absolute salinity from carbonate system parameters and ion concentration which mostly affect water density anomalies.

Value

SA

Absolute salinity (g/kg)

Author(s)

Jean-Marie Epitalon

References

McDougall T. J., Jackett D. R., Millero F. J., Pawlowicz R. and Barker P. M., 2012. A global algorithm for estimating Absolute Salinity. Ocean Science 8, 1123-1134.

Pawlowicz R., Wright D. G. and Millero F. J., 2011. The effects of biogeochemical processes on oceanic conductivity/salinity/density relationships and the characterization of real seawater. Ocean Science 7, 363-387.

Pawlowicz R., 2013. What every oceanographer needs to know about TEOS-10 (The TEOS-10 Primer). http://www.teos-10.org/

See Also

sa2sp_chem does the reverse, sp2sa_geo

Examples

# Calculate the absolute salinity of a sample with practical Salinity of 35,
   # Total Alkalinity of 0.00234 mol/kg and DIC of 0.00202 mol/kg
   SA <- sp2sa_chem(SP=35, TA=0.00234, DIC=0.00202)

From practical to absolute salinity

Description

Converts from practical to absolute salinity based on depth and geographic location.

Usage

sp2sa_geo(SP, P=0, long=1.e20, lat=1.e20)

Arguments

SP

Practical salinity on the practical salinity scale

P

Sea water pressure in dbar

long

Longitude in decimal degrees [ 0 ... +360 ] or [ -180 ... +180 ]

lat

Latitude in decimal degrees [-90 ... 90]

Details

This function is almost an alias of function gsw_SA_from_SP of the gsw package on which it relies. The only difference is in that depth and location are optional. If location is not given, or incomplete (either longitude or latitude missing), an arbitrary location is chosen: the mid equatorial atlantic ocean. Note that this implies an error on computed SA ranging from 0 up to 0.02 g/kg.

Value

SA

Absolute salinity (g/kg)

Author(s)

Jean-Marie Epitalon

References

McDougall T. J., Jackett D. R., Millero F. J., Pawlowicz R. and Barker P. M., 2012. A global algorithm for estimating Absolute Salinity. Ocean Science 8, 1123-1134.

Pawlowicz R., 2013. What every oceanographer needs to know about TEOS-10 (The TEOS-10 Primer). http://www.teos-10.org/

See Also

sa2sp_geo does the reverse, sp2sa_chem

Examples

# Calculate the absolute salinity of a sample whose practical Salinity is 35,
   # depth is 10 dbar and location is 188 degrees East and 4 degrees North.
   SA <- sp2sa_geo(35, 10, 188, 4)     # 34.711778344814114

ionic forms as a function of pH

Description

Estimates the concentration of the various ionic forms of a molecule as a function of pH

Usage

speciation(K1=K1(), K2=NULL, K3=NULL, pH, conc=1)

Arguments

K1

First dissociation constant

K2

Second dissociation constant, default is NULL

K3

Third dissociation constant, default is NULL

pH

pH value, default is 8

conc

concentration of molecule in mol/kg, default is 1 mol/kg

Value

The function returns a data frame containing the following concentrations (in mol/kg if conc is given in mol/kg):

C1

ionic form 1, univalent, bivalent and trivalent molecules

C2

ionic form 2, univalent, bivalent and trivalent molecules

C3

ionic form 3, bivalent and trivalent molecules

C4

ionic form 4, trivalent molecules

Author(s)

Karline Soetaert [email protected]

References

Zeebe R. E. and Wolf-Gladrow D. A., 2001 CO2 in seawater: equilibrium, kinetics, isotopes. Amsterdam: Elsevier, 346 pp.

See Also

bjerrum.

Examples

## Speciation of divalent species; example to estimate the various ionic forms
## of dissolved inorganic carbon  (DIC = 0.0021 mol/kg) at a salinity of 35,
## a temperature of 25oC and an hydrostatic pressure of 0:
spec <- speciation (K1(35, 25, 0), K2(35, 25, 0), pH=8, conc=0.0021)
## where (spec\$C1=[CO2], spec\$C2=[HCO3-], spec\$C3=[CO3--])

## Speciation of trivalent species (e.g.,  H3PO4, H2PO4-, HPO4--, PO4---)
speciation(K1p(), K2p(), K3p(), conc=0.001)

## Effect of temperature on pCO2 - Figure 1.4.18 of Zeebe and Wolf-Gladrow (2001)
Tseq <- seq(0, 30, by=0.5)
pHseq <- carb(flag=15, var1=2300e-6, var2=1900e-6, S=35, T=Tseq, P=0)$pH
CO2  <- speciation(K1(T=Tseq), K2(T=Tseq), conc=1900, pH=pHseq)$C1
pCO2 <- CO2/K0(T=Tseq)
plot(Tseq, pCO2, xlab="Temperature (oC)", ylab="pCO2 (uatm)", type="l", 
	main="effect of temperature on pCO2")
legend("topleft", c(expression(sum(CO[2])==1900~umol~kg^"-1"), 
	expression(TA==2300~umol~kg^"-1")))

Convert temperature and salinity from TEOS-10 to EOS-80

Description

Converts conservative temperature to in situ temperature and absolute salinity to practical salinity (SP). Salinity conversion depends on total alkalinity as well as on the concentrations of dissolved inorganic carbon, nitrate and silicate.

Usage

teos2eos_chem(SA, CT, P=0, TA=2300e-6, DIC=2000e-6, NO3=0, SIOH4=0)

Arguments

SA

Absolute salinity in g/kg

CT

Conservative temperature in degrees C

P

Sea water pressure in dbar

TA

Total alkalinity, in mol/kg, default is 2300 µmol/kg

DIC

Dissolved inorganic carbon concentration in mol/kg, default is 2000 µmol/kg

NO3

Total nitrate concentration in mol/kg, default is 0

SIOH4

Total silicate concentration in mol/kg, default is 0

Details

Conversion from absolute to practical salinity depends on carbonate system parameters and ion concentration which mostly affect water density anomalies.

Value

The function returns a data frame containing the following columns:

T

In situ temperature (deg C)

SP

Practical salinity (psu)

Author(s)

Jean-Marie Epitalon

References

McDougall T. J., Jackett D. R., Millero F. J., Pawlowicz R. and Barker P. M., 2012. A global algorithm for estimating Absolute Salinity. Ocean Science 8, 1123-1134.

Pawlowicz R., Wright D. G. and Millero F. J., 2011. The effects of biogeochemical processes on oceanic conductivity/salinity/density relationships and the characterization of real seawater. Ocean Science 7, 363-387.

Pawlowicz R., 2013. What every oceanographer needs to know about TEOS-10 (The TEOS-10 Primer). http://www.teos-10.org/

See Also

eos2teos_chem, teos2eos_geo, sa2sp_cham, package gsw

Examples

# Calculate in situ temperature and practical salinity of a sample with 
   # Absolute salinity of 35 g/kg, Conservative temperature of 18 deg C,
   # at 0 dbar and Total alkalinity of 0.00234 mol/kg and DIC of 0.00202 mol/kg
   f <- teos2eos_chem(SA=35, CT=18, P=0, TA=0.00234, DIC=0.00202)
   T <- f$T     # insitu temperature
   SP <- f$SP     # Practical salinity

Convert temperature and salinity from TEOS-10 to EOS-80

Description

Converts conservative temperature to in situ temperature and absolute salinity to practical salinity (SP). Salinity conversion depends on depth and geographic location.

Usage

teos2eos_geo(SA, CT, P=0, long=1.e20, lat=1.e20)

Arguments

SA

Absolute salinity in g/kg

CT

Conservative temperature in degrees C

P

Sea water pressure in dbar

long

Longitude in decimal degrees [ 0 ... +360 ] or [ -180 ... +180 ]

lat

Latitude in decimal degrees [-90 ... 90]

Details

Conversion from absolute to practical salinity depends on water density anomaly which is correlated with silicate concentration. This function relies on silicate concentration taken from WOA (World Ocean Atlas) to evaluate the density anomaly.

Value

The function returns a data frame containing the following columns:

T

In situ temperature (deg C)

SP

Practical salinity (psu)

Author(s)

Jean-Marie Epitalon

References

McDougall T. J., Jackett D. R., Millero F. J., Pawlowicz R. and Barker P. M., 2012. A global algorithm for estimating Absolute Salinity. Ocean Science 8, 1123-1134.

Pawlowicz R., Wright D. G. and Millero F. J., 2011. The effects of biogeochemical processes on oceanic conductivity/salinity/density relationships and the characterization of real seawater. Ocean Science 7, 363-387.

Pawlowicz R., 2013. What every oceanographer needs to know about TEOS-10 (The TEOS-10 Primer). http://www.teos-10.org/

See Also

eos2teos_geo does the reverse, teos2eos_chem, sa2sp_geo, package gsw

Examples

# Calculate in situ temperature and practical salinity of a sample with 
   # Absolute salinity of 35 g/kg, conservative temperature of 18 deg C,
   # depth is 10 dbar and location is 188 degrees East and 4 degrees North.
   f <- teos2eos_geo(SA=35, CT=18, P=10, long=188, lat=4)
   T <- f$T     # in situ temperature
   SP <- f$SP     # Practical salinity

Potential temperature of seawater

Description

Computes theta, the potential temperature of seawater given original temperature, salinity, pressure, and reference pressure

Usage

theta(S=35, T=25, P=0, Pref=0)

Arguments

S

Salinity on the practical salinity scale, default is 35

T

Temperature in degrees Celsius, default is 25oC

P

Hydrostatic pressure in bar (surface = 0; 1000 db = 100 bar), default is 0

Pref

Reference hydrostatic pressure in bar, default is 0

Details

Computes the potential temperature of seawater relative to a chosen reference pressure following Fofonoff and Millard (1983). The potential temperature θ\theta is the temperature that a water parcel would have if were moved adiabatically to another pressure level Pref. Typically, the potential temperature is referenced to the surface (Pref=0Pref=0). The potential teperature depends on the original salinity S, in-situ temperature T and pressure P.

This routine is essentially a wrapper for the swTheta routine of the 'oce' package. Unlike the latter, pressure units here are given in bars and method="unesco" is prescribed.

Value

theta

potential temperature of seawater (C)

Author(s)

James Orr [email protected]

References

Fofonoff, P. and R. C. Millard Jr, 1983. Algorithms for computation of fundamental properties of seawater. Unesco Technical Papers in Marine Science, 44, 53 pp.

See Also

swTheta.

Examples

#Calculate the potential temperature for a sample at 1000 db referenced to the surface
   theta <- theta(S=35, T=25, P=100, Pref=0)

pH of TRIS buffer

Description

Calculates the pH value of TRIS buffered artificial seawater solutions (on the total scale in mol/kg-soln)

Usage

tris(S=35,T=25,b=0.04,k="d98",warn="y")

Arguments

S

Salinity, default is 35

T

Temperature in degrees Celsius, default is 25oC

b

Molality if TRIS/TRISH+ in moles per kg of water, default is 0.04 mol/kg-H20

k

"d98" for DelValls and Dickson 1998, "m18" for using tris characterization by Mueller et al (2018), default is "d98"

warn

"y" to show warnings when S,T and/or b go beyond the valid range for the chosen k; "n" to supress warnings. The default is "y".

Details

The models used to calculate the return value of this function are based on experimental data. It is critical to consider that each formulation refers to the artificial seawater solution applied during the characterization experiment and is only valid for the studied ranges of temperature and salinity:

  • DelValls and Dickson (1998): S ranging between 20 and 40, T ranging between 0 and 45oC, and b being 0.04 mol/kg-H20.

  • Mueller et al. (2018): S ranging between 5 and 40, T ranging between 5 and 45oC, and b ranging between 0.01 and 0.04 mol/kg-H20.

Note that the arguments can be given as a unique number or as vectors. If the lengths of the vectors are different, the longer vector is retained and only the first value of the other vectors is used. It can therefore be critical to use vectors of the same length.

Value

tris

The function returns the pH value of TRIS buffered artificial seawater solutions (on the total scale in mol/kg-soln)

Author(s)

Jean-Pierre Gattuso [email protected] and Jens Daniel Mueller [email protected]

References

DelValls, T. A., and Dickson, A. G., 1998 The pH of buffers based on 2-amino-2-hydroxymethyl-1,3-propanediol ('tris') in synthetic sea water. Deep Sea Research Part I: Oceanographic Research Papers 45(9), 1541-1554. https://doi.org/10.1016/S0967-0637(98)00019-3

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Mueller, J. D., Bastkowski, F., Sander, B., Seitz, S., Turner, D. R., Dickson, A. G., and Rehder, G., 2018 Metrology for pH measurements in brackish waters- Part 1: Extending electrochemical pHT measurements of TRIS buffers to salinities 5-20. Frontiers in Marine Science 5:176, 1-12. https://doi.org/10.3389/fmars.2018.00176

See Also

amp, pHslope, pH.

Examples

##Example from Mueller et al. (2018), should give test value pHT = 8.0703
	 tris(S=20,T=25,b=0.04,k="m18")

Computes vapor pressure of seawater

Description

Computes vapor pressure of seawater (atm) from temperature and salinity

Usage

vapress(S=35, T=25, form="d2007")

Arguments

S

Salinity on the practical salinity scale, default is 35

T

Temperature in degrees Celsius, default is 25oC

form

choose either "d2007" for the best-practices formulation to compute vapor pressure of seawater from Dickson et al. (2007) or "wp1980" for the formulation from weiss and Price (1980).

Details

Computes the vapor pressure of seawater pH20 following best practices (Dickson et al., 2007). That computed pH20 is identical, when rounded to the 4th decimal place, with that computed by the equation from Weiss and Price (1980).

Value

vapress

Vapor pressure of seawater in atm

Author(s)

James Orr [email protected]

References

Dickson A. G., Sabine C. L. and Christian J. R. (2007) Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Weiss, R. F. (1974) Carbon dioxide in water and seawater: the solubility of a non-ideal gas, Marine Chemistry, 2, 203-215.

Weiss, R. F. and Price, B. A. (1980) Nitrous oxide solubility in water and seawater, Marine Chemistry, 8, 347-359.

See Also

x2pCO2, and p2xCO2.

Examples

pH20 <- vapress(S=35, T=25, form="d2007")

Converts mole fraction to partial pressure of CO2

Description

Converts xCO2 (mole fraction of CO2) into pCO2 (partial pressure of CO2)

Usage

x2pCO2(S=35, T=25, Patm=1.0, xCO2=400)

Arguments

S

Salinity on the practical salinity scale, default is 35

T

Temperature in degrees Celsius, default is 25oC

Patm

Atmospheric pressure in atmospheres, default is 1.0

xCO2

Mole fraction of CO2 in ppm, default is 400

Details

The mole fraction xCO2 (ppm) is computed from pCO2 (μ\muatm) using the following equation: xCO2=pCO2(PatmpH2O)xCO2 = pCO2 (Patm - pH2O), where pH20 is the vapor pressure of seawater computed following best practices (Dickson et al., 2007). That computed pH20 is identical, when rounded to the 4th decimal place, with that computed by the equation from Weiss and Price (1980).

Value

pCO2

Partial pressure of CO2 in μ\muatm.

Note

Warning: pCO2 estimates below 100 m are subject to considerable uncertainty. See Weiss (1974) and Orr et al. (2015)

Author(s)

James Orr [email protected]

References

Dickson A. G., Sabine C. L. and Christian J. R., 2007 Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.

Orr J. C., Epitalon J.-M. and Gattuso J.-P., 2015. Comparison of seven packages that compute ocean carbonate chemistry. Biogeosciences 12, 1483-1510.

Weiss, R. F. (1974) Carbon dioxide in water and seawater: the solubility of a non-ideal gas, Marine Chemistry, 2, 203-215.

Weiss, R. F. and Price, B. A. (1980) Nitrous oxide solubility in water and seawater, Marine Chemistry, 8, 347-359.

See Also

p2xCO2 and vapress

Examples

## Atmospheric pressure is rarely equal to 1 atm exactly 
## Over the Southern Ocean Patm=0.97 is more realistic
   pCO2_socn <- x2pCO2(S=35, T=0, Patm=0.97, xCO2=400.0)
   print(pCO2_socn)
## The result (385.6322 uatm) is 12 uatm less than if it was wrongly assumed that Patm=1.0

## Show effect of temperature on pCO2 computed from xCO2, and on resulting variables from "carb"
S <- 35
ALK <- 2300e-6
T <- seq(0,30,5)
xCO2 <- 400
pCO2 <- x2pCO2(S=35, T=T, Patm=1, xCO2=400)
results <- carb(flag=24, var1=pCO2, var2=ALK, S=S, T=T, P=0, Pt=0, Sit=0, 
  pHscale="T", kf="pf", k1k2="l", ks="d", b="u74")
print(results)