Software

The MarChemSpec software implements the results of our recent papers (items 5 – 8 on the Publications page) and consists of easy-to-use models for the calculation of:

  1. Acid-base equilibria, and CaCO3 saturation, in natural waters containing the ions of seawater.
  2. Inorganic complexation of trace metals Al, Cd, Co, Cu(II), Fe(II), Fe(III), Mn, Ni, Pb and Zn in natural waters.
  3. Acid-base equilibrium in solutions containing the ions of artificial seawater which does not contain carbonate, borate, of fluoride species; and also solutions including Tris buffer species (at 25 oC only).

The following programs and functions can be downloaded here:

  • A standalone seawater model (MCS_sea): calculate seawater state parameters  (pCO2fCO2, total pH, carbonate and borate equilibrium constants), with estimated uncertainties, for natural waters containing the species of reference seawater but of arbitrary composition.
  • A 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).
  • A 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).

The model and all files are also archived at Zenodo (MarChemSpec).

The outputs of the models for seawater solutions include the equilibrium speciation and the calculated values of pH (three different measures), and 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.

The downloads are in the form of zip files (Windows) and zipped tar files (Linux and macOS). After extracting the contents of the downloaded file, go to the ‘docs’ directory to find the read_me file, manual, and other instructions. This is version 1.01 of the program (December 2023).

Three tutorials, which are recordings of presentations at the launch event at Woods Hole Oceanographic Institution in June 2023, can be viewed on YouTube here. The tutorials explain the inputs and outputs of the models, and demonstrate some of the example calculations that are included in the downloads above.

The software is released under the Creative Commons Attribution 4.0 International licence. This allows re-distribution and re-use of a licensed work on the condition that the creator is appropriately credited. All users are free to download the software. We ask that potential commercial users contact the principal author (Simon clegg, s.clegg@uea.ac.uk).

Questions and comments: email Simon Clegg (s.clegg@uea.ac.uk) for general matters, David Turner (david.turner@marine.gu.se) for MATLAB issues, and Terra Ganey (tganey@ucsc.edu) for Python.