Pyco2sys

Latest version: v1.8.3.1

Safety actively analyzes 622315 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

1.8.3

***New features***

* Added `"dlnfCO2_dT"` and `"dlnpCO2_dT"` results, the theoretical effect of temperature on the natural log of <i>ƒ</i>CO<sub>2</sub> and <i>p</i>CO<sub>2</sub>.
* Added the [PLR18](../refs/p) parameterisation of the carbonic acid constants for sea-ice brines.

***Default options***

* Reverted default `opt_k_carbonic` to `10` (i.e., [LDK00](../refs/l)) for consistency with the best practice guide.

***Bug fixes***

* Updated `pyco2.equilibria.p1atm.kH2CO3_NBS_MCHP73` (used for `opt_k_carbonic` options `6` and `7`) to update any salinity values less than 10<sup>–16</sup> to be 10<sup>–16</sup>, because zero salinities give a NaN for <i>K</i><sub>2</sub>, 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.

1.8.2

***New features***

* Added `opt_pressured_kCO2` to enable pressure corrections for the fugacity factor and CO<sub>2</sub> solubility constant following [W74](https://PyCO2SYS.readthedocs.io/en/latest/refs/#w). These have been added to CO2SYS-MATLAB by Jon Sharp at the same time with consistent results (differences less than 10<sup>−4</sup> %). 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 combinations `7, 10`, `7, 11`, `8, 10` and `8, 11`.
* Updated Autograd version for compatibility with Python 3.11.

1.8.1

*Changes in v1.8.1*

***Breaking changes***

* For consistency with other settings, `buffers_mode` kwarg key changed to `opt_buffers_mode` and its values are now integers rather than strings.

***New features***

* Adds new `par1_type` / `par2_type` options `10` and `11` for saturation states with respect to calcite and aragonite.
* Adds [KSK18](../refs/k) parameterisation for estimating total borate from salinity.

***Dependencies***

* Switched to Autograd v1.4.

1.8.0

***New features***

* Adds `pressure_atmosphere` and `pressure_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-CO<sub>2</sub> 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.

1.7.1

*Bug fixes*

* Improved handling of zero-valued inputs.
* Adjusted `CO2SYS_wrap` to work with latest pandas release.

1.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](https://pyco2sys.readthedocs.io/en/latest/refs/#s).
* Added bisulfate dissociation constant parameterisation of [WM13](https://pyco2sys.readthedocs.io/en/latest/refs/#w)/[WMW14](https://pyco2sys.readthedocs.io/en/latest/refs/#w).
* Added spreadsheet-to-spreadsheet function `pyco2.ezio` (with thanks to [Daniel Sandborn](https://github.com/d-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)].

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.