Learn R Programming

seacarb (version 2.0.2)

pmix: 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)

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

var1
Value of the first variable in mol/kg except for pH and for pCO2 in $\mu$atm
var2
Value of the second variable in mol/kg except for pH
pCO2s
Partial pressure of the high CO2 component in $\mu$atm
wf
Weight fraction of the high CO2 seawater vs normal seawater in $kg^{-1}$:$kg^{-1}$
S
Salinity
T
Temperature in degrees Celsius
P
Hydrostatic pressure in bar (surface = 0)

Value

  • The function returns a data frame containing the following columns:
  • commentThe initial or final state water
  • SSalinity
  • TTemperature in degrees Celsius
  • PPressure in bar
  • pHpH
  • CO2CO2 concentration (mol/kg)
  • pCO2pCO2, CO2 partial pressure ($\mu$atm)
  • fCO2fCO2, CO2 fugacity ($\mu$atm)
  • HCO3HCO3 concentration (mol/kg)
  • CO3CO3 concentration (mol/kg)
  • DICDIC concentration (mol/kg)
  • ALKALK, total alkalinity (mol/kg)
  • OmegaAragoniteOmega aragonite, aragonite saturation state
  • OmegaCalciteOmega calcite, calcite saturation state

encoding

latin1

Examples

Run this code
pmix(flag=24, var1=384, var2=2302e-6, pCO2s=1e6, wf=0.003, S=34.3, T=16, P=0)

Run the code above in your browser using DataLab