News (June 2023)

Chemical Speciation Modelling Software Now Available for Download

For all potential users of the MarChemSpec models, especially attendees (both in-person and virtual) at the Tutorial and Launch event at Woods Hole on 15th and 16th June: Downloads of the standalone models for execution from a command prompt (and from Excel, for Windows only), and MATLAB and Python functions, are available for Windows and Linux (and now Apple macOS) at the links below.

Attendees at the Tutorials: you will receive an email with some further instructions about what we would like you to do.

These are the programs and functions that can be downloaded:

  • The standalone seawater model (MCS_sea): calculate seawater state parameters  (pCO2, fCO2, total pH, carbonate and borate equilibrium constants), with estimated uncertainties, for natural waters containing the species of reference seawater but of arbitrary composition.
  • The standalone seawater model for the effects of composition change (MCS_delta): calculate the change in seawater state parameters, with estimated uncertainties, corresponding to a change in natural water composition (typically from reference seawater to something with a different major ion composition).
  • The standalone model for the calculation of the inorganic complexation of GEOTRACES trace metals (MCS_trace) in natural waters containing the species of seawater but of arbitrary composition.
  • MATLAB and Python functions that can carry out several different types of calculation using the seawater and trace metal complexation models (and also one for artificial seawater and Tris buffers).

Functions for the R language will be available later this year.

The downloads are in the form of zip files (Windows) and zipped tar files (Linux and macOS):

Questions and comments: email Simon Clegg ( for general matters, David Turner ( for MATLAB issues, and Terra Ganey ( for Python.

Below: Previous MarChemSpec announcement, with further details

“MARCHEMSPEC” stands for Marine Chemical Speciation, and will be the name for the models and software tools produced by our project. The software implements  our models of natural waters containing the ions of seawater, artificial seawater, and traces metals including the GEOTRACES core species.

The models and software will be launched with talks and demonstrations at Woods Hole Oceanographic Institution, following the June 2023 Ocean Carbon and Biogeochemistry Summer Workshop. These demonstrations, both in-person and online, will take place on Thursday 15th June (afternoon), and Friday the 16th June (morning), US Eastern time.

Please go to this link for more details, and to express your interest in attending. The talks will be recorded. Downloads of the software will be available here (at from early June.

These easy-to-use models are for the calculation of: 

  • Acid-base equilibria, and CaCO3 saturation in natural waters containing the ions of seawater.
  • Inorganic complexation of trace metals Al, Cd, Co, Cu(II), Fe(II), Fe(III), Mn, Ni, Pb and Zn in natural waters.

What does the software consist of? First, there are two standalone programs that can be run from the command prompt. The first one takes a file of natural water compositions, and temperatures, as input. The outputs are the equilibrium speciation and the calculated values of pH (three different measures), stoichiometric equilibrium constants for the carbonate system, borate, fluoride, and water. These equilibrium constants are expressed on the same basis as those described in, for example, chapter two of Dickson et al. (2007) Guide to Best Practices for Ocean CO2 Measurements, North Pacific Marine Science Organisation, PICES Special Publication 3, IOCCP Report No. 8. Estimates of uncertainties in the calculated values of these quantities are provided. They are also presented on both an ‘amount content’ basis (moles per kg of solution), and a molality basis (moles per kg of pure water). This is true of all our programs. 

The other standalone program is very similar, except that it takes pairs of natural water compositions as inputs and calculates the changes in pH and the equilibrium constants mentioned above between the two solutions. This program could be used to calculate the change in these key properties associated with a change in composition from that of standard seawater to one with a different ionic composition, for example. The model also provides estimates of the uncertainties in the calculated differences in pH and pK.

These programs are the two most flexible that we can provide, and can easily be used to process large numbers of compositions. Output as .csv files (comma separated values) is provided, and these can be read directly into spreadsheet programs. Current limitations: the compositions of the natural waters are input either as practical salinities or as total amount contents (or molalities) of all solute species, including H+. We have not yet added the capability to equilibrate a solution to user-specified values of pairs of the four key variables total pH, alkalinity, DIC, and pCO2. This will be implemented later in the year.

Second, we have also produced versions of the model that can be called, in a simple way, from within MATLAB, Python, and R. These have essentially the same capabilities as the standalone programs but must be called once for each individual solution being processed. For calculations including trace metals these versions of the model also output the proportions of the total amounts of each dissolved metal that are complexed by each of the inorganic anions.

The software has been developed mostly on Windows machines, which we are most familiar, but should be available for Linux and perhaps for Apple machines by the time of the launch in June. More information will be provided here (and directly, by email, to those who sign up for the presentations and tutorials on the OCB Summer Workshop site.

Simon Clegg ( and David Turner ( will give the presentations and demonstrations at the launch event. Please contact one of us if you have questions.