PyCO2SYS: marine carbonate system calculations in Python
Abstract
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 CO2 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)].
- Publication:
-
Zenodo
- Pub Date:
- DOI:
- 10.5281/zenodo.4757055
- Bibcode:
- 2021zndo...4757055H