ds-raster-stats · exactextract coverage fractions (PR #49) vs the legacy upsample-and-rasterize values already in the prod database · all four datasets, 8 countries, ~16,900 matched rows · 2026-08-27
The difference between the two methods is a property of geometry alone: how a country's admin polygons sit against a dataset's pixel grid. For every country, at the deepest admin level the pipeline actually computes for it, this compares the two weight vectors each method places on native pixels — exact coverage fractions versus the legacy rule's centroid-counted 0.05° cells — and takes their total variation distance: the share of averaging weight that lands on different pixels. No raster values are involved. Scroll to zoom, drag to pan. Every one of the 7,165 admin units the pipeline computes is drawn separately — each country at its own deepest level, 5,223 at ADM2 and 1,942 at ADM1 — so the admin level itself is visible, along with the variation inside each country.
| P-code | Country | Level | SEAS5 | ERA5 | IMERG | FloodScan |
|---|
How to read it. A value of 0.05 means 5% of the averaging weight moves to different pixels. What that costs in the output depends on how rough the field is: multiply by roughly 0.15 for the smooth products (SEAS5 ensemble means, ERA5 monthly) and roughly 1.0 for the rough daily ones (IMERG precipitation, FloodScan flood extent). Those factors come from regressing this geometric measure against the differences actually measured on 8 countries, where it ranks countries correctly — Spearman +0.83 for SEAS5, +0.74 IMERG, +0.80 FloodScan. So the map says where, and the multiplier says how much.
FloodScan sits on a different scale, and that is the point. Its native resolution is 300 arc-seconds (0.0833°), so the legacy upsample factor to 0.05° is 1.667 — not a whole number. The upsampled cells therefore never nest inside native pixels for any polygon, anywhere, so every unit carries an irreducible ~20% disagreement no matter how large or well-behaved it is: its whole range is 19.7% to 83%, against a median of 20.8%. The other three datasets divide into 0.05° exactly — 8×, 5× and 2× — so their disagreement is driven by polygon shape and falls away with polygon size. Because FloodScan's floor is structural rather than geometric, each dataset gets breaks drawn from its own distribution; compare within a map rather than between them. This is also why FloodScan showed the largest measured value differences.
Median relative change in the admin-unit mean, by polygon size expressed in native raster pixels (so the axis means the same thing for a 0.4° forecast and a 0.083° flood product). Every dataset declines monotonically — the signature of boundary-pixel treatment, and the same result the 2024 Philippines validation found. Log y-axis.
| Polygon size | SEAS5 | ERA5 | IMERG | FloodScan |
|---|---|---|---|---|
| < 1 native px | 0.32% | 0.61% | 10.61% | 49.99% |
| 1–4 px | 0.19% | 0.41% | 7.92% | 33.58% |
| 4–16 px | 0.12% | 0.30% | 6.05% | 24.82% |
| 16–64 px | 0.09% | 0.23% | 3.55% | 20.43% |
| > 64 px | 0.06% | 0.13% | 1.80% | 13.69% |
IMERG and FloodScan look alarming in relative terms only because their values are frequently near zero — FloodScan is a flood fraction whose median admin-unit value is 0, so a negligible absolute change divides by nothing. In physical units every dataset moves by a rounding error. Median absolute change in the admin-unit mean, log scale.
| Dataset | Native res | Typical value | Median abs. change | p90 abs. change | Median rel. | Within 5% |
|---|---|---|---|---|---|---|
| SEAS5 | 0.4° | 1.92 mm/day | 0.0020 mm/day | 0.038 mm/day | 0.20% | 97.1% |
| ERA5 | 0.25° | 1.80 mm/day | 0.0058 mm/day | 0.085 mm/day | 0.38% | 96.1% |
| IMERG | 0.1° | 0.70 mm/day | 0.0295 mm/day | 0.586 mm/day | 4.73% | 51.7% |
| FloodScan | 0.083° | 0.00 fraction | 0.0000 | 0.0011 | 20.09% | 15.3% |
Signed percentage change in the admin-unit mean across 10,967 SEAS5 rows with a defined ratio, clipped to ±15%. Centred on zero and tight — the new values scatter around the old ones rather than shifting them in either direction. This is the same view as the 2024 methodology page's Philippines histogram, one method-generation later.
| Band | Share of SEAS5 rows |
|---|---|
| within ±1% | 82.8% |
| within ±5% | 97.1% |
| beyond ±5% | 2.9% |
Anticipatory-action triggers are rank comparisons — "the driest 1-in-5 years" — so what matters is not how far a value moves but whether the same years still land in the tail. For 5,166 SEAS5 series (admin unit × leadtime × issuance month, 44 years each, NER · TCD · ETH · SOM at every admin level) this ranks the years under both methods and asks whether the activating set is identical. Bars show the share of series where it is not — lower is better, and rarer thresholds are more stable.
| Threshold | Identical set (dry) | Identical set (wet) | Max years swapped |
|---|---|---|---|
| 1-in-3 | 96.07% | 96.54% | 3 |
| 1-in-4 | 96.94% | 97.72% | 3 |
| 1-in-5 | 97.25% | 97.43% | 2 |
| 1-in-10 | 98.16% | 98.59% | 2 |
Rank correlation is near-perfect — median Spearman 0.99986, minimum 0.983, and 97.6% of series above 0.999. 45% of series show no rank change whatsoever; where ranks do move, the median series has 2 of 44 years shifting by a single position. The residual 2–4% of series whose tail membership changes are ones with near-ties at the threshold boundary, where an arbitrarily small change decides the order.
Of everything reading these tables, the Ethiopia drought framework is the only one that re-ranks against the historical record at monitoring time — every other consumer compares against a threshold frozen into a stored number, so their ranking cannot move at all. That makes Ethiopia the decisive test.
Replicating the deployed logic exactly (zonal mean × days-in-month, summed across the season, ranked within each zone against the fixed 1997–2025 baseline, RP = 30 / rank, zones at RP ≥ 5 counted against the threshold) and running it on both value sets gives an identical activation history:
| Trigger | Activating years — legacy | Activating years — new | Flips |
|---|---|---|---|
| MAM, Feb issue (≥15 of 62 zones) | 2000, 2003, 2006, 2008, 2009, 2012, 2013, 2019, 2021, 2022 | identical | 0 |
| JJAS, Apr issue (≥35 of 83) | 1997, 2002, 2006, 2009, 2015, 2023 | identical | 0 |
| JJAS, May issue (≥35 of 83) | 1997, 2002, 2014, 2015, 2023 | identical | 0 |
Only 6 zone-years in the whole record crossed the RP-5 boundary, and the zone count never moved by more than one. The trigger is robust by construction: it sums four monthly values, converts to a rank, and then counts zones — a sub-percent value change has to survive all three stages to alter anything.
One margin worth knowing about. JJAS 2009 on the April issuance moves from 36 activating zones to exactly 35 — the threshold. It still fires, because the rule is ≥ 35, but its margin goes from one zone to zero. MAM 2022 sits at 16 against a threshold of 15 under both methods. Those margins were always thin; the recomputation reveals them rather than creates them, and the framework owners should see them before the archive is rebuilt.
The pattern to carry forward: aggregation absorbs the noise. A framework counting zones across 62–83 units is far more robust than a trigger reading a single admin unit's rank would be. No current framework does the latter against these tables — the two that are rank-based at the pixel level (Chad and Burkina Faso drought) read raster COGs directly and are untouched by this change.
The natural expectation is that a finer raster gives a more faithful answer, so SEAS5 at 0.4° should disagree most and FloodScan at 0.083° least. The measurements say the opposite, and the upsample factor is why. The legacy method resamples everything to a common 0.05° grid and includes whole subpixels by centroid. For SEAS5 that is an 8× upsample, so a misassigned subpixel almost always lands inside the same native pixel, carries an identical value, and produces no error at all. For IMERG and FloodScan it is only a 2× upsample, so half of all subpixel boundaries are real native-pixel boundaries where values genuinely differ.
In other words the upsampling was masking the approximation error, and masking it best exactly where the raster was coarsest. Field roughness compounds it: SEAS5 is a smooth ensemble mean, ERA5 a monthly average, while IMERG daily precipitation is convective and spatially rough and FloodScan flood extent is close to binary. Rough fields turn a boundary-pixel disagreement into a value disagreement.
median is the most stable statistic (0.00% median change on
SEAS5 and ERA5) — it selects an actual pixel value and boundary pixels
rarely change which one sits in the middle. mean follows.
Two statistics change by design:
min and max now consider any pixel
with coverage above zero, a wider set than "pixel centroid
inside the polygon", so extremes can move outward. SEAS5 min/max are
within 5% on 87–88% of rows versus 97% for the mean. On FloodScan this
flipped min from a positive value to 0 on 12 of 2,552
rows, where the widened set picks up a dry boundary pixel.count and sum are re-derived
from coverage fractions scaled to 0.05°-pixel equivalents, shifting
1–2% at the median. Their p90 of exactly 16.67% (= 1/6) is the
fingerprint of small-integer rounding rather than a methodological
difference.| Dataset · stat | Median |rel| | p90 |rel| | Signed median | Within 5% |
|---|---|---|---|---|
| SEAS5 · mean | 0.20% | 1.81% | −0.000% | 97.1% |
| SEAS5 · median | 0.00% | 0.00% | 0.000% | 96.8% |
| SEAS5 · min | 0.00% | 8.63% | −0.000% | 87.3% |
| SEAS5 · max | 0.00% | 8.28% | 0.000% | 88.4% |
| SEAS5 · sum | 2.24% | 16.51% | 0.071% | 67.9% |
| SEAS5 · std | 1.22% | 11.05% | 0.149% | 80.0% |
| SEAS5 · count | 1.25% | 16.67% | 0.000% | 73.8% |
| ERA5 · mean | 0.38% | 2.08% | −0.000% | 96.1% |
| ERA5 · median | 0.00% | 0.00% | −0.000% | 94.9% |
| ERA5 · min | 0.00% | 19.00% | −0.000% | 80.3% |
| ERA5 · max | 0.00% | 18.26% | 0.000% | 81.8% |
| IMERG · mean | 4.73% | 25.47% | 0.219% | 51.7% |
| IMERG · median | 0.45% | 27.19% | −0.000% | 71.1% |
| FloodScan · mean | 20.09% | 85.19% | 3.707% | 15.3% |
| FloodScan · count | 1.35% | 12.50% | 0.000% | 75.2% |
The sub-pixel admin units the new method rescues were initially coming
back with count = 0 alongside a perfectly valid mean,
because the coverage-weighted count rounded down. That breaks the
invariant the legacy method held — count > 0 if and only
if the statistics are non-null — so any downstream query filtering on
count > 0 would have silently dropped exactly the units
exact coverage fractions exist to recover (77 rows in the SEAS5 sample
alone). PR #49 now floors count at 1 wherever coverage
exists, with a regression test.
The rank check above covers the one framework that re-ranks live, and the broad sweep covers four countries' worth of SEAS5 series. It does not cover every consumer individually: the frameworks holding a frozen numeric threshold (LAC Dry Corridor, Afghanistan, Burkina Faso flooding, Haiti, Madagascar, Fiji) are unaffected in ranking terms but will see their monitored value move by the amounts on this page, so each should confirm its own margin against its own threshold. The two thin Ethiopia margins named above deserve an explicit look from the framework owners.
This is the historical validation the team's trigger-design method requires for a change of this kind; it should be repeated on any framework added to these tables later.