"""carrington_regional.py FOLDER -- checks beside RULES_carrington_temperature.txt, added after a fresh review on 2026-11-13 and NOT registered: what a 7 degree C spike would do to a global mean, HadCRUT5's Northern Hemisphere series, HadCRUT5's current version, and the Central England Temperature series around the 1859 Carrington storm. 1. Area: a +7 C anomaly lifts the global mean by 1 C only if it covers 1/7 of the globe; the largest excess the registered test found (+0.140 C) is what +7 C over about 2% of the globe would give, about Europe's share. 2. HadCRUT5 global and Northern Hemisphere monthly series, in the version our registered run used (5.0.2.0) and the current one (5.2.0.0, released 18 September 2026): the registered test (September 1859 - February 1860 against the mean of the 36 months before), and the same window against the same calendar months of the 3 years before. 3. HadCET monthly means (Met Office Hadley Centre; values before 1974 are Manley's): each month from September 1859 to February 1860 against the mean of the same month over 1849-1858. All files are fetched under a plain client name and checked against the SHA-256 of the copies we used. HadCRUT5 and HadCET are Crown Copyright, Met Office, provided under the Open Government Licence. HadCET adds a month at the end of every month, so its checksum will differ later; the 1849-1860 values should not. Standard library only. Usage: python3 -I carrington_regional.py (the output should match carrington_regional.txt) """ import csv import hashlib import io import statistics import sys import urllib.request from pathlib import Path H5 = "https://www.metoffice.gov.uk/hadobs/hadcrut5/data/HadCRUT.{v}/analysis/diagnostics/" SERIES = [ # (label, version, region, our SHA-256): fetched 2026-11-13, the first at 16:51 UTC, the rest at 18:43-18:45 UTC ("global, 5.0.2.0 (registered run)", "5.0.2.0", "global", "75673adde85c4a3a52c8bd987d4ff643c6fc4fc3174a6168ace10dc1b5a70a99"), ("Northern Hemisphere, 5.0.2.0", "5.0.2.0", "northern_hemisphere", "445a4dd55918850d889ffdb8514b720c341c7e0c1d710c1916161d4e6b8fa9e4"), ("global, 5.2.0.0 (current)", "5.2.0.0", "global", "0374543a368f896c2d9da3ef03630aba1f3b7126fbe6d98f164128456e4ab922"), ("Northern Hemisphere, 5.2.0.0 (current)", "5.2.0.0", "northern_hemisphere", "3474e8816891438232a1931b70aa47218c87b7fdf1e65fad410ad191e58346b4"), ] CET_URL = "https://www.metoffice.gov.uk/hadobs/hadcet/data/meantemp_monthly_totals.txt" CET_SHA256 = "d9320e5648a4632c81db39b28216c1bbeb48753bef7c29a72885daca6df821d0" # fetched 2026-11-13 18:43 UTC EARTH_KM2, EUROPE_KM2 = 510.1e6, 10.18e6 # Earth's surface; Europe's land area, about 10.2 million km2 def fetch(url, folder, sha_ours): req = urllib.request.Request(url, headers={"User-Agent": "factchecked-research/1.0"}) with urllib.request.urlopen(req, timeout=120) as r: data = r.read() (folder / url.rsplit("/", 1)[1]).write_bytes(data) sha = hashlib.sha256(data).hexdigest() same = "same file as ours" if sha == sha_ours else "DIFFERENT from the copy we used" print(f" {url.rsplit('/', 1)[1]}: {len(data):,} bytes; SHA-256 {sha}; {same}") return data def months(start, n): y, m = map(int, start.split("-")) out = [] for _ in range(n): out.append(f"{y:04d}-{m:02d}") m += 1 if m == 13: y, m = y + 1, 1 return out def main(folder: Path) -> None: folder.mkdir(parents=True, exist_ok=True) window = months("1859-09", 6) print("1. Area") print(f" a +7 C spike lifts the global mean by 1 C only if it covers 1/7 = {100 / 7:.1f}% of the globe") print(f" +0.140 C, the registered test's largest excess, is +7 C over {100 * 0.140 / 7:.1f}% of the globe;" f" Europe is {100 * EUROPE_KM2 / EARTH_KM2:.1f}%") print("2. HadCRUT5 (anomalies against 1961-1990)") for label, v, region, sha in SERIES: url = H5.format(v=v) + f"HadCRUT.{v}.analysis.summary_series.{region}.monthly.csv" data = fetch(url, folder, sha) rows = {r["Time"]: float(r["Anomaly (deg C)"]) for r in csv.DictReader(io.StringIO(data.decode("utf-8")))} base = [rows[k] for k in months("1856-09", 36)] mu, sd = statistics.mean(base), statistics.stdev(base) exc = [rows[k] - mu for k in window] same_month = [] for k in window: y, m = int(k[:4]), int(k[5:]) same_month.append(rows[k] - statistics.mean(rows[f"{y - j:04d}-{m:02d}"] for j in (1, 2, 3))) print(f" {label}: baseline Sep 1856-Aug 1859 {mu:+.3f} C (sd {sd:.3f}); window months minus baseline " + ", ".join(f"{e:+.3f}" for e in exc) + f"; largest {max(exc):+.3f} C") print(f" against the same months of the 3 years before: largest {max(same_month):+.3f} C") print("3. Central England Temperature (HadCET monthly means, C)") text = fetch(CET_URL, folder, CET_SHA256).decode("utf-8") cet = {} for line in text.splitlines(): p = line.split() if len(p) >= 13 and p[0].isdigit(): cet[int(p[0])] = [float(x) for x in p[1:13]] warmest = None for k in window: y, m = int(k[:4]), int(k[5:]) clim = [cet[yy][m - 1] for yy in range(1849, 1859)] mu, sd = statistics.mean(clim), statistics.stdev(clim) d = cet[y][m - 1] - mu warmest = d if warmest is None else max(warmest, d) print(f" {k}: {cet[y][m - 1]:.1f} C; mean of that month 1849-1858 {mu:.2f} C (sd {sd:.2f}); difference {d:+.1f} C") print(f" warmest month against its 1849-1858 mean: {warmest:+.1f} C") if __name__ == "__main__": if len(sys.argv) != 2: sys.exit(__doc__) main(Path(sys.argv[1]))