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}\)-NO3do not. They are ratios carried by an element whose concentration differs between end-members, so the mixture is a concentration-weighted average:

\[\delta_{mix} = \frac{\sum_e f_e\, C_e\, \delta_e}{\sum_e f_e\, C_e}\]

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:

\[(\delta C)_{mix} = \sum_e f_e (\delta C)_e\]

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

carrier_for

Candidate carrier elements for a solute isotope ratio, or None.

check_isotopes

Look for solute isotope ratios that have not been linearised.

delinearize

Convert \(\delta \times C\) back to \(\delta\).

is_water_isotope

True for isotopes of the water molecule, which mix linearly.

linearize

Replace solute isotope ratios by \(\delta \times C\), which mixes linearly.

mix_isotope

Forward model: the delta of a mixture, weighted by the carrier.

two_component_isotope

Fraction of end-member 1 from a solute isotope ratio, two components.