Skip to content

Validation

Where a published source states the result of a worked example, this page puts that result beside the one this site computes. Every number in the middle columns is asserted by an automated test that runs on every change to this site’s code, against the same modules the site loads, so the two columns cannot drift apart without the build going red. Where a comparison is weaker than it looks — a reference implementation rather than a paper, a value derived here rather than published, an input the source never stated — it is said so under the table rather than left for a reader to discover.

  • The second column is the value as the source prints it, at the precision the source prints it to.
  • The third column is what this site computes, rounded to that same precision. It is not a second measurement: where the test asserts agreement at three decimals, the two columns agreeing at three decimals is exactly the claim, and no more.
  • The last column is the bound the automated test enforces. It is the real strength of each claim, and it is stated even where it is embarrassing.
  • Under every comparison is the path of the test file that asserts it. Those files are in the repository, and a build in which one of them stops containing the assertion named here fails.

Mann-Kendall & Sen’s slope

Open the tool

Gilbert works four examples through the Mann-Kendall statistic and prints every intermediate — the sign count, the tie-corrected variance, the time-tie variance, the continuity correction, the exact small-sample tail, the median slope and the interpolated confidence limits — so all four are reproduced here, and between them they reach every branch of the implementation.

Table 16.2 and Table A18 — the four-point sequence

Source.
Gilbert, R.O. (1987). Statistical Methods for Environmental Pollution Monitoring. Van Nostrand Reinhold, New York — chapter 16, pages 208 to 222. Section 16.4.1 and Table 16.2, page 211; Table A18.
Method.
The book scores the sequence 10, 15, 14, 20 pair by pair in a printed table and then reads its probability off Table A18. Both are computed here from the same four numbers.
SequenceGilbert printsPlotlad, to the same precisionTest tolerance
10, 15, 14, 20 — the statisticS = 44exact
10, 15, 14, 20 — Table A180.1670.167±0.0005
18, 20, 23, 35 — the statisticS = 66exact
18, 20, 23, 35 — Table A180.0420.042±0.0005
Table A18 is one-sided — Gilbert calls it the probability of a value of S at least this large when no upward trend is present — and he doubles it for a two-sided test, which is the default in this tool. The exact values are 4/24 and 1/24; the book printed three decimals, so three are checked.
  • Four points is the smallest sequence the test is defined on and the probabilities are exact combinatorics rather than an approximation, so this case validates the sign count and the exact tail and nothing else. The normal approximation is reached only by the examples below it.

Asserted by src/tools/mann-kendall/__tests__/stats.test.ts

Example 16.2 — the tie-corrected variance and the continuity correction

Source.
Gilbert, R.O. (1987). Statistical Methods for Environmental Pollution Monitoring. Van Nostrand Reinhold, New York — chapter 16, pages 208 to 222. Example 16.2, pages 212 to 213.
Method.
Twenty-two monthly uranium-234 concentrations with one tied group of six and two of two. The book prints the variance term by term, its square root, and the corrected Z; all three are computed from the tie structure it states.
QuantityGilbert printsPlotlad, to the same precisionTest tolerance
Variance of S, by Eq. 16.31227.331227.33±0.005
Its square root35.035.0±0.05
Z, with the continuity correction3.13.1±0.05
The tie correction SUBTRACTS from the variance, so for a fixed S it makes Z larger rather than smaller. That is the opposite of the usual intuition and getting its sign wrong is invisible — the p-value stays plausible and stops matching anybody else’s — so the direction is asserted as well as the number.
  • The twenty-two concentrations themselves are not reproduced, because the book does not print them — the example works from a scatter plot, and reading values off a scanned figure would be pinning an act of eyesight rather than a published number. What is reproduced is the arithmetic the book prints: n, the tie groups, the variance, its root and Z.
  • Z is printed to two significant figures. The unrounded value here is 3.0545, so one decimal place is the honest comparison and the assertion says so.

Asserted by src/tools/mann-kendall/__tests__/stats.test.ts

Example 16.3 — ties in the data and in the time index at once

Source.
Gilbert, R.O. (1987). Statistical Methods for Environmental Pollution Monitoring. Van Nostrand Reinhold, New York — chapter 16, pages 208 to 222. Example 16.3, pages 214 to 215, and Equation 16.5.
Method.
Eight observations across five time periods, three of them sharing period 1 and two sharing period 3, with three tied values. The book states the score, the number of comparable pairs, both tie structures, the variance and Z.
QuantityGilbert printsPlotlad, to the same precisionTest tolerance
The statisticS = 1919exact
Pairs scored, out of 282424exact
Tied data groupsthree groups of 22, 2, 2exact
Tied time groupsone of 3 and one of 23, 2exact
Variance of S, by Eq. 16.558.158.1±0.05
Z2.42.4±0.05
Pairs inside one time period score zero, which is why 24 of the 28 possible pairs are scored. Equation 16.5 must also collapse to Equation 16.3 when nothing is tied in time, or every ordinary series in this product would be scored by the wrong formula; that identity is asserted separately.

Asserted by src/tools/mann-kendall/__tests__/stats.test.ts

Example 16.5 — Sen’s slope and its confidence limits

Source.
Gilbert, R.O. (1987). Statistical Methods for Environmental Pollution Monitoring. Van Nostrand Reinhold, New York — chapter 16, pages 208 to 222. Example 16.5, pages 218 to 219; Table A1.
Method.
The same eight observations. The book lists all 24 pairwise slopes, takes their median, and finds the 90 per cent limits by interpolating between ranked slopes rather than by rounding the ranks.
QuantityGilbert printsPlotlad, to the same precisionTest tolerance
Pairwise slopes computed2424exact
Median slope, per time period5.55.5±5e-11
Lower 90% confidence limit2.62.6±0.05
Upper 90% confidence limit9.39.3±0.05
The critical value read off Table A11.6451.645±0.0005
The interpolation is the part worth testing. Rounding the ranks instead gives 3.3 and 9.0, so matching the book to one decimal is only possible if both the rank arithmetic and the interpolation are right.

Asserted by src/tools/mann-kendall/__tests__/stats.test.ts

An independent worked S, from a document a regulator accepted

Source.
HydroGeoLogic, Inc. (2005). Mann-Kendall Analysis for the Fort Ord Site — Appendix D of the OU-1 Annual Groundwater Monitoring Report, prepared for the U.S. Army Corps of Engineers. Section 2.2.
Method.
The appendix works a fictitious monitoring well — 1.5, 2.0, 1.75 and 3.0 µg/L of TCE in four consecutive years — through the same arithmetic, and separately states how non-detects are grouped.
CaseThe appendix statesPlotlad, to the same precisionTest tolerance
S for 1.5, 2.0, 1.75, 3.044exact
Tie groups of {2, 3, ND, 3, ND, 3}one of 3 and one of 23, 2exact
The second row is the citation the tool’s default handling of censored values rests on: non-detects form a tied group with EACH OTHER, rather than being substituted with half the detection limit or dropped. Gilbert says the same thing in his own trace-value example, which is asserted alongside it.
  • This is a second independent statement of the same formulae rather than a second independent result — the sequence is the same shape as Gilbert’s, deliberately. Its value is that it is a document written for a regulator, which is the audience the tool is for.

Asserted by src/tools/mann-kendall/__tests__/stats.test.ts

The exact null distribution at n = 5

Source.
Kendall, M.G. (1975). Rank Correlation Methods, 4th edition, Charles Griffin, London — the tabulated tail probabilities of S, reproduced as Table A18 in Gilbert (1987) and in every rank-correlation table since.
Method.
The exact distribution is built by dynamic programming and its upper tail read at the three attainable values of S that the published table prints for five observations.
TailPublished probabilityPlotlad, to the same precisionTest tolerance
P[S ≥ 10] at n = 50.0080.008±0.0005
P[S ≥ 8] at n = 50.0420.042±0.0005
P[S ≥ 6] at n = 50.1170.117±0.0005
Two properties no single tabulated value pins down are asserted alongside these: that the distribution sums to one over every attainable S at every n the exact branch is used at, and that it is symmetric about zero.
  • The exact branch is used only on untied series of at most 22 observations. A tied dataset’s null distribution is not the permutation distribution of distinct values, and the 22 is chosen to match where ProUCL switches; above it, and whenever anything is tied, the normal approximation is used and the tool says which it used.

Asserted by src/tools/mann-kendall/__tests__/stats.test.ts

Correlation matrix

Open the tool

Two coefficients, three sources: a certified reference dataset that exists specifically to break naive least-squares arithmetic, the quartet everybody uses to show that a correlation is not a relationship, and a documented library output with a tie in it, which is what pins the rank convention.

Pearson against a NIST certified value

Source.
National Institute of Standards and Technology, Statistical Reference Datasets, linear regression, dataset "Norris" (Norris, J., NIST, calibration of ozone monitors), 36 observations. Certified R-Squared 0.999993745883712.
Method.
The 36 published pairs are transcribed into the test file and the Pearson coefficient computed on them; for a simple linear regression R² is exactly r², so the certified value is a certified correlation.
QuantityNIST certifiesPlotlad, to the same precisionTest tolerance
Observations3636exact
R-Squared0.9999937458837120.999993745883712±5e-13
NIST publishes this set because its values are large relative to their spread, which is the condition under which the one-pass computational shortcut for Pearson loses its significant figures. It is the only comparison on this page that would fail on that shortcut.

Asserted by src/tools/correlation-matrix/__tests__/reference.test.ts

Anscombe’s quartet

Source.
Anscombe, F.J. (1973). Graphs in Statistical Analysis. The American Statistician 27(1), 17–21 — four datasets sharing, to the precision printed, the same correlation of 0.816.
Method.
All four sets are transcribed and correlated independently; the published figure is three digits, so the assertion is that each set lands within a thousandth of it and that the four agree with each other far more closely than that.
DatasetAnscombe printsBound the test enforces
Set I0.816within 0.001 of it
Set II0.816within 0.001 of it
Set III0.816within 0.001 of it
Set IV0.816within 0.001 of it
All four together0.816 for eachspread under 0.0005
Two-sided on purpose. Four independently transcribed datasets landing on one published value is strong evidence that neither the arithmetic nor the transcription is wrong, and it is a stronger statement than any one of them alone.
  • Three digits is all Anscombe printed. The four sets compute to between 0.81624 and 0.81652, so set IV does not even round to 0.816 at three places, and an assertion at four decimals would be asserting digits the source does not have. The bound in the third column is therefore what is claimed, and the value in the second is what was published — they are not the same statement.
  • The rank correlations of the same four sets are asserted in the test file too, and are deliberately absent from this table: they are this implementation’s own output, not anything Anscombe printed, and a validation page is the wrong place for a number with no source behind it.

Asserted by src/tools/correlation-matrix/__tests__/reference.test.ts

Spearman with a tie, against a documented library output

Source.
SciPy reference documentation for `scipy.stats.spearmanr`, the worked example on that page: `spearmanr([1, 2, 3, 4, 5], [5, 6, 7, 8, 7])` returning a statistic of 0.8207826816681233.
Method.
The same five pairs are correlated here. The second series ties on 7, so this exercises the correction that the widely-taught rank shortcut omits, and the printed output is sixteen digits long — enough to pin the convention rather than merely be consistent with it.
CasePublished outputPlotlad, to the same precisionTest tolerance
spearmanr([1, 2, 3, 4, 5], [5, 6, 7, 8, 7])0.82078268166812330.8207826816681233±5e-16
The value is 8/√95, which is what the definition gives: the second series ranks as 1, 2, 3.5, 5, 3.5, and Pearson on those against 1 to 5 is 8 over the root of 10 times 9.5. Both forms are asserted.
  • This reproduces another implementation, not a paper. That is worth exactly what it sounds like: it establishes that this tool uses the same tie convention as SciPy and R, which is what somebody checking a result against either of them needs, and it establishes nothing about whether that convention is the right one for their data.

Asserted by src/tools/correlation-matrix/__tests__/reference.test.ts

A tied four-point case, worked by hand

Source.
No published source. The arithmetic is written out in full in the comment above the assertion in the test file named below, and is small enough to check by eye.
Method.
Four pairs, with a tie in the second series, chosen so that the taught shortcut and the definition give visibly different answers.
CaseValue derived by handPlotlad, to the same precisionTest tolerance
x = 1, 2, 3, 4 against y = 1, 2, 2, 30.9486830.948683±5e-16
The same case under the d² shortcut0.95not this valueasserted apart
The 1 − 6Σd²/(n³ − n) shortcut applied to the same midranks gives 0.95 — close enough to look right in a spreadsheet, and wrong in the fourth decimal, which is the digit a report prints. The test asserts the definition’s value AND that the result is not the shortcut’s.
  • Nothing here is published and the entry says so in its citation rather than in a footnote. It is included because a hand derivation a reader can follow is a different kind of evidence from a library output, and because it is the case that would catch a plausible-looking wrong implementation that the SciPy example alone would not.

Asserted by src/tools/correlation-matrix/__tests__/reference.test.ts

Cross-correlation

Open the tool

This is the weakest entry on the page and it is here for that reason. No published worked example prints BOTH its input series and its resulting coefficients at a length that fits in a test — the standard textbook examples print a figure and a few rounded numbers, not the several hundred data points behind them — so what is pinned instead is one published R output, closed-form values derived by hand from the estimator, and the sign convention.

R’s autocorrelation of 1 to 5

Source.
R Core Team, `stats` package documentation for `acf` and `ccf`, and the C routine `acf0` in src/library/stats/src/filter.c, which defines the estimator: each series is centred on its own mean, the products are divided by the pair count PLUS the lag, and the result is normalised and clipped into [−1, 1].
Method.
Cross-correlating the sequence 1, 2, 3, 4, 5 with itself makes the cross-correlation an autocorrelation, so the answer can be read against R’s printed output for `acf(1:5)`.
LagR printsPlotlad, to the same precisionTest tolerance
01.0001±5e-13
10.4000.4±5e-13
2−0.100-0.1±5e-13
3−0.400-0.4±5e-13
4−0.400-0.4±5e-13
The divisor is the pair count plus the lag, which is the series length at every lag. That is the reason a cross-correlation function shrinks towards zero at long lags instead of reporting 1 from a two-point overlap, and the whole derivation is written out in the test file.

Asserted by src/tools/cross-correlation/__tests__/compute.test.ts

An asymmetric impulse pair, in closed form

Source.
No published source. The estimator is R’s, cited above; these three values are derived from it by hand in the comment above the assertion, on series short enough that a reader can check them with a pencil.
Method.
Two four-point impulses, the first spiking one step before the second, which makes the function deliberately asymmetric — an implementation that had transposed the index would swap the two outer values and report that the ground warms before the air does.
LagDerived valuePlotlad, to the same precisionTest tolerance
−111/1211/12±5e-13
0−1/3-1/3±5e-13
+1−5/12-5/12±5e-13
x = 0, 1, 0, 0 against y = 0, 0, 1, 0. Both series have mean 0.25, so the arithmetic is a handful of sixteenths and the derivation fits in four lines.
  • A hand derivation is not a reproduction of a published result and this table does not pretend otherwise. It is a stronger test than a pasted coefficient would have been, because a pasted coefficient cannot tell you which part of the arithmetic is wrong, and it is a weaker CLAIM, because nobody else has checked it.

Asserted by src/tools/cross-correlation/__tests__/compute.test.ts

The direction convention

Source.
Shumway, R.H. & Stoffer, D.S. Time Series Analysis and Its Applications — the Southern Oscillation Index and Recruitment example, whose `ccf(soi, rec)` peaks near lag −6 and is read in the text as the index leading recruitment. · R Core Team, `stats` documentation for `acf`: "The lag k value returned by ccf(x, y) estimates the correlation between x[t+k] and y[t]."
Method.
A deterministic non-symmetric signal is shifted by a known number of steps and fed in both ways round, and the recovered lag is required to carry the sign the convention demands.
Injected relationshipThe convention requiresWhat the test asserts
y[t] = x[t − 3], so the first channel leadsa peak at lag −3the best lag is exactly -3, with r above 0.97
y[t] = x[t + 3], so the second channel leadsa peak at lag +3the best lag is exactly 3
This is a DIRECTIONAL claim rather than a numeric one and is tested as such. It is also the single thing in this tool most worth getting right: a sign error here does not produce an obviously broken figure, it produces a confident sentence pointing the wrong way.
  • The correlation at the recovered lag is bounded below at 0.97 rather than at 0.99, and that is the estimator working rather than noise: R’s divisor shrinks a lag-3 estimate by three parts in the series length even when the alignment is perfect.

Asserted by src/tools/cross-correlation/__tests__/compute.test.ts

ET₀ (FAO-56)

Open the tool

FAO-56 works its method through eighteen numbered examples, and the two that end in a reference evapotranspiration are reproduced here in full, term by term, together with the chapter-three examples that each intermediate quantity comes from. The intermediates are listed rather than only the two answers so that a disagreement localises: if the radiation chain is green and the assembled figure is red, the fault is in the assembly.

Example 18 — reference evapotranspiration at Uccle from a single day of data

Source.
Allen, R.G., Pereira, L.S., Raes, D. & Smith, M. (1998). Crop evapotranspiration — Guidelines for computing crop water requirements. FAO Irrigation and Drainage Paper 56, Food and Agriculture Organization of the United Nations, Rome. Chapter 4, Example 18 (Uccle, Brussels, 6 July).
Method.
The example states a maximum of 21.5 °C, a minimum of 12.3 °C, relative humidity of 84 and 63 per cent, 2.78 m s⁻¹ measured by a 10 m anemometer, 9.25 hours of bright sunshine, latitude 50°48′ N and an elevation of 100 m. Those inputs are fed in and every quantity the example prints on its way to the answer is compared with the printed value.
QuantityFAO-56 printsPlotlad, to the same precisionTest tolerance
Mean temperature16.9 °C16.9±0.05
Atmospheric pressure, P100.1 kPa100.1±0.05
Psychrometric constant, γ0.0666 kPa °C⁻¹0.0666±0.00005
Slope of the vapour pressure curve, Δ0.122 kPa °C⁻¹0.122±0.0005
Saturation vapour pressure, es1.997 kPa1.997±0.0005
Actual vapour pressure, ea1.409 kPa1.409±0.0005
Wind speed adjusted to 2 m, u₂2.078 m s⁻¹2.078±0.005
Extraterrestrial radiation, Ra41.09 MJ m⁻² day⁻¹41.09±0.05
Solar radiation, Rs22.07 MJ m⁻² day⁻¹22.07±0.05
Net longwave radiation, Rnl3.71 MJ m⁻² day⁻¹3.71±0.005
Net radiation, Rn13.28 MJ m⁻² day⁻¹13.28±0.05
Reference evapotranspiration, ET₀3.88 mm day⁻¹3.88±0.005
Every row is a value FAO-56 prints inside Example 18. The fourth column is the bound the automated test enforces, which for a value printed to three decimals is agreement at the third decimal.
  • The printed wind speed and the printed u₂ cannot both be exact. Equation 47 at 10 m is a factor of 0.747951, and 2.78 × 0.747951 is 2.0793, not the 2.078 the example prints; working backwards, 2.078 implies a measured 2.7783 m s⁻¹. It is the input the example rounded, not the output, and the test asserts both readings of it.
  • This is the only worked example in the paper that exercises what the daily tool actually does — one day, soil heat flux taken as zero, humidity from the two relative-humidity extremes, and a 10 m anemometer. It is therefore the strongest single row on this page and also the narrowest: one day, one site, one set of inputs.

Asserted by src/tools/et0/__tests__/fao56.test.ts

Example 17 — reference evapotranspiration at Bangkok from monthly means

Source.
Allen, R.G., Pereira, L.S., Raes, D. & Smith, M. (1998). Crop evapotranspiration — Guidelines for computing crop water requirements. FAO Irrigation and Drainage Paper 56, Food and Agriculture Organization of the United Nations, Rome. Chapter 4, Example 17 (Bangkok, April, from monthly mean data).
Method.
A hot humid tropical site, which is the opposite corner of the parameter space from Uccle: maximum 34.8 °C, minimum 25.6 °C, ea 2.85 kPa, wind 2.0 m s⁻¹, 8.5 hours of sunshine, latitude 13°44′ N, elevation 2 m. The same chain is run and compared with the printed intermediates.
QuantityFAO-56 printsPlotlad, to the same precisionTest tolerance
Mean temperature30.2 °C30.2±0.05
Saturation vapour pressure, es4.42 kPa4.42±0.005
Extraterrestrial radiation, Ra38.0638.06±0.005
Daylight hours, N12.31 h12.31±0.005
Solar radiation, Rs22.6522.65±0.005
Clear-sky radiation, Rso28.5428.54±0.005
Net shortwave radiation, Rns17.4417.44±0.005
Net longwave radiation, Rnl3.113.11±0.005
Net radiation, Rn14.3314.33±0.005
Reference evapotranspiration, ET₀5.72 mm day⁻¹5.72±0.005
Radiation in MJ m⁻² day⁻¹. The example carries more digits than the chapter-three examples do, so the assertions are tighter here.
  • The soil heat flux is supplied to the equation rather than computed. Monthly data means G is not zero — the example derives 0.14 MJ m⁻² day⁻¹ from the March and April means by Equation 44 — and the monthly soil-heat-flux equations are out of scope for a daily tool. What this example validates is the assembled radiation chain and Equation 6 itself, on a site nothing like the other one.
  • The psychrometric constant is checked against the pressure the paper PRINTED rather than the one the chain computes. At 2 m elevation Equation 7 gives 101.276 kPa and the example prints 101.3; Equation 8 on the printed value gives the printed 0.0674 and on the unrounded value misses a four-decimal assertion by a whisker. That is a rounding cascade in the paper rather than a defect in Equation 8, and the unrounded chain is separately asserted to be within a tenth of a per cent.

Asserted by src/tools/et0/__tests__/fao56.test.ts

The chapter-three examples each term comes from

Source.
Allen, R.G., Pereira, L.S., Raes, D. & Smith, M. (1998). Crop evapotranspiration — Guidelines for computing crop water requirements. FAO Irrigation and Drainage Paper 56, Food and Agriculture Organization of the United Nations, Rome. Chapter 3, Examples 2, 3, 5, 6, 8, 9, 10, 11, 12, 14, 15 and 16.
Method.
Each intermediate equation is exercised on its own, on the inputs the example states, and compared with the value that example prints — so that a fault in one term does not have to be found by bisecting a finished ET₀.
ExampleFAO-56 printsPlotlad, to the same precisionTest tolerance
2 — atmospheric pressure at 1800 m81.8 kPa81.8±0.05
2 — psychrometric constant there0.054 kPa °C⁻¹0.054±0.0005
3 — e° at 24.5 °C3.075 kPa3.075±0.0005
3 — mean saturation vapour pressure2.39 kPa2.39±0.005
5 — actual vapour pressure by Eq. 171.70 kPa1.70±0.005
6 — vapour pressure deficit0.91 kPa0.91±0.005
8 — extraterrestrial radiation, 3 Sept at 20° S32.232.2±0.05
9 — daylight hours there11.7 h11.7±0.05
10 — solar radiation from sunshine, Rio in May14.514.5±0.05
11 — net longwave radiation there3.53.5±0.05
12 — net radiation there7.67.6±0.05
14 — wind at 2 m from a 10 m anemometer2.4 m s⁻¹2.4±0.05
15 — solar radiation from the temperature range, Lyon22.322.3±0.05
16 — net radiation with no radiation data, Bangkok13.913.9±0.05
Radiation quantities are MJ m⁻² day⁻¹ unless the row says otherwise. Every value in the second column is printed inside the example named beside it.
  • Example 12 chains its solar radiation from Example 10 rather than taking the 14.5 the box prints. Feeding the printed value into Equation 38 gives 11.165, which the paper would have printed as 11.2, and it prints 11.1 — so it carried the unrounded 14.450 across. Pinning the test to the printed input would fail against a correct implementation of Equation 38.
  • Two behaviours the paper implies but works no example for are asserted separately and appear in no row above: the daylight-hour equation returning a full day rather than NaN above the Arctic circle in midsummer, and the clamp that stops a pyranometer reading above the modelled clear-sky value inflating the longwave loss.

Asserted by src/tools/et0/__tests__/fao56.test.ts

Growing degree days

Open the tool

Two methods with two different kinds of source behind them. The simple average has a government indicator that states its convention and prints one worked pair; the single-sine method has a university package that prints one worked day, and six trigonometric closed forms that are checked against numerical integration of the integral they claim to evaluate.

The simple-average convention, as the EPA indicator states it

Source.
United States Environmental Protection Agency (2024). Climate Change Indicators: Growing Degree Days — technical documentation, growing-degree-days_documentation.pdf.
Method.
The documentation states that the daily maximum and minimum are averaged, a base temperature is subtracted, and a negative value is taken as zero; and it gives one worked pair, a day averaging 70 °F above a 50 °F base being 20 growing degree days.
DayEPA convention givesPlotlad, to the same precisionTest tolerance
Averaging 70 °F, base 50 °F2020exact
A cold day averaging below the base00exact
30 to 60 °F, base 50 °F00exact
Temperatures in °F. The last row is not from the documentation — it is the distinction between this convention and the modified or "corn" method, which raises the minimum to the base before averaging instead of flooring the result.
  • The third row is the one worth reading twice. A 30 to 60 °F day is zero under the EPA convention, because the mean of 45 is below the base and the finished number is floored; it is 5 under the modified method, which raises the minimum to the base first. This tool implements the EPA convention and says so on the page. Neither is wrong — they are different definitions, and a season total computed under one cannot be compared with a season total computed under the other.

Asserted by src/tools/gdd/__tests__/methods.test.ts

The single-sine method against a printed worked day

Source.
Baskerville, G.L. & Emin, P. (1969). Rapid estimation of heat accumulation from maximum and minimum temperatures. Ecology 50(3), 514–517. · Zalom, F.G., Goodell, P.B., Wilson, L.T., Barnett, W.W. & Bentley, W.J. (1983). Degree Days: The Calculation and Use of Heat Units in Pest Management. University of California Division of Agriculture and Natural Resources Leaflet 21373 — the six-case table the closed forms are transcribed from. · University of California Agriculture and Natural Resources, `degday` R package README (github.com/UCANR-IGIS/degday) — the printed single-sine result reproduced below.
Method.
The package publishes the single-sine degree-days for the Esparto.A station on 2 January 2020: a minimum of 36 °F, a maximum of 67 °F, and Navel Orangeworm thresholds of 55 and 93.9 °F. The same four numbers are fed to the closed forms here.
CheckPublished valuePlotlad, to the same precisionTest tolerance
Degree-days for the day3.313.31equal at 2 decimals
Zalom case44exact
Temperatures and thresholds in °F. The day falls in Zalom’s case 4 — the sine curve is cut by the lower threshold only — and the case selection is asserted as well as the number, so a right answer reached through the wrong branch still fails.
CheckAgainstBound the test enforces
The six closed formsa midpoint-rule integration of the definition they evaluateworst departure under 1e-4
Continuity where one case meets the nextthe neighbouring case, with the input nudged across the boundaryagreement to 3 decimals
A day entirely inside both thresholdsthe simple-average method, which it must equal exactly thereagreement to 12 decimals
The structural check, which no comparison against another transcription of the same table could make. The closed forms claim to evaluate one integral over a day; this evaluates that integral numerically, over a grid of minima, maxima and threshold pairs that reaches all six cases, and requires them to agree.
  • The closed forms are a hand transcription of a printed table of six trigonometric cases, which is exactly the kind of thing that is wrong in one case and right in the other five. That is why the second table exists: agreement with one published day would not have caught a transcription error in a case that day does not reach.

Asserted by src/tools/gdd/__tests__/methods.test.ts

Chill hours & portions

Open the tool

There is no published worked example for winter chill — the literature publishes parameters, weighting tables and reference implementations rather than a season of hourly temperatures with an answer beside it. So what is reproduced here is the published parameter sets, and agreement to floating point with chillR, which is the R package the chill-portion figures in that literature were produced with.

The Utah weighting table

Source.
Richardson, E.A., Seeley, S.D. & Walker, D.R. (1974). A model for estimating the completion of rest for Redhaven and Elberta peach trees. HortScience 9(4), 331–332. · Luedeling, E. chillR: Statistical Methods for Phenology Analysis in Temperate Fruit Trees — R/temp_models.R, the `step_model` and `Utah_Model` functions, read verbatim.
Method.
The seven bands and their weights are asserted as a list, and then every band boundary is approached from both sides — because the bands are half-open in chillR’s own selection, and a prose transcription of the table always loses that.
Band, °CPublished weightPlotlad, to the same precisionTest tolerance
up to 1.400exact
1.4 to 2.40.50.5exact
2.4 to 9.111exact
9.1 to 12.40.50.5exact
12.4 to 15.900exact
15.9 to 18.0-0.5-0.5exact
above 18.0-1-1exact
Bands are (lower, upper] in °C: an hour at exactly 1.4 °C scores 0, and an hour at 1.5 °C scores 0.5. The bottom and top bands are extended past chillR’s ±1000 °C limits so a corrupt reading scores zero instead of producing an empty result.
  • The table is checked against chillR’s transcription of it rather than against the 1974 paper directly. chillR is the de-facto reference in this literature and its source is quoted in the test file, but it is a second-hand source and this row is weaker than a row checked against a paper.

Asserted by src/tools/chill-hours/__tests__/models.test.ts

The Dynamic model parameter set as published

Source.
Luedeling, E. & Brown, P.H. (2011). A global analysis of the comparability of winter chill models for fruit and nut trees. International Journal of Biometeorology 55, 411–421 — the printed parameter set. · Fishman, S., Erez, A. & Couvillon, G.A. (1987). The temperature dependence of dormancy breaking in plants: computer simulation of processes studied under controlled temperatures. Journal of Theoretical Biology 126, 309–321.
Method.
Luedeling & Brown print the six parameters as a sentence; each is asserted as an exact equality, because a parameter that has drifted produces a curve that still looks like a chill curve.
ParameterPublished valuePlotlad, to the same precisionTest tolerance
slp1.61.6exact
tetmlt277277exact
a0139500139500exact
a12.567e182.567e18exact
e04153.54153.5exact
e112888.812888.8exact
Kelvin offset (from chillR, not the paper)273273exact
The paper prints a1 as 2.567 × 10¹⁸. The Kelvin offset is not from the paper: chillR and ChillModels both add 273 rather than 273.15, and the published chill-portion figures in this literature were produced that way, so 273 is what is used and the choice is asserted rather than left implicit.

Asserted by src/tools/chill-hours/__tests__/models.test.ts

Agreement with chillR’s reference implementations

Source.
Luedeling, E. chillR: Statistical Methods for Phenology Analysis in Temperate Fruit Trees — R/temp_models.R. The `Chilling_Hours`, `step_model` and `Dynamic_Model` functions are transcribed into the test file in their original indexing and run alongside this implementation.
Method.
Three reference functions are re-implemented from chillR’s own R, in its indexing rather than paraphrased into something that agrees by construction, and run against this implementation on deterministic pseudo-random temperature series.
chillR functionWhat is comparedBound the test enforces
Chilling_Hours4000 temperatures spanning −15 to 35 °Cidentical, hour by hour
step_model (Utah)6000 temperatures spanning −30 to 40 °Cidentical, hour by hour
Dynamic_Model, with the lag undone1500 hours, compared portion by portionevery hour within 1e-12
Dynamic_Model, with the lag left ina 2880-hour season totalunder 0.06 chill portions apart
chillR evaluates each Dynamic-model step with the PREVIOUS hour’s temperature. That one-hour index lag is undone before the comparison, which turns an approximate agreement into an identity; the last row is what the lag is worth if it is left in.
  • This is agreement with a reference implementation, not reproduction of a printed result. It is strong evidence that the model here is the model that literature runs, and it is no evidence at all that either of them describes a real orchard.
  • The chilling-hours window is 0 to 7.2 °C, and 7.2 is the ROUNDED metric form of 45 °F, which is 7.2222 °C. The rounded value is what every published implementation uses, so it is what this uses — and the hours between the two are why a grower checking against a Fahrenheit calculator finds a small discrepancy. Both numbers are asserted.

Asserted by src/tools/chill-hours/__tests__/models.test.ts

VPD calculator

Open the tool

Vapour pressure deficit is a subtraction; everything that can be got wrong is in the saturation vapour pressure underneath it. So what is reproduced here is FAO-56 Equation 11 at every temperature Chapter 3 prints a value for, and the size of the gap between that equation and the other one this field uses.

Equation 11 at the temperatures FAO-56 prints

Source.
Allen, R.G., Pereira, L.S., Raes, D. & Smith, M. (1998). Crop evapotranspiration — Guidelines for computing crop water requirements. FAO Irrigation and Drainage Paper 56, Rome. Chapter 3, Equation 11 and the worked Examples 3, 4 and 5.
Method.
Each temperature the chapter prints a saturation vapour pressure for is fed to the equation and the result rounded to the number of decimals the paper printed — not to more, because a constant recalled to more digits than its source printed is not a reference value.
InputFAO-56 printsPlotlad, to the same precisionTest tolerance
e° at 24.5 °C — Example 33.0753.075equal at 3 decimals
e° at 15.0 °C — Example 31.7051.705equal at 3 decimals
e° at 19.75 °C — Example 3’s counter-illustration2.32.3equal at 2 decimals
e° at 19.5 °C — Example 42.2672.267equal at 3 decimals
e° at 18.0 °C — Example 52.0642.064equal at 3 decimals
e° at 25.0 °C — Example 53.1683.168equal at 3 decimals
Mean saturation vapour pressure, Example 32.392.39equal at 2 decimals
Saturation vapour pressure in kPa, air temperature in °C.
  • The third row is the example’s own warning made executable rather than an extra check. Taking e° at the mean temperature gives 2.3 kPa where the mean of the two extremes gives 2.39, an underestimate of about four per cent that goes straight into the deficit. The tool takes the mean of the two extremes when it has both.

Asserted by src/tools/vpd/__tests__/compute.test.ts

The size of the gap to Buck (1981)

Source.
Buck, A.L. (1981). New equations for computing vapor pressure and enhancement factor. Journal of Applied Meteorology 20(12), 1527–1532. · Allen, R.G., Pereira, L.S., Raes, D. & Smith, M. (1998). Crop evapotranspiration — Guidelines for computing crop water requirements. FAO Irrigation and Drainage Paper 56, Rome. Chapter 3, Equation 11 and the worked Examples 3, 4 and 5.
Method.
Both equations are evaluated across the range any user of this tool will see and the worst relative difference between them is measured, so that the choice of one over the other can be argued about with a number rather than an adjective.
RangeWhat is comparedBound the test enforces
0 to 40 °C, in half-degree stepsFAO-56 Equation 11 against Buck (1981)worst relative difference under 0.002
The choice of Equation 11 is defended on consistency with the ET₀ tool and traceability to printed tables, not on accuracy. This is what it costs.
  • Outside 0 to 40 °C nothing is claimed. Below freezing the two equations diverge because Buck publishes a separate form over ice and Equation 11 does not, and a greenhouse tool had no reason to go there.

Asserted by src/tools/vpd/__tests__/compute.test.ts

Dew point

Open the tool

The dew point here is Equation 11 inverted exactly, so the same six printed vapour pressures validate it from the other side: air at the pressure the paper prints for a temperature must come back as that temperature. The two documented alternatives — the paper’s own rounded inverse and Buck (1981) — are measured against rather than argued with.

Inverting Equation 11 at FAO-56’s printed pressures

Source.
Allen, R.G., Pereira, L.S., Raes, D. & Smith, M. (1998). Crop evapotranspiration — Guidelines for computing crop water requirements. FAO Irrigation and Drainage Paper 56, Rome. Chapter 3, Equation 11 and the worked Examples 3, 4 and 5.
Method.
Every saturation vapour pressure the chapter prints is fed to the inverse, and the temperature it came from is required back, rounded to two decimals.
Air at this vapour pressureHas this dew pointPlotlad, to the same precisionTest tolerance
1.70515.015.0equal at 2 decimals
2.06418.018.0equal at 2 decimals
2.26719.519.5equal at 2 decimals
3.07524.524.5equal at 2 decimals
3.16825.025.0equal at 2 decimals
Vapour pressure in kPa, dew point in °C.
  • This is a reproduction of the paper’s printed table read backwards, not of a printed dew point: FAO-56 works no example whose answer is a dew point. The claim it supports is that the inverse is the inverse, which is what a reader comparing this page against the site’s own saturation vapour pressures needs it to be.

Asserted by src/tools/dew-point/__tests__/compute.test.ts

The two documented alternatives, measured

Source.
Allen, R.G., Pereira, L.S., Raes, D. & Smith, M. (1998). Crop evapotranspiration — Guidelines for computing crop water requirements. FAO Irrigation and Drainage Paper 56, Rome. Chapter 3, Equation 11 and the worked Examples 3, 4 and 5. Annex 3, Equation 3-11 — the same inverse printed with its two derived constants rounded to two decimals. · Buck, A.L. (1981). New equations for computing vapor pressure and enhancement factor. Journal of Applied Meteorology 20(12), 1527–1532.
Method.
The exact inverse is evaluated against the paper’s printed approximation and against Buck across the terrestrial range, and the worst departure of each is measured.
ComparisonRangeBound the test enforces
Against FAO-56 Annex 3 Eq. 3-11 as printed0.1 to 7 kPaworst departure under 0.02 °C
Against Buck (1981)0 to 40 °Cworst relative difference under 0.002
Round trip through the equation and back−30 to 45 °Creturns the input to 9 decimals
The exact form was chosen so that this site’s dew point and this site’s saturation vapour pressure cannot contradict each other — nobody should be able to find a dew point of 17.994 °C sitting under the site’s own e° for 18 °C. That is a round-trip argument, not an accuracy argument, and these are the numbers behind it.

Asserted by src/tools/dew-point/__tests__/compute.test.ts

What this page does not say

Agreement with a worked example is evidence that the equations were transcribed and wired up correctly. It is not evidence that they are the right equations for your site, that the inputs you give them are defensible, or that the answer means what you would like it to mean. Everything here is a calculation aid and none of it is a substitute for professional judgement.

Tools that do not appear on this page have no published worked example behind them. They are tested, and by the same suite — but internal consistency is a different claim from reproducing a paper, and this page only makes the second one.

Nothing here is endorsed, certified or reviewed by any of the organisations cited. The citations say where a number came from; they do not say that anybody has checked what was done with it.