mescla.isotopes¶
Isotope tracers, and the one that breaks linear mixing.
There are two kinds of isotope tracer in hydrology and they behave differently.
Isotopes of the water molecule – \(\delta^{18}\mathrm{O}\) and
\(\delta^{2}\mathrm{H}\) – mix linearly and need nothing special. Water is the
solvent, so its “concentration” is the same in every end-member and the weights in
the mixing equation are just the mixing ratios. Pass them to
mixing_ratios() like any other tracer.
Isotope ratios of a solute – \(\delta^{13}\mathrm{C}\)-DIC, \(\delta^{34}\mathrm{S}\)-SO4, 87Sr/86Sr, \(\delta^{15}\mathrm{N}\)-NO3 – do not. They are ratios carried by an element whose concentration differs between end-members, so the mixture is a concentration-weighted average:
which is nonlinear in \(f\). Treating such a tracer as an ordinary concentration silently produces wrong mixing ratios, and the error is largest exactly where the tracer is most useful: when the end-members differ strongly in the carrier element.
The fix, and why it composes¶
The numerator is linear in \(f\) and so is the carrier concentration. So the product \(\delta \times C\) mixes linearly even though \(\delta\) does not:
linearize() replaces each solute-isotope column with that product. After it,
every estimator, diagnostic and plot in Mescla works unchanged – the fix is a
transform, not a special case threaded through the library.
delinearize() converts predictions back to delta units for reporting.
Functions
Candidate carrier elements for a solute isotope ratio, or |
|
Look for solute isotope ratios that have not been linearised. |
|
Convert \(\delta \times C\) back to \(\delta\). |
|
True for isotopes of the water molecule, which mix linearly. |
|
Replace solute isotope ratios by \(\delta \times C\), which mixes linearly. |
|
Forward model: the delta of a mixture, weighted by the carrier. |
|
Fraction of end-member 1 from a solute isotope ratio, two components. |