You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jagoosw:
Do you know where this is in the paper? I can't see any log10s?
jagoosw:
jagoosw:
I think there is a problem with the current calcite saturation, I think it is off by a factor of 1000, but I thought currently that it might be a unit problem with the Ca+ ions?
johnryantaylor:
It is in Mucci 1983 page 792. It is confusing because it just says "log", but below equation 10, the text says that log refers to log_10. It is worth double checking with another source, though. Presumably CO2SYS has this formula in it?
johnryantaylor:
The image that you posted does have ln(). Is this from Millero?
jagoosw:
Yeah this is from Millero, I guess that this is a mistake in Millero because pyco2sys has 10^
jagoosw:
I'll make a separate PR to correct this
johnryantaylor:
This is what CO2SYS has:
% CalciteSolubility:
% ' Mucci, Alphonso, Amer. J. of Science 283:781-799, 1983.
logKCa = -171.9065 - 0.077993.*TempK + 2839.319./TempK;
logKCa = logKCa + 71.595.*logTempK./log(10);
logKCa = logKCa + (-0.77712 + 0.0028426.*TempK + 178.34./TempK).*sqrSal;
logKCa = logKCa - 0.07711.*Sal + 0.0041249.*sqrSal.*Sal;
% ' sd fit = .01 (for Sal part, not part independent of Sal)
KCa = 10.^(logKCa);% ' this is in (mol/kg-SW)^2
johnryantaylor:
That is the Matlab implementation of CO2SYS.
johnryantaylor:
While I'm looking at it, the pressure correction term for aragonite in CO2SYS looks very different:
% PressureCorrectionForAragonite:
% ' Millero, Geochemica et Cosmochemica Acta 43:1651-1661, 1979,
% ' same as Millero, GCA 1995 except for typos (-.5304, -.3692,
% ' and 10^3 for Kappa factor)
deltaVKAr = deltaVKCa + 2.8;
KappaKAr = KappaKCa;
lnKArfac = (-deltaVKAr + 0.5.*KappaKAr.*Pbar).*Pbar./RT;
KAr = KAr.*exp(lnKArfac);
The pressure correction for calcite is the same as what we have. Is it possible that this needs to be updated too?
johnryantaylor:
Sorry, scratch that last comment - I hadn't spotted that CO2SYS is just modifying the calcite values. This looks fine
jagoosw:
I found how this slipped through, the book I used for the check values also just lists "log", and I realise now they use "ln" for the natural log
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As caught in #367