There is a newer version of the record available.

Published May 13, 2021 | Version v1.7.0
Software Open

PyCO2SYS: marine carbonate system calculations in Python

  • 1. NIOZ Royal Netherlands Institute for Sea Research, Texel, the Netherlands
  • 2. Large Lakes Observatory and Water Resources Department, University of Minnesota Duluth, Duluth, Minnesota, USA
  • 3. ETH Zürich, Switzerland
  • 4. University of Miami, Florida, USA
  • 5. University of Groningen, the Netherlands
  • 6. Brookhaven National Laboratory, New York, USA
  • 7. Dalhousie University, Halifax, Nova Scotia, Canada

Description

PyCO2SYS is a Python toolbox for solving the marine carbonate system and calculating related seawater properties. Its core is a Python implementation of CO2SYS for MATLAB. Documentation is available at PyCO2SYS.readthedocs.io.

Changes in v1.7.0

New features

  • Can now run pyco2.sys with no carbonate system parameter arguments provided, to just return all the equilibrium constants etc. under the specified conditions.
  • Can also run pyco2.sys with only one carbonate system parameter argument. This does not solve the carbonate system, but does calculate all that can be calculated with that parameter.
  • Added carbonic acid constants parameterisation of SB21.
  • Added bisulfate dissociation constant parameterisation of WM13/WMW14.
  • Added spreadsheet-to-spreadsheet function pyco2.ezio (with thanks to Daniel Sandborn).
  • Integrated uncertainty propagation into the main pyco2.sys function and expanded its capabilities.

Internal updates

  • Switched default first-guess pH for solving from the alkalinity-carbonate ion parameter pair at low alkalinity from 10 to 3.
  • Renamed various internal functions and variables for better consistency with the Pythonic pyco2.sys i/o syntax.
  • Removed the PyCO2SYS.test module, instead defining the round-robin test functions it contained directly in the test suite.
  • Added various internal settings for testing and validation against older CO2SYS-MATLAB versions.
  • Adjust aqueous CO<sub>2</sub> calculation for better consistency with CO2SYS-MATLAB (but negligible changes in the results).
  • Can now use PyCO2SYS.hello() to find version number and credits (alias for PyCO2SYS.say_hello()).
  • The final component of DIC (or DIC itself) to be calculated is now always computed by difference from the known components.
  • Various functions in convert module renamed.

Validation

  • Rigorous validation against various CO2SYS-MATLAB versions performed, as described in forthcoming PyCO2SYS manuscript (Humphreys et al., in prep.).

Bug fixes

  • par1, par2, par1_type and par2_type arguments now always get broadcasted to the maximum size, even if they are scalar.
  • Erroneous "k_phosphate_*" keys corrected to "k_phosphoric_".
  • Override values for equilibrium constants under output conditions now assigned correctly.
  • Fixed minor errors in initial pH estimates when solving from alkalinity and either DIC or [CO$_2$(aq)].

Files

mvdh7/PyCO2SYS-v1.7.0.zip

Files (78.3 MB)

Name Size Download all
md5:14b2606051aee2aa328894115b9837a3
78.3 MB Preview Download

Additional details

Related works