From c6669246c757f7eeef5bdd695ee8b8dc9f645ebb Mon Sep 17 00:00:00 2001 From: Jago Strong-Wright Date: Fri, 8 May 2026 17:58:10 +0100 Subject: [PATCH 1/3] Corrected calcite solubility parameterisation --- src/Models/CarbonChemistry/equilibrium_constants.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Models/CarbonChemistry/equilibrium_constants.jl b/src/Models/CarbonChemistry/equilibrium_constants.jl index f3ce57d63..0da6a8fdb 100644 --- a/src/Models/CarbonChemistry/equilibrium_constants.jl +++ b/src/Models/CarbonChemistry/equilibrium_constants.jl @@ -760,14 +760,14 @@ end + c.sea_S * S + c.sea_S_sqrt_S³ * S^convert(FT, 1.5)) - return pressure_correction * exp(lnK_therm + lnK_sea) + return pressure_correction * convert(FT, 10)^(lnK_therm + lnK_sea) end summary(::IO, ::KSP) = string("Calcite solubility") show(io::IO, c::KSP) = print(io, "Calcite solubility\n", - " ln(kₛₚ) = $(c.therm_constant) + $(c.therm_T) T + $(c.therm_inverse_T) / T + $(c.therm_log_T) log(T)\n", - " ln(kₛₚˢ) = ln(kₛₚ) + ($(c.sea_sqrt_S) + $(c.sea_T_sqrt_S) T + $(c.sea_inverse_T_sqrt_S) / T) √S\n", - " + $(c.sea_S) S + $(c.sea_S_sqrt_S³) √S³") + " log₁₀(kₛₚ) = $(c.therm_constant) + $(c.therm_T) T + $(c.therm_inverse_T) / T + $(c.therm_log_T) log(T)\n", + " log₁₀(kₛₚˢ) = log₁₀(kₛₚ) + ($(c.sea_sqrt_S) + $(c.sea_T_sqrt_S) T + $(c.sea_inverse_T_sqrt_S) / T) √S\n", + " + $(c.sea_S) S + $(c.sea_S_sqrt_S³) √S³") """ KSP_calcite(; therm_constant = -171.9065, @@ -847,4 +847,4 @@ KSP_aragonite(FT = Float64; sea_inverse_T_sqrt_S, sea_S, sea_S_sqrt_S³, - pressure_correction) \ No newline at end of file + pressure_correction) From 3472a7b5fa412d4ff1815df29ed9c6e25298aca1 Mon Sep 17 00:00:00 2001 From: Jago Strong-Wright Date: Fri, 8 May 2026 17:26:30 -0400 Subject: [PATCH 2/3] correct tests --- test/test_gasexchange_carbon_chem.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_gasexchange_carbon_chem.jl b/test/test_gasexchange_carbon_chem.jl index 12e5c8f4c..868928041 100644 --- a/test/test_gasexchange_carbon_chem.jl +++ b/test/test_gasexchange_carbon_chem.jl @@ -106,8 +106,8 @@ end KspC = KSP_calcite() # Zeebe & Wolf-Gladrow, 2001, Appendix A - @test ≈(log(KspA(Tk, S)), -6.1883; atol = 0.0001) - @test ≈(log(KspC(Tk, S)), -6.3693; atol = 0.0001) + @test ≈(log10(KspA(Tk, S)), -6.1883; atol = 0.0001) + @test ≈(log10(KspC(Tk, S)), -6.3693; atol = 0.0001) @test ≈(KspA.pressure_correction(Tk, P), 1.47866; atol=0.00001) @test ≈(KspC.pressure_correction(Tk, P), 1.52962; atol=0.00001) From 789197df47314f4f2a61feb9892fd6e26c9f7e7b Mon Sep 17 00:00:00 2001 From: Jago Strong-Wright Date: Sat, 9 May 2026 21:51:48 +0100 Subject: [PATCH 3/3] Bump patch --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 3ddab0708..a0a169563 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "OceanBioME" uuid = "a49af516-9db8-4be4-be45-1dad61c5a376" -version = "0.17.0" +version = "0.17.1" authors = ["Jago Strong-Wright and contributors"] [deps]