pHconv {seacarb}R Documentation

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)

Arguments

flag choice of the type of conversion : flag=1: seawater scale to total scale flag=2: free scale to the total scale flag=3: total scale to the seawater scale flag=4: total scale to the free scale flag=5: seawater scale to the free scale flag=6: free scale to the 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

Details

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 gattuso@obs-vlfr.fr

References

Dickson, A.G. & 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

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)

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

## note that pHc is a vector containing the value of the pH converted 
## to the total scale

[Package seacarb version 2.3.1 Index]