This page is for you. The task-2 prompt carries its own instructions for the agent; the definitions here are for you to consult as you review its results.
Matched pairs
Everything starts from the matched pair: a forecast valuef and a reference value o for the same variable, the same location, and the same valid hour, at a stated lead. A pair exists only when both values are present; a null on either side removes the pair from the counts, and the counts are reported, not hidden. Comparing series with different missing patterns without tracking pair counts is how a statistic quietly changes its sample from one lead to the next.
The three error statistics
Over the n matched pairs of one model, variable, and lead:
- Mean error (bias):
ME = (1/n) Σ (f − o). Signed: warm and cold errors cancel. A near-zero ME with a large RMSE means large compensating errors. - Mean absolute error:
MAE = (1/n) Σ |f − o|. Typical error magnitude, robust to a few large misses. - Root-mean-square error:
RMSE = sqrt((1/n) Σ (f − o)²). Punishes large errors; always ≥ MAE, and the gap between them says how heavy the error tail is.
All three carry the units of the variable; report them with it.
Counts first — the aggregation rule
To aggregate across days, gridpoints, or files: pool the pairs: carry the counts and partial sums, and form the statistic once, at the end. Never average already-formed per-day or per-file statistics; that weights every subset equally no matter how many pairs it contains, and it silently changes the quantity being reported.
A worked miniature. Day one: 4 pairs, each with error 1.0. Day two: 1 pair, error 6.0.
- Counts first:
MAE = (4×1.0 + 1×6.0) / 5 = 2.0. - Average of daily MAEs:
(1.0 + 6.0) / 2 = 3.5.
Both numbers can be computed and printed; only the first is the MAE of the five pairs. The gap grows with imbalance; in a sibling project of the original episode it moved a skill score by roughly thirteen percent on real data. Ratio-based scores are even less forgiving: sum numerators and denominators separately, then divide once.
Wind direction is circular
Direction lives on a circle, and degrees are not a number line: the difference between 350° and 10° is 20°, not 340°. The signed error for a pair is f − o wrapped into the range −180° to 180° (350° against 10° gives −20°); ME, MAE, and RMSE then apply to that wrapped difference, and its magnitude is the angular errorΔ = min(|f − o|, 360 − |f − o|). Means of directions need vector averaging (average the sine and cosine components, then take the arctangent): the arithmetic mean of 350° and 10° is 180°, which points the opposite way.
A statistic computed linearly on direction values will run without complaint and return a number. Treat any direction statistic in your pipeline, or a plausible-looking direction correlation in a verification panel, as unverified until the circular handling has been demonstrated.
Justifying a tolerance
The exercise repeatedly asks for comparisons "within a tolerance you justify." Justified means you can say what the tolerance is made of:
- Two routes to the same statistic from the same floating-point inputs should agree to near machine precision: relative error around
1e-12or tighter for these sample sizes. A tolerance of0.1on such a comparison is a check that cannot fail. - A recomputation from rounded or stored intermediates inherits the rounding: the justified tolerance follows from the number of digits kept, and any excess disagreement beyond that is signal; this is precisely the precision-loss failure task 4 hunts.
- When a tolerance must absorb real variation (regridding, resampled time bases), write down which effect contributes what. "It passed with this value" describes a tolerance without justifying it.
The pattern to hold on to: a tolerance is part of the claim. Widening it to make a check pass is narrowing the claim; say so in the record when you do it.
What the statistics do not say
The reference is the ERA5 reanalysis, so every number here is an error relative to ERA5: a well-characterized standard, and still a model-data blend with error of its own. Ranking models by these statistics ranks their agreement with ERA5 at your location and window; over a single week it says little that is stable about the models in general. The exercise's subject is the trustworthiness of the pipeline, not a leaderboard of forecast systems.
Back to task 2, or thedata primer for where these numbers come from.