Releases: jonathansharp/CO2-System-Extd
CO2SYSv3 for MATLAB
In this release, an option is included in 'CO2SYS.m' to perform pressure corrections on the CO2 solubility constant (K0) and the fugacity factor (FugFac). Previous versions of CO2SYS have evaluated these terms only at atmospheric pressure.
The corrections are performed according to Weiss (1974) as described in Orr and Epitalon (2015). By default, the corrections are not made (for consistency with previous CO2SYS versions) but can be activated with the optional input pair: 'co2_press',1.
PyCO2SYS has also implemented these optional corrections in v1.8.2, with differences from this version of less than 10−4%.
CO2SYSv3 for MATLAB
This is a relatively major update from CO2SYS v3.1.1 to CO2SYS v3.2.0. It is designed to be maximally compatible with PyCO2SYS v1.7.0, a program for CO2 system calculations in Python that introduced a number of additional capabilities, improvements to performance, and fixes to minor errors/simplifications (Humphreys et al., submitted). Rigorous validation was performed against PyCO2SYS v1.7.0 as part of this update.
Major changes since CO2SYS v3.1.1 are detailed here:
- Initial pH estimates for iterative pH solvers are obtained via the approach of Munhoven (2013), detailed further in Humphreys et al. (submitted), rather than simply using an initial estimate of 8.0 each time.
- Free scale pH is obtained properly within iterative pH solvers no matter the input scale, rather than making the simplification that input pH is always on the total scale.
- Uncertainties in parameters calculated at output conditions that are associated with equilibrium constants are calculated calculated with respect to equilibrium constants at output conditions, rather than input conditions as previously. This essentially assume pK uncertainty is constant regardless of temperature and pressure.
- [CO2(aq)] is calculated from fCO2 and K0 every time, rather than from different combinations of parameters.
- Substrate-inhibitor ratio (Bach, 2015) is included as an output argument from CO2SYS, rather than calculated in a separate function.
- Input uncertainty in [CO2], [HCO3], and [CO3] should now be input as an absolute value in mol/kg, rather than a relative value.
- Modifications were made to allow vector inputs with different input parameters in each row to errors.m.
- Derivatives and errors for Revelle factor are now calculated.
CO2SYSv3 for MATLAB
Added CO2 dissociation constants of Schockman and Byrne (2021) as K1K2 = 17.
CO2SYSv3 for MATLAB
Added KSO4 of Waters and Millero (2013) as KSO4CONSTANT = 3. Also, added optional input of calcium ion concentration uncertainty to 'errors.m' after Dillon et al. (2020).
CO2SYSv3 for MATLAB
Added MIT license and made minor changes to comments.
CO2SYSv3 for MATLAB
Version 3 of CO2SYS for MATLAB now accepts inputs of carbonate ion, bicarbonate, dissolved CO2, ammonium, and hydrogen sulfide. Choices for KSO4 constant, KF constant (Perez and Fraga (1987) has been added), and total boron have been separated into three distinct inputs. Routines for computation of partial derivatives and propagation of errors in carbonate system calculations (Orr et al., 2018) have been modified for compatibility with CO2SYSv3 and are included in this release. Additional capabilities and changes since version 2 are detailed in the README file. CO2SYSv3 is actively being validated for consistency with the newest version of PyCO2SYS (Humphreys et al., pyco2sys.rtfd.io) and a forthcoming new release of CO2SYS for Microsoft Excel (Pierrot et al.).