Learn R Programming

seacarb (version 0.97)

carb: Parameters of the seawater carbonate system

Description

Returns parameters of the seawater carbonate system.

Usage

carb(flag = 8, var1 = 8.2, var2 = 2400, S = 35, T = 25, P = 0, k1k2 = "r", 
phflag = 0, ini = "s")

Arguments

flag
select the couple of variables to be used, see below, default is 8 that is pH and total alkalinity 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
var1
enter value of the first variable in umol/kg except for pH, default is pH = 8.2
var2
enter value of the second variable in umol/kg except for pH, default is total alkalinity = 2400 umol/kg
S
Salinity, default is 35
T
Temperature in degrees Celsius, default is 25oC
P
Hydrostatic pressure in bar (surface = 0), default is 0
k1k2
"r" for using K1 and K2 from Roy et al. and "m" for using K1 and K2 from Mehrbach, default is "r"
phflag
The pH scale is either the total scale (0) or the free scale (1), default is 0
ini
"s" if the input data are given through the keyboard or "f" if there are provided in a file (see example below), default = s

Value

  • SSalinity
  • TTemperature in degrees Celsius
  • PPressure in bar
  • PHpH
  • CO2CO2 concentration (mol/kg)
  • pCO2pCO2, CO2 partial pressure (uatm)
  • fCO2fCO2, CO2 fugacity (uatm)
  • HCO3HCO3 concentration (mol/kg)
  • CO3CO3 concentration (mol/kg)
  • DICDIC concentration (mol/kg)
  • ALKALK, total alkalinity (mol/kg)
  • OaOmega aragonite, aragonite saturation state
  • OcOmega calcite, calcite saturation state
  • PhiDPhiD, chemical buffer factor (dpH/d[DIC]); input/output of dissolved CO2 (unit pH per mol/kg)
  • BetaDBetaD, homogeneous buffer factor (dln(pCO2)/dln[DIC]); input/output of dissolved CO2
  • PiDPiD, chemical buffer factor (dpCO2/d[DIC]); input/output of dissolved CO2 (uatm per mol/kg)
  • PhiBPhiB, chemical buffer factor (dpH/d[DIC]); from input/output of bicarbonate (unit pH per mol/kg)
  • BetaBBetaB, homogeneous buffer factor (dln(pCO2)/dln[DIC]); input/output of bicarbonate
  • PiBPiB, chemical buffer factor (dpCO2/d[DIC]); input/output of dissolved CO2 (uatm per mol/kg)
  • PhiCPhiC, chemical buffer factor (dpH/d[DIC]); input/output of carbonate (unit pH per mol/kg)
  • BetaCBetaC, homogeneous buffer factor (dln(pCO2)/dln[DIC]); input/output of carbonate
  • PiCPiC, chemical buffer factor (dpCO2/d[DIC]); input/output of carbonate (uatm per mol/kg)
  • PhiHPhiH, chemical buffer factor (dpH/d[DIC]); input/output of strong acid (unit pH per mol/kg)
  • PiHPiH, chemical buffer factor (dpCO2/d[DIC]); input/output of strong acid (uatm per mol/kg)

Details

Note that the results output is also stored in the file carb.out located in your working directory. It is a text file with tab delimiters. This file is created if it does not exist and the results are appended if it is already present in the directory.

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. Frankignoulle, M. 1994 A complete set of buffer factors for acid/base CO2 system in seawater. Journal of Marine Systems 5, 111-118. Zeebe, R. E. and Wolf-Gladrow D. A., 2001 CO2 in seawater: equilibrium, kinetics, isotopes. Amsterdam: Elsevier, 346 pp.

Examples

Run this code
##Data entry via the keyboard
carb(8, 8.2, 2400, 35, 25, 0) 

The input parameters are pH=8.2, total alkalinity = 2400 umol/kg,
 Salinity = 35, temperature = 25 oC and pressure = 0 bar (that is surface water)

The output is:

Salinity:                35 
Temperature:             25 oC
Pressure:                0 bar
pH:                      8.2 
CO2:                     7.477544e-06 (mol/kg)
pCO2:                    263.3691 (uatm)
fCO2:                    262.54 (uatm)
HCO3:                    0.001649802 (mol/kg)
CO3:                     0.0003108231 (mol/kg)
DIC:                     0.001968102 (mol/kg)
ALK:                     0.0024 (mol/kg)
Omega aragonite:         4.929621 
Omega calcite:           7.478931 
PhiD:                    -1369.120 
BetaD:                   8.160777 
PiD:                     1.092065 
PhiB:                    -182.8422 
BetaB:                   1.956302 
PiB:                     0.2617900 
PhiC:                    1003.436 
BetaC:                   -4.248173 
PiC:                     -0.5684854 
PhiH:                    -1186.278 
PiH:                     0.8302753 

## Data entry via a file
carb(ini = "f")

The file must be located in your home directory and provide the column names 
(these names MUST match the names listed above) and the data must be separated
by tabs. Note that, in contrast to the keyboard input, variables used in the
file input must be in mol/kg.

For example:

flag	PH	ALK	S	T	P
8	8.2	2400e-6	35	20	0
8	8.2	2400e-6	35	20	0

Run the code above in your browser using DataLab