TEXAS · how one GDGT measurement becomes a sea-surface temperature

From GDGTs to sea temperature

A sediment sample gives us one number from its GDGT lipids, the Scaled Ring Index (Scaled RI): how many rings the archaea built into their membranes. TEXAS turns it into sea-surface temperature by asking a simple question, which temperatures could have produced this ring index, and how likely is each? The answer is not one number but a range of temperatures with their odds. This page builds that range step by step, for a sample from the published case studies or for values you set yourself, and shows how the computer does it.

The steps run in four parts: what the calibration says (1–2); from one measurement to a range of temperatures (3–5); how the computer finds that range (6–9); and where the proxy runs out of range and what a shortcut leaves out (10–12). Each equation is folded away under "the maths"; open it if you want it. The technical names for every idea are listed at the end. Everything runs in your browser, so nothing is sent anywhere and nothing needs installing.

Contents ↑
Part 1What the calibration says
1

Ring index rises with temperature, along an S-curve

Marine archaea add more rings to their GDGT membrane lipids in warmer water. That is the idea behind TEX₈₆ too. TEXAS uses the Scaled Ring Index, and learns how it depends on temperature in two layers: culture and mesocosm experiments set the shape of the response, and coretops, modern seafloor sediment under a known ocean, refine it.

Plotted against sea temperature, the ring index follows an S-curve. Between its two ends it is steep, so a small change in ring index means a clear change in temperature. At the cold end and the warm end it flattens: very different temperatures give almost the same ring index. Keep that in mind, because it is why cold and very warm samples come out uncertain later on. The slope changes all the way along the curve, so there is no single "degrees per unit of ring index" to quote.

Two other measured things slide the curve sideways: the GDGT-2/GDGT-3 ratio (which tracks the mix of shallow and deep archaeal ecotypes) and, at low concentrations, nitrate. They do not change its shape, only where along the temperature axis it sits. This is the T₀-shift parameterization, and because the shift happens inside the curve, the predicted ring index always stays between the curve's floor and 1.

The maths
RI(T) = b + (1 − b) ÷ [ 1 + e−k·(T − T0′) ]1/ν b is the floor the curve never drops below. T₀ is the curve's location parameter: it sets where the curve sits on the temperature axis. k sets how steep it is. ν tilts the S so the two ends need not be mirror images. This is a generalized logistic (Richards) curve. T₀ is not the steepest point unless ν = 1: the steepest response is at T₀′ − ln(ν)/k, several degrees below T₀′.
T0′ = T0 + γG23 × (GDGT-2/3) + γNO₃ × log10(NO₃) The nitrate term counts only when NO₃ is below μmol/L. Above that it is zero, which is why setting NO₃ to 10 switches the correction off.
60 of the calibration curvesmedian curvethis sample's measured RI
2

Not one curve, but many

The coretop data scatter, so they do not pin down one exact S-curve. Many slightly different curves fit them about equally well. TEXAS keeps a large collection of those plausible curves instead of picking one, and a reconstruction uses of them (the faint lines in the figure above show some). Where they fan apart, the calibration itself is uncertain.

Even the best curve does not go through every coretop: real samples sit above and below it, because of seasonality, the depth the archaea live at, bioturbation and local ecology. That typical scatter around a curve is called σ. So there are two kinds of uncertainty, and both end up in a sample's error bars: which curve is right (the fan of curves) and how far a single sample can stray from its curve (σ).

Part 2From one measurement to a range of temperatures
3

Test one guessed temperature against one curve

Now turn the question around. We measured a ring index in an old sample and want the temperature. So guess one: if the sea had been 15 °C, what ring index would this curve predict? Compare that with what was measured. If the prediction lands close to the measurement, 15 °C is a plausible answer; if it misses by a lot, it is not.

"Close" is judged against σ, the scatter of real coretops. A miss of one σ is ordinary, a miss of three σ is rare. Each guess gets a score that is highest for a perfect match and falls off smoothly as the miss grows. Statisticians call this score the likelihood of that temperature. Move the slider to try different guesses.

The maths
score = (1/σ) × exp[ −½ × (miss ÷ σ)2 ] Dividing the miss by σ asks how many scatter-widths off the guess is. Squaring makes big misses count far more than small ones, and the exponential turns the result into a bell-shaped score that peaks at a perfect match. The leading 1/σ lets tightly-fitted curves count more than loose ones.
Left: one calibration draw (the one closest to the median curve), the candidate temperature, and the miss. The shaded bands are that draw's own scatter, ±1σ and ±2σ around the curve. The dark segment on the measured-RI line marks the temperatures where the measurement sits inside ±2σ. Right: sweeping the candidate across every temperature traces that curve's score. The bell is tall exactly over that same window and falls away outside it, so its width is set by σ. It carries no calibration uncertainty yet: that is the spread between the curves, added in step 4.
4

Let every curve vote

Step 3 used one curve. But we do not know which of the curves is right, so score the same guessed temperature against every curve and take the average. Each curve puts its peak at a slightly different temperature; averaging them gives one combined score curve, L(T), that is wider wherever the calibration curves disagree. This is how uncertainty in the calibration itself reaches a sample's error bars.

Look at the cold or warm end of the S-curve: there the curves fan apart and flatten, so their scores spread over a wide range of temperatures, and the average is broad. In the steep part they agree, and the average is narrow.

The maths
L(T) = (1 / ) × Σcurves scorem(T) Averaging over the curves is called marginalization: the calibration uncertainty is "integrated out". L(T) is the marginal likelihood.
score from 40 individual curvesaverage over all curves, L(T)
5

Add a broad starting expectation, the prior

You also tell TEXAS what temperature you would expect before looking at the proxy: a mean μT and a standard deviation σT, in °C. This is the prior. It is an expectation the reconstruction starts from, not a constraint on the answer, and a deliberately wide one is the right choice when little is known about the site. The examples here use the priors from the published case studies: 20 °C for the glacial–interglacial sites, 5 °C for Prydz Bay and 40 °C for the mid-Cretaceous, all with σT = 10 °C. Choose "Set your own values" to change them and watch what moves.

Where the ring index is informative, on the steep part of the curve, the measurement decides the answer and the prior hardly matters. Where the measurement says little, at the flat cold and warm ends, the score curve from step 4 is broad and the prior has real influence. That is a warning sign rather than a feature, and step 11 shows how TEXAS reports it. Multiplying the score curve by the prior gives the posterior: the final odds of every temperature for this sample.

A prior is not optional here. Because the curve levels off at both ends, the score from step 4 never falls to zero as temperature runs to very cold or very warm values. Without a prior those plateaus go on forever and there is no well-defined median at all.

The maths
prior(T) = exp[ −½ × ((T − μT) ÷ σT)2 ]posterior(T) ∝ L(T) × prior(T) ∝ means "proportional to". The height only matters relative to itself, so it is scaled later.
likelihood L(T)priorposterior
Part 3How the computer finds that range
6

Steps 3–5, written as a program for Stan

Steps 3–5 are the whole recipe: score a guessed temperature against every curve, average, multiply by the prior. TEXAS hands that recipe to Stan, a widely used program for this kind of statistics. You write down how plausible any answer is, and Stan works out the range of answers for you. Below is the actual program TEXAS runs (); the colored lines are steps 3, 4 and 5.

You do not need to read it all. The useful points: the program is given the measured ring index, the prior's mean and the calibration curves, all fixed. It has one unknown per sample, that sample's temperature (t_est), and nothing else. Every sample in a core is worked out on its own, so a 200-sample record is 200 separate small problems run side by side.

With one unknown you could simply try every temperature, and this page does exactly that to draw its curves. Stan is used because the same tool and the same diagnostics carry over to the forward calibration, which has too many unknowns for that.


      
Marked lines: step 3 one curve's score, step 4 the average over the draws, step 5 the prior. Everything else is bookkeeping (the shift of T₀ from GDGT-2/3 and NO₃ is the second equation of step 1).
7

How Stan explores: a ball rolling in a valley

Stan does not try every temperature. Instead it builds a long list of temperatures for the sample, choosing each one so that plausible temperatures appear often and implausible ones rarely. Draw a histogram of the list and you get the shape of the answer from step 5. The 16th and 84th percentiles of the list are the error bars a paper would quote.

To build the list, picture the posterior from step 5 turned upside down: a valley, deepest at the most likely temperature, with walls rising toward temperatures the ring index rules out. For a sample on the steep part of the curve the valley is narrow and steep. For a cold sample where the S-curve has flattened, it is wide with a flat floor.

Stan puts a ball in the valley, gives it a random kick, and lets it roll for a while without friction. Where it ends up is the next temperature on the list. Then a new random kick, and so on. Rolling downhill makes the ball spend more time near the valley floor; the kicks let it climb the walls now and then. Over thousands of kicks, the ball visits each temperature in proportion to how plausible it is.

The computer cannot roll the ball smoothly; it moves it in small time steps. Small steps follow the valley faithfully. Steps that are too large overshoot the walls and the simulated ball flies off: Stan calls that a divergence and prints a warning, because the list can then no longer be trusted. Try it below on your sample: raise the step size until the path breaks away.

The maths
U(T) = −log posterior(T) H = U(T) + ½ p² / mleapfrog: p ← p − ½ε ∂U/∂T; T ← T + ε p/m; p ← p − ½ε ∂U/∂T The ball's height is the potential energy U, its kick the momentum p. The leapfrog steps simulate the motion with step size ε. If the simulation were exact, the total energy H would stay constant and every end point would be accepted; the small error it makes sets the acceptance probability, min(1, e−ΔH). m, the "mass" (Stan's metric), is learned during warm-up from the spread of the draws, so one step size suits the valley's width. This is Hamiltonian Monte Carlo (HMC), a Markov chain Monte Carlo method.
step size εsteps L
the valley (low = plausible temperature)this roll of the balltemperatures already on the list
Left: the valley for your sample and the ball's path, one dot per time step. Right: the same roll drawn as temperature against the ball's speed. With small steps the path closes into a tidy loop (the ball's energy is conserved, as it should be); with large steps it spirals outward, which is a divergence. "Step size" sets how big each time step is; "steps" sets how long the ball rolls.
8

Four independent runs, and how we know they worked

Stan sets the step size and the rolling time for you. It rolls the ball until it starts to turn back on itself, which is where the name No-U-Turn Sampler (NUTS) comes from. The first stretch of each run is warm-up: Stan uses it to tune its step size to the valley, and throws those temperatures away, like discarding the first injections while an instrument stabilizes.

By default TEXAS runs separate chains, four balls started from different random temperatures, each with warm-up and kept steps: temperatures per sample. Below, that run happens live in your browser, on your sample, using a small NUTS written for this page rather than Stan itself. Three numbers say whether to trust it:

  • R̂ ("R-hat") compares the four chains, like replicate analyses of one sample. Near 1.00 means they agree; Stan warns above 1.01.
  • Effective sample size (ESS): neighboring temperatures on the list are not independent (the ball moves continuously), much as closely spaced samples in a core are not independent records. ESS says how many truly independent temperatures the list is worth.
  • Monte Carlo error (MCSE): because the answer comes from a finite list, each percentile carries a little sampling noise. This is its size: about a tenth of a degree for the median on the steep part of the curve, and more in the tails and at the flat ends.
warm-up (thrown away)the list of temperatures (histogram)warm-up draws (outline, thrown away)the posterior from step 5
9

Reading a temperature off the answer

To read temperatures off a posterior, add it up from cold to warm, scaled so the total is 100%. The temperature where this running total passes 50% is the reported temperature (p50, the median). Where it passes 16% and 84% are the edges of the 68% range, the error bar the manuscript reports; 5% and 95% give the 90% range. Stan's percentiles, read from its list, land on the same marks.

The curve below is the running total of the posterior this page computes directly, at every 0.05 °C. The diamonds are what the real package returned for the same sample with its default settings, so you can see the two agree.

The maths
p50: running total = 50%68% range: 16% → 84%90% range: 5% → 95% The running total is the cumulative distribution function (CDF); the ranges are credible intervals.
this page: running totalTEXAS, the same percentiles
Part 4When the proxy runs out of range, and shortcuts
10

Past the edges, the odds say more than the median

The S-curve flattens at both ends. In very cold water the archaea's membranes already hold about as few rings as they can, and in very warm water about as many, so a further change in temperature barely changes the ring index. The manuscript puts numbers on where (Fig. 7d): an analytical uncertainty of ±0.03 Scaled RI, the interlaboratory reproducibility of TEX₈₆, turns into more than ±5 °C of temperature uncertainty below  °C and above  °C. Outside that window a sample's p50 can move a long way without meaning much.

A question the proxy can still answer is: how likely is it that this sample was colder than  °C (or warmer than  °C)? That is the share of the posterior lying past the edge, read straight off step 9's running total. Statisticians call it an exceedance probability. A sample may not pin down whether the water was 2 or 5 °C, but it can still say "95% likely colder than  °C".

The maths
P(T < °C) = running total at °CP(T > °C) = 1 − running total at °C Both come straight from step 9, and they stay meaningful exactly where p50 does not. Saving a reconstruction with save_results=True, save_draws=True lets you compute the same share from its own draws.
Tail
posterior past the edgeposterior

11

What TEXAS flags for this sample

A sampler can converge cleanly on an answer the data do not support. The clearest case is a Scaled RI below the curve's floor b: no temperature can reproduce it, the score keeps improving as the temperature falls, and only the prior stops the slide. R̂ stays clean and nothing errors. So predict_T_from_proxyObs() attaches one row of quality flags to every sample. The table below applies the same rules to your sample; try a Scaled RI of 0.20 under "Set your own values".

The last row is the one to read for prior influence: how much of the prior's variance the proxy resolved. Near 100% the measurement decided the answer. Near 0% you are mostly reading back what you put in as μT. It does not replace the floor check: below the floor the score still slopes toward the cold, which narrows the posterior, so this number can look healthy for a temperature that means nothing.

The maths
width ratio = ½ (p84 − p16) ÷ σTresolved = 1 − (width ratio)² posterior_prior_width_ratio is the package's column. prior_dominated fires at a ratio of or more, which is about % resolved or less. The manuscript's Resolved column uses the same idea, averaged over a whole record.
12

The quick formula, and what it leaves out

Many TEX86 calibrations are used the quick way: take one fitted calibration line, and solve it for temperature with algebra. One ring index in, one temperature out. This page calls that the plug-in estimate (statisticians: inverse calibration). For TEXAS it means taking the middle value of each calibration setting across the curves, treating the single curve they define as the truth, and solving it. It skips steps 2–5: no spread of curves, no scores, no prior, and no error bar.

Solving the S-curve for T means peeling it apart one layer at a time: take away the floor and rescale, undo the power, take away the 1, undo the exponential with a log, then divide by the steepness and add the location back.

The maths
T = T0′ − ln[ ((1 − b) ÷ (RI − b))ν − 1 ] ÷ kT0′ = T0 + γG23·(GDGT-2/3) + γNO₃·log10(NO₃) Every setting is the median over draws. There is no answer when RI is at or below the median floor b (): nothing on that one curve reaches so low. Because the T₀-shift form slides the curve instead of lifting it, GDGT-2/3 and NO₃ enter only through T₀′, and the RI part of the formula never changes.
posteriorplug-in answer (one number, no range)

On the steep part of the S-curve the quick formula and the full answer agree closely. Toward the flat ends they drift apart. To see which ingredient is responsible, add them back one at a time. Per-curve solves each of the curves separately and takes the middle answer: this puts back the calibration's uncertainty. Full is the posterior median, which also puts back the scatter of real samples around the curve (σ) and the prior. Those two cannot be separated here, for the reason step 5 gives. The table and chart recompute for the GDGT-2/3, NO₃ and prior of the sample you picked.

·

The same ideas, in the words papers use

This page uses everyday words so the method reads easily. Here is what each is called in the statistics and paleoclimate literature, for when you write it up or read a methods section.

On this pageUsual termWhat it means here
S-curveGeneralized logistic (Richards) curveThe calibration: mean Scaled RI as a function of temperature.
the many curves, calibration drawsPosterior draws (posterior samples)Equally plausible calibration parameter sets from the forward fit.
σ, the scatterResidual (process) noise, σcrtpScatter of real samples around one curve.
the score of one curveLikelihoodHow probable the measured RI is at a candidate temperature, for one curve.
averaging the scores over curvesMarginal likelihood; marginalization (Monte Carlo integration)Calibration uncertainty integrated out by averaging over posterior draws.
the prior "pulls harder"Shrinkage toward the priorWhere the likelihood is broad, the posterior sits closer to μT.
running totalCumulative distribution function (CDF)Percentiles are where it crosses 5, 16, 50, 84 and 95%.
p16–p84, p5–p9568% and 90% credible intervalsBayesian uncertainty ranges read off the CDF.
tail probabilityExceedance probabilityP(T < °C) or P(T > °C).
Stan's samplerMarkov chain Monte Carlo (MCMC); No-U-Turn Sampler (NUTS), an adaptive Hamiltonian Monte CarloDraws samples from the posterior.
valley, kick, rollPotential energy, momentum, Hamiltonian dynamicsU(T) = −log posterior; a momentum drawn from a normal; motion simulated by the leapfrog integrator.
ε, the step; m, the massStep size; (inverse) metric, or mass matrixBoth tuned during warm-up: ε by dual averaging to a target acceptance rate, m from the variance of the draws.
divergenceDivergent transitionThe simulated energy blew up: the sampler could not follow the posterior there.
R̂, ESS, MCSEPotential scale reduction factor; effective sample size; Monte Carlo standard errorChains agree; how many independent draws the chain is worth; the sampling noise on an estimate.
plug-inPlug-in point estimate; classical inverse-calibration estimatorSolve one fitted curve, at the posterior medians, for temperature. No uncertainty.
per-curvePoint inversion per posterior drawThe plug-in, repeated for every draw.
sliding the curveT₀-shift parameterization (a location shift)GDGT-2/3 and NO₃ move the curve's location along the temperature axis.
·

Symbols in one place

RI
Scaled RI₀₋₃, the measured proxy value.
T
Candidate sea-surface temperature, °C.
b, k, T₀, ν
One calibration curve: floor, steepness, location and tilt.
γG23, γNO₃
How far GDGT-2/3 and log₁₀(NO₃) slide T₀, in °C per unit.
σ
Scatter of real samples around one curve.
L(T)
Likelihood: the score averaged over all calibration draws.
μT, σT
Prior mean and standard deviation of temperature, chosen by you (prior_mu_t, prior_sigma_t).
p5 … p95
Temperatures where the running posterior total crosses 5% … 95%.
P(T < x)
The running total at x: the probability the temperature is colder than x.