ppH: ppH

Description Usage Arguments Value Author(s) See Also Examples

Description

Calculates the carbonate chemistry after pH manipulations through addition of acid or base

Usage

1
ppH(flag, sys, var1, var2, pCO2a, vol, N, S=35, T=20, P=0, Pt=0, Sit=0, pHscale="T", k1k2="l", kf="pf")

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 μatm

var2

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

pCO2a

CO2 partial pressure in the atmosphere pCO2 in μatm. 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

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

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

k1k2

"l" for using K1 and K2 from Lueker et al. and "r" for using K1 and K2 from Roy and al. , default is "l"

kf

"pf" for using Kf from Perez and Fraga (1987) and "dg" for using Kf from Dickson and Goyet (1979), default is "pf"

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 (μatm)

fCO2

fCO2, CO2 fugacity (μatm)

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

Author(s)

Jean-Pierre Gattuso gattuso@obs-vlfr.fr

See Also

buffer.

Examples

1
2
3
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")

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")

Example output

Loading required package: oce
Loading required package: gsw
Loading required package: testthat
             comment flag    S  T Patm P       pH          CO2     fCO2
1 ppH-closed-initial   24 34.3 16    1 0 8.064030 1.396345e-05 382.6302
2   ppH-closed-final   15 34.3 16    1 0 7.791228 2.670278e-05 731.7165
      pCO2  fCO2pot  pCO2pot fCO2insitu pCO2insitu        HCO3          CO3
1 384.0000 382.6302 384.0000   382.6302   384.0000 0.001890783 1.664526e-04
2 734.3371 731.7165 734.3371   731.7165   734.3371 0.001929312 9.062504e-05
          DIC         ALK OmegaAragonite OmegaCalcite
1 0.002071199 0.002302000       2.564667     3.989249
2 0.002046639 0.002156126       1.396332     2.171945
           comment flag    S  T Patm P       pH          CO2     fCO2 pCO2
1 ppH-open-initial   24 34.3 16    1 0 8.064030 1.396345e-05 382.6302  384
2   ppH-open-final   24 34.3 16    1 0 8.038984 1.396345e-05 382.6302  384
   fCO2pot pCO2pot fCO2insitu pCO2insitu        HCO3          CO3         DIC
1 382.6302     384   382.6302        384 0.001890783 0.0001664526 0.002071199
2 382.6302     384   382.6302        384 0.001784822 0.0001483190 0.001947104
          ALK OmegaAragonite OmegaCalcite
1 0.002302000       2.564667     3.989249
2 0.002156126       2.285269     3.554655

seacarb documentation built on May 2, 2019, 5:34 p.m.

Related to ppH in seacarb...