Releases: mvdh7/PyCO2SYS
PyCO2SYS: marine carbonate system calculations in Python
PyCO2SYS: marine carbonate system calculations in Python
Changes in v1.8.3.3
- Numpy version restriction to <2 removed, as Autograd incompatibility has been resolved.
PyCO2SYS: marine carbonate system calculations in Python
Changes in v1.8.3.2
- Numpy version restricted to <2 to work around Autograd incompatibility (removal of msort function).
PyCO2SYS: marine carbonate system calculations in Python
Changes in v1.8.3
New features
- Added
"dlnfCO2_dT"
and"dlnpCO2_dT"
results, the theoretical effect of temperature on the natural log of ƒCO2 and pCO2. - Added the PLR18 parameterisation of the carbonic acid constants for sea-ice brines.
Default options
- Reverted default
opt_k_carbonic
to10
(i.e., LDK00) for consistency with the best practice guide.
Bug fixes
- Updated
pyco2.equilibria.p1atm.kH2CO3_NBS_MCHP73
(used foropt_k_carbonic
options6
and7
) to update any salinity values less than 10–16 to be 10–16, because zero salinities give a NaN for K2, which causes problems for Autograd. This should not make any practical difference, because the parameterisation is only valid for salinities above 19. - Added
opt_pressured_kCO2
to results dict and incorporated it correctly into the uncertainty propagation functions.
Technical
- Updated from building with setup.py to pyproject.toml.
PyCO2SYS: marine carbonate system calculations in Python
Changes in v1.8.2
New features
- Added
opt_pressured_kCO2
to enable pressure corrections for the fugacity factor and CO2 solubility constant following W74. These have been added to CO2SYS-MATLAB by Jon Sharp at the same time with consistent results (differences less than 10−4 %). These pressure corrections are not enabled by default, for consistency with previous versions.
Bug fixes
- Fixed logicals in
solve.core()
that had meant no results were returned for parameter type combinations7, 10
,7, 11
,8, 10
and8, 11
. - Updated Autograd version for compatibility with Python 3.11.
PyCO2SYS: marine carbonate system calculations in Python
Changes in v1.8.1
Breaking changes
- For consistency with other settings,
buffers_mode
kwarg key changed toopt_buffers_mode
and its values are now integers rather than strings.
New features
- Adds new
par1_type
/par2_type
options10
and11
for saturation states with respect to calcite and aragonite. - Adds KSK18 parameterisation for estimating total borate from salinity.
Dependencies
- Switched to Autograd v1.4.
PyCO2SYS: marine carbonate system calculations in Python
Changes in v1.8.0
New features
- Adds
pressure_atmosphere
andpressure_atmosphere_out
arguments, rather than assuming 1 atm total barometric pressure.
Behind-the-scenes improvements
- Adds additional constraint to the initial pH estimate for more robust results for the alkalinity-CO2 fugacity parameter pair.
- Difference derivatives for uncertainties now have a fixed step size for each argument, instead of scaling depending on arguments, for more reproducible results.
PyCO2SYS: marine carbonate system calculations in Python
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.1
Bug fixes
- Improved handling of zero-valued inputs.
- Adjusted
CO2SYS_wrap
to work with latest pandas release.
PyCO2SYS: marine carbonate system calculations in Python
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 forPyCO2SYS.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
andpar2_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)].
PyCO2SYS: marine carbonate system calculations in Python
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.rtfd.io.
Changes in v1.6.0
Bug fixes
- Updates the total alkalinity equation to fix minor error in pH scale conversions inherited from CO2SYS-MATLAB (see related note in v1.5.0 release notes).
New inputs and outputs
- Enables inputting total molalities and equilibrium constants for up to two additional contributors to total alkalinity.
- Full chemical speciation returned in the output dict of
pyco2.sys
, not just the alkalinity components as before.
New syntax
- Adds
sys
as an alias forCO2SYS_nd
at the top level. Recommended Python-style syntax is thus nowpyco2.sys
.