program for CO2 system calculations

Ernie Lewis lewis at bnlocn.das.bnl.gov
Wed Dec 10 09:07:04 EST 1997


We have a program available which performs calculations for the CO2 system
in seawater and freshwater. The program, with accompanying documentation, is
available at http://cdiac.esd.ornl.gov/oceans/co2rprt.html.
Below is a short description of the program. For any questions, please
contact me, Ernie Lewis, 
at elewis at bnl.gov.


About the program

Investigators interested in studying the ocean carbonate system are not in
complete agreement on how to calculate inorganic carbon speciation in
seawater. Over the years there have been many determinations and reviews of
the constants used to describe the dissociation of carbon dioxide (CO2) in
the ocean, but no universally accepted set of constants exists. Several
subtly different pH scales remain in common use, as do variations in the
definition of total alkalinity and arguments over the relative merits of
reporting the partial pressure versus the fugacity of CO2. As ocean CO2
measurements become steadily more accurate and investigators seek to
evaluate very small changes in concentrations, these issues grow in importance. 

We recently released a computer program that we hope will be of general use
and perhaps help to clear up some of the confusion. Given any two of the
four measurable carbonate system parameters, the program calculates the
other two, together with the inorganic carbon speciation and the saturation
of calcite and aragonite. The program also allows the user to select from
four different pH scales and several sets of dissociation constants widely
cited in the literature. 

Run in "single input" mode, the program reports calculated results together
with the sensitivity of the calculated parameters to uncertainties in input
parameters, constants, and the like. Run in "batch input" mode, the program
can be used to process large data sets, such as cruise data derived from
spreadsheets. In writing the code we spent considerable time crosschecking
the relevant literature and checking units and scales. We are reasonably
confident that the program itself does not introduce any errors and is
consistent with the primary literature. 

The program is written in compiled Quick-Basic and runs under DOS on almost
any personal computer processor. As a result, the user interface is
functional but not flashy. The program includes on-line documentation as
well as a listing of typos and inconsistencies culled from the literature.
We may develop a Visual Basic for Applications version if the demand for it
is sufficient. 

More information on this program is available from Ernie Lewis. This work
was supported by the U.S. Department of Energy, Office of Health and
Environmental
Research, under Contract No. DE-ACO2-76CH00016. 

Introduction 

The program CO2SYS.EXE performs calculations relating parameters of the
carbon dioxide (CO2) system in seawater and freshwater. The program uses two
of the four measureable parameters of the CO2 system [total alkalinity (TA),
total inorganic CO2 (TCO2), pH, and either fugacity (fCO2) or partial
pressure of CO2 (pCO2)] to calculate the other two parameters at a set of
input conditions (temperature and pressure) and a set of output conditions
chosen by the user. It replaces and extends the programs CO2SYSTM.EXE,
FCO2TCO2.EXE, PHTCO2.EXE, and CO2BTCH.EXE, which were released in May of
1995. It may be run in single-input mode or batch-input mode and has a
variety of options for the various constants and parameters used. There is
an on-screen information section with documentation on various topics
relevant to the program. This program may be run on any 80x86 computer
equipped with the DOS operating system by simply typing CO2SYS at the prompt. 


*********************************************************
Ernie Lewis
Department of Applied Science
Brookhaven National Laboratory
Upton, New York 11973-5000
(516)-344-7406
elewis at bnl.gov
*********************************************************



More information about the Coral-list-old mailing list