Conversation
`K0` is defined in `OceanBioME.Models.CarbonChemistryModel`, not in the `GasExchangeModel` module the docstring lives in, so Documenter couldn't resolve the unqualified @ref and the docs build failed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TH7fhhztRhnmURhX3tWFMD
The CO₂ gas exchange rework is breaking, so this needs a minor bump rather
than the patch bumps it has had so far (0.18.4 -> 0.18.7). Under Julia's 0.x
convention the leading non-zero is the major version.
Breaking changes
================
1. `CarbonDioxideConcentration` lost the `first_virial_coefficient`,
`cross_virial_coefficient` and `air_pressure` keyword arguments. Code that
passes any of them now throws a `MethodError`. The virial coefficients live
on the `carbon_chemistry` instead, so `wc.first_virial_coefficient` becomes
`wc.carbon_chemistry.first_virial_coefficient`, and the atmospheric pressure
moved to the air side (`CarbonDioxideAirConcentration`).
2. `CarbonDioxideConcentration`'s type parameters went from
`{DIC, Alk, CC, FV, CV, AP}` to `{DIC, Alk, CC}`, breaking any dispatch on,
or direct construction of, the old form.
3. SILENT: `surface_value(::CarbonDioxideConcentration, ...)` used to return
pCO₂ in ppmv and now returns [CO₂(aq)] in mmol / m³. The same call returns a
different physical quantity in different units with no error.
4. Default CO₂ fluxes change by ~15%. The air side moved from `K0` to the Weiss
and Price (1980) dry-air solubility `ff` (~2% smaller) and the water side from
pCO₂ to fCO₂ (~0.35%); because the flux is a small difference of two much
larger terms, that is amplified roughly 6.6x. Existing simulations will not
reproduce their previous results.
5. SILENT: `SchmidtScaledTransferVelocity`'s default `solubility` changed from a
`K0`-folding closure to `UnitSolubility`, i.e. a bare piston velocity. Anyone
relying on the old default now gets a transfer velocity short by the
solubility factor.
6. An `air_concentration` given as a bare number, function or `Field` is now a
dry air mole fraction in ppmv that is converted to a concentration by `ff`
and the density, rather than being used directly as a partial pressure.
Not breaking
============
- Exports are purely additive (`GarciaGordonOxygenSaturation`,
`CarbonDioxideAirConcentration`).
- `equilibrium_constants.jl` is purely additive (the `FF` struct).
- `CarbonChemistry` is unchanged.
- The deleted `regularize.jl` was never `include`d, so it was dead code.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FVXDvng4Sv12CyBvYxaHuX
Collaborator
Author
|
I'm going to merge after #399 then release both together |
Collaborator
Author
|
Moving to #411 to make just one breaking change |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR changes the water side computation to a use the aquious concentration ([$CO_2\text{(aq)}$ ]) rather than figacity ([ $fCO_2$ ]) for consistency with MARBL and the OCMIP protocol. The flux is now compared to MARBL computed values which is an improvement on the previous testing which just included the different parts.
This PR also introduces
GarciaGordonOxygenSaturationwhich goes in theair_concentrationslot for oxygen and computes the saturation directly from temperature and salinity as per MARBL etc.In the API the breaking changes are dropping$CO_2$ fluxes has also changed.
first_virial_coefficient,cross_virial_coefficient, andair_pressurefromCarbonDioxideConcentration, andsolubilityfrom the transfer velocity wrappers (they are now plain transfer velocities). The value of