Usage
aquaenv(S, t, p=pmax((P-Pa), gauge_p(d, lat, Pa)), P=Pa, Pa=1.01325, d=0, lat=0, SumCO2=0, SumNH4=0, SumH2S=0, SumH3PO4=0, SumSiOH4=0, SumHNO3=0, SumHNO2=0, SumBOH3=NULL, SumH2SO4=NULL, SumHF=NULL, TA=NULL, pH=NULL, fCO2=NULL, CO2=NULL, speciation=TRUE, dsa=FALSE, ae=NULL, from.data.frame=FALSE, SumH2SO4_Koffset=0, SumHF_Koffset=0, revelle=FALSE, skeleton=FALSE, k_w=NULL, k_co2=NULL, k_hco3=NULL, k_boh3=NULL, k_hso4=NULL, k_hf=NULL, k1k2="lueker", khf="dickson", khso4="dickson", fCO2atm=0.000400, fO2atm=0.20946)
Arguments
S
salinity in practical salinity units (i.e. no unit)
t
temperature in degrees centigrade
p
gauge pressure (total pressure minus atmospheric pressure)
in bars, standard is calculated either from the given P,
or the given d, lat, and Pa
P
total pressure in bars, standard: Pa (at the surface)
Pa
atmospheric pressure in bars, standard: 1 atm (at sea-level)
d
depth below the surface in meters, standard: 0 (at the surface)
lat
latitude in degrees (-90 to +90) to calculate the
gravitational constant g for calculating the water depth from the
pressure and vice versa, standard: 0
SumCO2
total carbonate concentration in mol/kg-solution, if NULL is supplied it is calculated
SumNH4
total ammonium concentration in mol/kg-solution, optional
SumH2S
total sulfide concentration in mol/kg-solution, optional
SumH3PO4
total phosphate concentration in mol/kg-solution, optional
SumSiOH4
total silicate concentration in mol/kg-solution, optional
SumHNO3
total nitrate concentration in mol/kg-solution, optional
SumHNO2
total nitrite concentration in mol/kg-solution, optional
SumBOH3
total borate concentration in mol/kg-solution, calculated from S if not supplied
SumH2SO4
total sulfate concentration in mol/kg-solution, calculated from S if not supplied
SumHF
total fluoride concentration in mol/kg-solution, calculated from S if not supplied
TA
total alkalinity in mol/kg-solution, if supplied, pH will be calculated
pH
pH on the free proton concentration scale, if supplied, total alkalinity will be calculated
fCO2
fugacity of CO2 in the water in atm (i.e. the fugacity of
CO2 in a small volume of air fully equilibrated with a sufficiently
large sample of water), can be used with either [TA], pH, or [CO2] to define the system
CO2
concentration of CO2, can be used with either [TA], pH, or fCO2 to define the system
speciation
flag: TRUE = full speciation is calculated
dsa
flag: TRUE = all information necessary to build a pH model with the direct substitution approach (DSA, Hofmann2008) is calculated
ae
either an object of class aquaenv used for the cloning functionality or a dataframe used for the from.data.frame
functionality. Note that for cloning the desired k1k2 and khf values need to be specified! (otherwise the default values are used for the cloned object)
from.data.frame
flag: TRUE = the object of class aquaenv is built from the data frame supplied in ae
SumH2SO4_Koffset
only used internally to calculate dTAdKdKdSumH2SO4
SumHF_Koffset
only used internally to calculate dTAdKdKdSumHF
revelle
flag: TRUE = the revelle factor is numerically calculated. We do however strongly encourage to use the analytical calculation from BufferFactors$RF
skeleton
flag: TRUE = a reduced amount of information is calculated yielding a smaller object of type aquaenv
k_w
a fixed K\_W can be specified
k_co2
a fixed K\_CO2 can be specified; used for TA fitting: give a K\_CO2 and NOT calculate it from T and S: i.e. K\_CO2 can be fitted in the routine as well
k_hco3
a fixed K\_HCO3 can be specified
k_boh3
a fixed K\_BOH3 can be specified
k_hso4
a fixed K\_HSO4 can be specified
k_hf
a fixed K\_HF can be specified
k1k2
either "lueker" (default, Lueker2000), "roy" (Roy1993a),
or "millero" (Millero2006) for K\_CO2 and K\_HCO3.
khf
either "dickson" (default, Dickson1979a) or "perez"
(Perez1987a) for K\_HF
khso4
either "dickson" (default, Dickson1990) or "khoo" (Khoo1977) for
K\_HSO4
fCO2atm
atmospheric fugacity of CO2 in atm, default =
0.000400 atm
fO2atm
atmospheric fugacity of O2 in atm, default =
0.20946 atm