Converts pCO2 (partial pressure of CO2) into xCO2 (mole fraction of CO2)
p2xCO2(S=35, T=25, Patm=1, pCO2)
Salinity on the practical salinity scale, default is 35
Temperature in degrees Celsius, default is 25oC
Atmospheric pressure in atmospheres, default is 1.0 (this is not the hydrostatic pressure)
Partial pressure of CO2 in
Mole fraction of CO2 in ppm.
The xCO2 (ppm) is computed from pCO2 (
Dickson A. G., Sabine C. L. and Christian J. R. (2007) Guide to best practices for ocean CO2 measurements. PICES Special Publication 3, 1-191.
Orr J. C., Epitalon J.-M. and Gattuso J.-P., 2015. Comparison of seven packages that compute ocean carbonate chemistry. Biogeosciences 12, 1483-1510.
Weiss, R. F. (1974) Carbon dioxide in water and seawater: the solubility of a non-ideal gas, Marine Chemistry, 2, 203-215.
Weiss, R. F. and Price, B. A. (1980) Nitrous oxide solubility in water and seawater, Marine Chemistry, 8, 347-359.
# NOT RUN {
## Convert atmospheric pressure from mbar to atm
Patm_mbar = 1052 # in millibar
Patm = Patm_mbar / 1013.25 # in atm
## Compute xCO2 from pCO2
pCO2 = 380
xCO2 = p2xCO2(T=25, S=35, Patm=Patm, pCO2=pCO2)
print(xCO2)
## The result is 377.1546 ppm
# }
Run the code above in your browser using DataLab