# Seeking feedback on new Julia Carbonate Calculator

**URL:** <https://systemco2.net/t/seeking-feedback-on-new-julia-carbonate-calculator/31>\
**Category:** Help, research and resources\
**Tags:** general, co2sys-matlab, pyco2sys\
**Created:** [17 September 2026 10:14 UTC](https://systemco2.net/t/seeking-feedback-on-new-julia-carbonate-calculator/31 "2026-09-17T10:14:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sophie\_Elam](https://systemco2.net/user_avatar/systemco2.net/sophie_elam/32/24_2.png) [@Sophie\_Elam](https://systemco2.net/u/Sophie_Elam)\
**Post date:** [17 September 2026 10:14 UTC](https://systemco2.net/t/seeking-feedback-on-new-julia-carbonate-calculator/31/1 "2026-09-17T10:14:49Z")

</div>

Hello all! Over in Cambridge we’ve been working on a package in Julia for carbonate system calculations and are at the point where it would be incredibly helpful to get feedback and input from experts & professionals such as yourselves. More details/in depth explanation of all the features are in the README and the repo can be found here: [GitHub - sophieelam/CarbonateCalculator.jl: Carbonate and boron isotope calculator for marine chemistry. · GitHub](https://github.com/sophieelam/CarbonateCalculator.jl)  
If any of you feel compelled to take a look and give feedback, we’d greatly appreciate it!

---

<div class="post-metadata">

**Author:** ![mvdh](https://systemco2.net/user_avatar/systemco2.net/mvdh/32/17_2.png) [@mvdh](https://systemco2.net/u/mvdh)\
**Post date:** [2 October 2026 12:13 UTC](https://systemco2.net/t/seeking-feedback-on-new-julia-carbonate-calculator/31/2 "2026-10-02T12:13:31Z")

</div>

Hi Sophie, thanks for your work on this! Looks like a really nice tool and I’m particularly happy to see the automatic differentiation integrated in there.

I was able to install it and run some basic calculations following the code examples you give in the repo. Below a few pretty minor points after briefly trying it out - my Julia is very rusty so the comments are more on documentation things rather than the details of the code itself.

(1) The temporary install instructions in the readme don’t work because the URLs are Markdown-formatted. They should read:

```julia
using Pkg
Pkg.add(url="https://github.com/oscarbranson/Kgen", rev="julia", subdir="julia/Kgen.jl")
Pkg.add(url="https://github.com/sophieelam/CarbonateCalculator.jl")

```

(2) I am in favour of getting rid of input/output conditions so I like your approach with `at_collection_conditions`. However, I don’t think this is a great name for the method. Adjusting from lab to in situ conditions is one possible use of this tool, but there are many others, so a more generic name might be more suitable (e.g., it’s called `adjust` in PyCO2SYS v2).

(3) Still thinking about `at_collection_conditions`. If the known pair is TA and DIC then it’s not necessary to solve the carbonate system under the initial conditions before recalculating under the new conditions - the readme description implies that this is what happens. Just thinking from an optimisation perspective whether this extra calculation step could be eliminated.

(4) In examples.jl, section 7, it’s noted that the TA-CO3 known pair often has two pH roots. I’m not sure if this is intentional, but it feels like you’re implying that in this case, one of the two is non-physical, when in fact both can be valid (see e.g. [Humphreys et al. (2022)](https://gmd.copernicus.org/articles/15/15/2022/), Fig. 7).

(5) In the same section, the “wrapper to catch non-convergence or unphysical pH values” uses a 0-14 pH range, but why pick these particular cut-offs? Sure, at pH 0 or 14 the equilibria represented in the model are probably no longer appropriate, but this is equally true for pH 13.9 or 0.1 as it is for 14.1 or -0.1.

(6) Related to the above two points, the DIC-HCO3 pair also often has two valid pH roots. Have you thought about making sure this returns the “right” one too?

(7) It would be handy to have a complete list of all the possible arguments and results keys somewhere in the documentation, including their corresponding units.
