SeaWolf-AI commited on
Commit
59dc7c2
·
verified ·
1 Parent(s): 7b88fb2

Darwin ranked as competitor, champions tables, results+outlook timeline, defaults

Browse files
Files changed (1) hide show
  1. index.html +55 -33
index.html CHANGED
@@ -37,7 +37,8 @@ svg{width:100%;height:auto;display:block}.lg{display:flex;flex-wrap:wrap;gap:6px
37
  .mo{display:grid;grid-template-columns:repeat(auto-fill,minmax(98px,1fr));gap:8px}.mc{background:rgba(4,11,24,.45);border:1px solid var(--line);border-radius:10px;padding:9px 10px;border-top:3px solid var(--cy)}.mc .m{font-size:11px;font-weight:800;letter-spacing:.1em;color:var(--mut)}.mc .w{font-weight:800;font-size:13px;margin-top:3px}.mc .e{font-size:12px;color:var(--mut)}
38
  .ol{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:8px;margin-bottom:14px}.ot1{background:linear-gradient(180deg,#134a8f,#0b2a5c);border:1px solid #2a66b8;border-radius:10px;padding:8px 4px;text-align:center}.ot1 .dn{font-size:11px;font-weight:800;letter-spacing:.08em;color:var(--mut)}.ot1 .dd{font-size:11px;color:var(--mut)}.ot1 .tv{font-size:24px;font-weight:900;color:#fff;line-height:1.2}.ot1 .sp{font-size:10px;color:var(--cy);font-weight:700}
39
  @media(max-width:700px){.ol{grid-template-columns:repeat(5,minmax(0,1fr))}}
40
- .tw{overflow-x:auto}.ot{border-collapse:collapse;width:100%;min-width:640px;font-size:13px}.ot th,.ot td{padding:6px 8px;text-align:right;border-bottom:1px solid rgba(29,63,120,.6);white-space:nowrap}.ot th:first-child,.ot td:first-child{text-align:left;position:sticky;left:0;background:#0f2a55}.ot th{color:var(--mut);font-size:11px;letter-spacing:.06em}.ot tr.dwo td{color:var(--cy);font-weight:800}
 
41
  .note{color:var(--mut);font-size:13px;margin:0}.note b{color:var(--ink)}footer{color:var(--mut);font-size:12px;margin-top:18px}a{color:var(--cy)}#status{color:var(--mut);font-size:13px;margin-bottom:12px}
42
  </style></head><body>
43
  <div class="top"><span class="live"><i></i>LIVE</span><span class="brand">Global Weather Model <b>Leaderboard</b></span><span class="stamp" id="stamp">Loading…</span></div>
@@ -45,33 +46,38 @@ svg{width:100%;height:auto;display:block}.lg{display:flex;flex-wrap:wrap;gap:6px
45
  <main>
46
  <div class="ctl">
47
  <label>Forecast lead<select id="lead"></select></label>
48
- <label>Period<select id="period"><option value="day">Single day</option><option value="7">Last 7 days</option><option value="14">Last 14 days</option><option value="30" selected>Last 30 days</option><option value="90">Last 90 days</option><option value="ytd">2026 year to date</option></select></label>
49
  <label>Verification date<select id="date"></select></label>
50
  <label>City<select id="city"><option value="-1">All 24 cities</option></select></label>
51
  </div>
52
  <div id="status">Loading forecasts and observations…</div>
53
  <div class="grid">
54
- <div class="pn"><h2 id="h1">Most accurate public model</h2><div id="champ"></div></div>
55
  <div class="pn dw"><h2>Darwin-Prediction-Weather</h2><div id="dwc"></div></div>
56
  </div>
 
 
 
57
  <div class="pn" style="margin-top:14px"><h2 id="h2">Accuracy board</h2><div id="bars"></div></div>
58
  <div class="grid2">
59
  <div class="pn"><h2>Error by forecast day</h2><div id="curve"></div><div class="lg" id="lg1"></div></div>
60
  <div class="pn"><h2>Most accurate model by city</h2><div id="map"></div><div class="lg" id="lg2"></div></div>
61
  </div>
62
- <div class="pn" style="margin-top:14px"><h2 id="h4">10-day outlook</h2>
63
  <div class="ctl" style="margin:0 0 12px"><label>Outlook city<select id="ocity"></select></label></div>
64
  <div class="ol" id="otiles"></div><div class="tw"><table class="ot" id="otab"></table></div><p class="note" id="onote" style="margin-top:10px"></p></div>
65
  <div class="pn" style="margin-top:14px"><h2 id="h3">Monthly champions 2026</h2><div class="mo" id="mo"></div></div>
66
  <div class="pn" style="margin-top:14px"><h2>How it is scored</h2>
67
- <p class="note">Every day each model's forecast is recorded for up to 10 days ahead. When the observed value for a day is published, every forecast made for that day is scored and the cumulative record is updated, once a day. A forecast issued N days earlier is compared with the ERA5 daily maximum 2 m temperature for the same UTC day at each city. Lower RMSE ranks higher. Models are compared on the same cases: days and cities where every listed model issued a forecast. Type shows how a model works: <b>AI</b> models learn the forecast from data, <b>Physics (Supercomputer)</b> models solve the equations of the atmosphere on supercomputers. ERA5 is published about five days after the fact, so the latest verification date trails today. Forecasts 1 to 7 days ahead are scored from 2026-01-01; forecasts 8 to 10 days ahead are archived from 2026-11-13 and enter the ranking as their target days are verified. <b>Darwin-Prediction-Weather</b> is VIDRAFT's fusion engine: local bias correction plus skill-weighted fusion of the public models, fitted only on days before the one being scored. It is shown alongside the ranking and is not ranked among the public models. In the 10-day outlook the fusion for days beyond the longest scored lead uses that lead's calibration.</p></div>
68
  <footer>Full daily record since 2026-01-01 (every model forecast and the ERA5 value): <a href="https://huggingface.co/datasets/FINAL-Bench/Weather-Model-Forecast-Archive">Weather-Model-Forecast-Archive</a>. Weather data by <a href="https://open-meteo.com/">Open-Meteo.com</a> (CC BY 4.0). Verification: ERA5, Copernicus Climate Change Service. Model sources: ECMWF, NOAA NCEP, DWD, JMA, ECCC, MET Norway. Engine: <a href="https://huggingface.co/FINAL-Bench/Darwin-Prediction-Weather">Darwin-Prediction-Weather</a>. Leaderboard and compiled record: CC BY-NC 4.0, non-commercial use only. Contact: <a href="mailto:vidraft@mail.vidraft.net">vidraft@mail.vidraft.net</a></footer>
69
  </main><script>
70
  const CITIES={"Seoul":[37.57,126.98],"Busan":[35.18,129.08],"Tokyo":[35.68,139.69],"Beijing":[39.90,116.40],"Singapore":[1.35,103.82],"Delhi":[28.61,77.21],"Dubai":[25.20,55.27],"Moscow":[55.76,37.62],"Berlin":[52.52,13.40],"London":[51.51,-0.13],"Paris":[48.86,2.35],"Madrid":[40.42,-3.70],"Cairo":[30.04,31.24],"Nairobi":[-1.29,36.82],"Johannesburg":[-26.20,28.05],"New York":[40.71,-74.01],"Chicago":[41.88,-87.63],"Los Angeles":[34.05,-118.24],"Mexico City":[19.43,-99.13],"Sao Paulo":[-23.55,-46.63],"Buenos Aires":[-34.60,-58.38],"Sydney":[-33.87,151.21],"Anchorage":[61.22,-149.90],"Reykjavik":[64.15,-21.94]};
 
71
  const MODELS={"ecmwf_ifs025":["ECMWF IFS","ECMWF","Physics","eu","Europe","#5b8cff"],"ecmwf_aifs025_single":["ECMWF AIFS","ECMWF","AI","eu","Europe","#35d0ff"],"gfs_seamless":["GFS","NOAA NCEP","Physics","us","United States","#ff8a4c"],"ncep_aigfs025":["AIGFS","NOAA NCEP","AI","us","United States","#ffd166"],"icon_seamless":["ICON","DWD","Physics","de","Germany","#7be495"],"jma_seamless":["JMA GSM","JMA","Physics","jp","Japan","#ff6b9d"],"gem_seamless":["GEM","ECCC","Physics","ca","Canada","#c79bff"],"metno_seamless":["MET Nordic / IFS","MET Norway","Physics","no","Norway","#8fe3d0"]};
72
  let LEADS=[1,3,5,7];const NAMES=Object.keys(CITIES),MK=Object.keys(MODELS),DAYS=50,LAG=6,MIN=31,DWC="#ffffff";
73
  const flag=(cc,nm)=>`<img class="fl" src="https://flagcdn.com/w40/${cc}.png" alt="${nm}" title="${nm}" width="20" height="14">`;
74
- const tyb=m=>`<span class="ty ${MODELS[m][2]==="AI"?"ai":"ph"}">${MODELS[m][2]==="AI"?"AI":"Physics (Supercomputer)"}</span>`;
 
75
  const $=id=>document.getElementById(id),iso=d=>d.toISOString().slice(0,10);
76
  const end=new Date(Date.now()-LAG*864e5),start=new Date(end-(DAYS-1)*864e5);
77
  const lat=NAMES.map(c=>CITIES[c][0]).join(","),lon=NAMES.map(c=>CITIES[c][1]).join(",");
@@ -96,12 +102,19 @@ function outlook(){if(!OL){$("otiles").innerHTML="";$("otab").innerHTML="";$("on
96
  const use=ms.filter(m=>F[m]&&F[m][li]&&fin(num(OL.models[m][city][L])));if(use.length<3)return NaN;const {bias,mse}=fit(li,LEADS[li],dates.length,use);const good=use.filter(m=>fin(mse[m])&&mse[m]>0&&fin(bias[m][c]));if(good.length<3)return NaN;
97
  let ws=0,f=0;good.forEach(m=>ws+=1/mse[m]);good.forEach(m=>f+=(1/mse[m])/ws*(OL.models[m][city][L]-bias[m][c]));return f});
98
  const dn=d=>new Date(d+"T12:00:00Z").toLocaleString("en",{weekday:"short",timeZone:"UTC"}).toUpperCase();
99
- $("h4").textContent=`10-day outlook: ${city}, daily maximum temperature`;
100
  $("otiles").innerHTML=days.map((d,k)=>{const vs=ms.map(m=>num(OL.models[m][city][k+1])).filter(fin),sp=vs.length>1?Math.max(...vs)-Math.min(...vs):NaN;return `<div class="ot1"><div class="dn">${dn(d)}</div><div class="dd">${d.slice(5)}</div><div class="tv">${fin(fus[k])?fus[k].toFixed(0)+"°":"–"}</div><div class="sp">${fin(sp)?"±"+(sp/2).toFixed(1)+"° models":""}</div></div>`}).join("");
101
- let h="<tr><th>Model</th>"+days.map((d,k)=>`<th>+${k+1}d<br>${d.slice(5)}</th>`).join("")+"</tr>";
102
- h+=`<tr class="dwo"><td>Darwin-Prediction-Weather</td>${fus.map(v=>`<td>${fin(v)?v.toFixed(1):"–"}</td>`).join("")}</tr>`;
103
- ms.forEach(m=>h+=`<tr><td>${flag(MODELS[m][3],MODELS[m][4])}${MODELS[m][0]}</td>${days.map((d,k)=>{const v=num(OL.models[m][city][k+1]);return `<td>${fin(v)?v.toFixed(1):"–"}</td>`}).join("")}</tr>`);
104
- $("otab").innerHTML=h;$("onote").textContent=`Forecasts issued ${OL.issued.replace("T"," ").replace("Z"," UTC")}, in °C. The large numbers are the Darwin-Prediction-Weather fusion; "± models" is half the spread between the public models, a guide to how settled the forecast is. Each of these forecasts is scored on the board above once the day is verified.`}
 
 
 
 
 
 
 
105
  // bias and weights use only days whose truth was known before scoring day t (t-30 .. t-lead)
106
  function fit(li,D,t,ms){const w0=Math.max(0,t-30),t1=t-D;const bias={},mse={};
107
  for(const m of ms){bias[m]=[];let s2=0,n2=0;
@@ -114,34 +127,43 @@ const memo={};
114
  function run(li,t0,t1,ci){const key=[li,t0,t1,ci].join("|");if(memo[key])return memo[key];const D=LEADS[li];
115
  const cov={};let tot=0;for(let t=t0;t<=t1;t++)for(let c=0;c<NAMES.length;c++){if(ci>=0&&c!==ci)continue;if(!fin(num(O[c][t])))continue;tot++;for(const m of MK)if(F[m]&&F[m][li]&&fin(num(F[m][li][c][t])))cov[m]=(cov[m]||0)+1}
116
  const EL=MK.filter(m=>(cov[m]||0)>=Math.max(1,0.6*tot)&&tot>0),OUT=MK.filter(m=>!EL.includes(m));
117
- const A={},add=(k,gs,e)=>{if(!fin(e))return;const a=A[k]||(A[k]={s:0,n:0,g:{}});a.s+=e*e;a.n++;for(const g of gs){const b=a.g[g]||(a.g[g]=[0,0]);b[0]+=e*e;b[1]++}};
 
118
  for(let t=t0;t<=t1;t++){const {bias,mse}=fit(li,D,t,EL);const good=EL.filter(m=>fin(mse[m])&&mse[m]>0);let ws=0;good.forEach(m=>ws+=1/mse[m]);const mon=dates[t].slice(0,7);
119
  for(let c=0;c<NAMES.length;c++){if(ci>=0&&c!==ci)continue;const o=num(O[c][t]);if(!fin(o))continue;if(!EL.every(m=>fin(num(F[m][li][c][t]))))continue;
120
- for(const m of EL)add(m,["c"+c,mon],num(F[m][li][c][t])-o);
121
  let fu=0,ok=good.length>=3&&good.length===EL.length;for(const m of good){const x=num(F[m][li][c][t])-bias[m][c];if(!fin(x)){ok=false;break}fu+=(1/mse[m])/ws*x}
122
- if(ok)add("darwin",["c"+c,mon],fu-o)}}
123
- const rows=EL.filter(m=>A[m]).map(m=>({m,r:Math.sqrt(A[m].s/A[m].n),n:A[m].n})).sort((a,b)=>a.r-b.r);let rk=0,prev=null;rows.forEach((x,i)=>{if(prev===null||x.r.toFixed(2)!==prev){rk=i+1;prev=x.r.toFixed(2)}x.rk=rk});
124
- return memo[key]={rows,A,OUT,dw:A.darwin?Math.sqrt(A.darwin.s/A.darwin.n):NaN,dn:A.darwin?A.darwin.n:0}}
 
 
125
  const grp=(A,k,g,min)=>A[k]&&A[k].g[g]&&A[k].g[g][1]>=min?Math.sqrt(A[k].g[g][0]/A[k].g[g][1]):NaN;
126
  function render(){
127
- const D=+$("lead").value,li=LEADS.indexOf(D),per=$("period").value,ci=+$("city").value,t1=dates.indexOf($("date").value),n=per==="day"?1:(per==="ytd"?9999:+per),t0=Math.max(MIN,t1-n+1);
128
- const R=run(li,t0,t1,ci),rows=R.rows,best=rows.length?rows[0].r:NaN,where=ci<0?"24 cities":NAMES[ci],span=t0===t1?dates[t1]:dates[t0]+" to "+dates[t1];
129
  $("stamp").innerHTML=`Verified through <b>${dates[dates.length-1]}</b> (ERA5)${gen?"<br>Updated "+gen:""}`;
130
- $("h1").textContent=`Most accurate public model: ${D}-day forecast, ${where}`;$("h2").textContent=`Accuracy board: ${D}-day forecast, ${span}, ${where}`;
131
  if(!rows.length){const e="<p class='note'>No verified cases yet for this selection.</p>";$("status").textContent="";$("champ").innerHTML=e;$("dwc").innerHTML=e;$("bars").innerHTML=e;$("tick").textContent=`${D}-day forecasts are being archived and will appear here as their target days are verified.`}
132
  else{
133
- $("status").textContent=`Public models scored as issued, on the cases every listed model covers.${R.OUT.length?" Not listed for this selection (insufficient coverage): "+R.OUT.map(m=>MODELS[m][0]).join(", ")+".":""}${rows[0].n<30?" Small sample: results for a single day or city vary widely.":""}`;
134
- const c=rows[0],M=MODELS[c.m];
135
  $("champ").innerHTML=`<div class="champ"><div class="medal">1</div><div><div class="cn">${M[0]}</div><div class="sub" style="margin:6px 0">${flag(M[3],M[4])}${M[1]} &nbsp; ${tyb(c.m)}</div><div class="big">${c.r.toFixed(2)}<small>°C RMSE</small></div><div class="sub">${c.n.toLocaleString()} verified forecasts, ${span}</div></div></div>`+
136
- `<div class="run">${rows.slice(1,3).map(x=>`<div class="rn"><div class="k">NO. ${x.rk}</div><div class="v">${MODELS[x.m][0]}</div><div class="sub">${flag(MODELS[x.m][3],MODELS[x.m][4])}${x.r.toFixed(2)} °C</div></div>`).join("")}</div>`;
137
  $("dwc").innerHTML=fin(R.dw)?`<div class="sub" style="margin-bottom:6px">${flag("kr","South Korea")}VIDRAFT &nbsp; <span class="ty ai">AI</span> &nbsp; fusion engine</div><div class="big">${R.dw.toFixed(2)}<small>°C RMSE</small></div><div class="gain">${R.dw<best?((1-R.dw/best)*100).toFixed(1)+"% lower error than the best public model":"Level with the best public model"}</div><div class="sub" style="margin-top:10px">${R.dn.toLocaleString()} verified forecasts, ${D}-day lead</div>`:"<p class='note'>Fusion needs at least three models with 30 days of history for this selection.</p>";
138
- const mx=Math.max(...rows.map(x=>x.r),fin(R.dw)?R.dw:0);let h="";
139
- if(fin(R.dw))h+=`<div class="bar dwr"><div class="rk">★</div><div class="nm">Darwin-Prediction-Weather<span class="d">${flag("kr","South Korea")}VIDRAFT · AI fusion</span></div><div class="trk"><i style="width:${R.dw/mx*100}%;background:linear-gradient(90deg,#35d0ff,#9be9ff)"></i></div><div class="val">${R.dw.toFixed(2)}</div></div>`;
140
- rows.forEach(x=>{const M=MODELS[x.m];h+=`<div class="bar ${x.rk===1?"f":""}"><div class="rk">${x.rk}</div><div class="nm">${M[0]}<span class="d">${flag(M[3],M[4])}${M[1]} &nbsp; ${tyb(x.m)}</span></div><div class="trk"><i style="width:${x.r/mx*100}%;background:${M[5]}"></i></div><div class="val">${x.r.toFixed(2)}</div></div>`});
141
  $("bars").innerHTML=h;
142
- const tk=`<b>${D}-DAY FORECAST</b> · ${span} · ${where} &nbsp;&nbsp;`+rows.map(x=>`<em>#${x.rk}</em> ${MODELS[x.m][0]} ${x.r.toFixed(2)}°C`).join(" &nbsp;•&nbsp; ")+(fin(R.dw)?` &nbsp;•&nbsp; <b>DARWIN-PREDICTION-WEATHER ${R.dw.toFixed(2)}°C</b>`:"")+" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
143
  $("tick").innerHTML=tk+tk;
144
  }
 
 
 
 
 
 
 
145
  // error by forecast day
146
  const cur=LEADS.map((L,i)=>run(i,t0,t1,ci)),act=LEADS.map((L,i)=>cur[i].rows.length?i:-1).filter(i=>i>=0),W=520,H=260,pl=38,pb=28,pt=10,pr=10;
147
  if(act.length>1){const ymax=Math.max(...act.flatMap(i=>cur[i].rows.map(x=>x.r)))*1.08,X=i=>pl+(W-pl-pr)*(act.indexOf(i)/(act.length-1)),Y=v=>pt+(H-pt-pb)*(1-v/ymax);let s=`<svg viewBox="0 0 ${W} ${H}" role="img" aria-label="RMSE by forecast day">`;
@@ -156,15 +178,15 @@ function render(){
156
  for(let l=-150;l<=150;l+=30)ms+=`<line x1="${px(l)}" x2="${px(l)}" y1="0" y2="${mh}" stroke="#16335f"/>`;for(let l=60;l>=-30;l-=30)ms+=`<line x1="0" x2="${mw}" y1="${py(l)}" y2="${py(l)}" stroke="${l===0?"#2a5596":"#16335f"}"/>`;
157
  ms+=`<text x="4" y="${py(0)-4}" fill="#5f7fb3" font-size="9">EQUATOR</text>`;const used={};
158
  NAMES.forEach((c,i)=>{let bm=null,bv=1e9;RA.rows.forEach(x=>{const v=grp(RA.A,x.m,"c"+i,Math.min(5,t1-t0+1));if(fin(v)&&v<bv){bv=v;bm=x.m}});if(!bm)return;used[bm]=1;const x=px(CITIES[c][1]),y=py(CITIES[c][0]),left=x>mw-90;
159
- ms+=`<circle cx="${x}" cy="${y}" r="6.5" fill="${MODELS[bm][5]}" stroke="#061226" stroke-width="1.5"><title>${c}: ${MODELS[bm][0]} ${bv.toFixed(2)} °C</title></circle><text x="${left?x-9:x+9}" y="${y+3.5}" fill="#dbe7fb" font-size="9.5" font-weight="600" text-anchor="${left?"end":"start"}">${c}</text>`});
160
- $("map").innerHTML=ms+"</svg>";$("lg2").innerHTML=MK.filter(m=>used[m]).map(m=>`<span><i style="background:${MODELS[m][5]}"></i>${MODELS[m][0]}</span>`).join("")||"No verified cases yet.";
161
  // monthly champions over the whole record for this lead
162
  const RY=run(li,MIN,dates.length-1,-1),months=[...new Set(dates.slice(MIN).map(d=>d.slice(0,7)))];$("h3").textContent=`Monthly champions 2026: ${D}-day forecast, 24 cities`;
163
- $("mo").innerHTML=months.map(mo=>{let bm=null,bv=1e9;RY.rows.forEach(x=>{const v=grp(RY.A,x.m,mo,100);if(fin(v)&&v<bv){bv=v;bm=x.m}});const d=grp(RY.A,"darwin",mo,100),nm=new Date(mo+"-15").toLocaleString("en",{month:"short"}).toUpperCase();
164
- return bm?`<div class="mc" style="border-top-color:${MODELS[bm][5]}"><div class="m">${nm}</div><div class="w">${MODELS[bm][0]}</div><div class="e">${bv.toFixed(2)} °C${fin(d)?" · Darwin "+d.toFixed(2):""}</div></div>`:""}).join("")||"<p class='note'>No verified months yet for this lead.</p>";
165
  }
166
- load().then(()=>{LEADS.forEach(d=>$("lead").insertAdjacentHTML("beforeend",`<option value="${d}"${d===3?" selected":""}>${d} day${d>1?"s":""} ahead</option>`));NAMES.forEach((c,i)=>$("city").insertAdjacentHTML("beforeend",`<option value="${i}">${c}</option>`));
167
- for(let i=dates.length-1;i>=MIN;i--)$("date").insertAdjacentHTML("beforeend",`<option>${dates[i]}</option>`);
168
  NAMES.forEach((c,i)=>$("ocity").insertAdjacentHTML("beforeend",`<option value="${i}">${c}</option>`));$("ocity").onchange=outlook;
169
- ["lead","period","date","city"].forEach(id=>$(id).onchange=()=>{render();if(id==="city"&&+$("city").value>=0){$("ocity").value=$("city").value;outlook()}});render();outlook()}).catch(e=>{$("status").textContent="Could not load data. Please reload in a moment.";console.error(e)});
170
  </script></body></html>
 
37
  .mo{display:grid;grid-template-columns:repeat(auto-fill,minmax(98px,1fr));gap:8px}.mc{background:rgba(4,11,24,.45);border:1px solid var(--line);border-radius:10px;padding:9px 10px;border-top:3px solid var(--cy)}.mc .m{font-size:11px;font-weight:800;letter-spacing:.1em;color:var(--mut)}.mc .w{font-weight:800;font-size:13px;margin-top:3px}.mc .e{font-size:12px;color:var(--mut)}
38
  .ol{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:8px;margin-bottom:14px}.ot1{background:linear-gradient(180deg,#134a8f,#0b2a5c);border:1px solid #2a66b8;border-radius:10px;padding:8px 4px;text-align:center}.ot1 .dn{font-size:11px;font-weight:800;letter-spacing:.08em;color:var(--mut)}.ot1 .dd{font-size:11px;color:var(--mut)}.ot1 .tv{font-size:24px;font-weight:900;color:#fff;line-height:1.2}.ot1 .sp{font-size:10px;color:var(--cy);font-weight:700}
39
  @media(max-width:700px){.ol{grid-template-columns:repeat(5,minmax(0,1fr))}}
40
+ .tw{overflow-x:auto}.ot{border-collapse:collapse;width:100%;min-width:1080px;font-size:13px}.ot th,.ot td{padding:6px 8px;text-align:right;border-bottom:1px solid rgba(29,63,120,.6);white-space:nowrap}.ot th:first-child,.ot td:first-child{text-align:left;position:sticky;left:0;background:#0f2a55}.ot th{color:var(--mut);font-size:11px;letter-spacing:.06em}.ot tr.dwo td{color:var(--cy);font-weight:800}.ot tr.obr td{color:var(--gold);font-weight:800}.ot th.pa{color:#b9c7e0}.ot th.td,.ot td.td{background:rgba(255,200,61,.10)}.ot th.td{color:var(--gold)}.ot th.fu{color:var(--cy)}.ot .cu{border-right:2px solid var(--line);color:var(--ink)}.er{display:block;font-size:10px;font-weight:700}.er.g{color:#7be495}.er.y{color:#ffd166}.er.r{color:#ff6b7d}
41
+ .h3{margin:0 0 8px;font-size:13px;font-weight:700;color:var(--ink)}.wt{border-collapse:separate;border-spacing:3px;width:100%;min-width:720px;font-size:12px}.wt th{color:var(--mut);font-size:11px;letter-spacing:.06em;padding:4px 6px;text-align:center;white-space:nowrap}.wt th:first-child,.wt td:first-child{text-align:left;font-weight:700;color:var(--ink);white-space:nowrap;padding:5px 8px}.wt td.w{text-align:center;border-radius:6px;padding:5px 4px;font-weight:800;color:#061226;white-space:nowrap}.wt td.w small{display:block;font-weight:700;font-size:10px;opacity:.8}.wt td.e{text-align:center;color:var(--mut)}
42
  .note{color:var(--mut);font-size:13px;margin:0}.note b{color:var(--ink)}footer{color:var(--mut);font-size:12px;margin-top:18px}a{color:var(--cy)}#status{color:var(--mut);font-size:13px;margin-bottom:12px}
43
  </style></head><body>
44
  <div class="top"><span class="live"><i></i>LIVE</span><span class="brand">Global Weather Model <b>Leaderboard</b></span><span class="stamp" id="stamp">Loading…</span></div>
 
46
  <main>
47
  <div class="ctl">
48
  <label>Forecast lead<select id="lead"></select></label>
49
+ <label>Period<select id="period"><option value="day">Single day</option><option value="7">Last 7 days</option><option value="14">Last 14 days</option><option value="30">Last 30 days</option><option value="90">Last 90 days</option><option value="ytd" selected>2026 year to date</option></select></label>
50
  <label>Verification date<select id="date"></select></label>
51
  <label>City<select id="city"><option value="-1">All 24 cities</option></select></label>
52
  </div>
53
  <div id="status">Loading forecasts and observations…</div>
54
  <div class="grid">
55
+ <div class="pn"><h2 id="h1">Most accurate model</h2><div id="champ"></div></div>
56
  <div class="pn dw"><h2>Darwin-Prediction-Weather</h2><div id="dwc"></div></div>
57
  </div>
58
+ <div class="pn" style="margin-top:14px"><h2>Champions at a glance: who is no. 1</h2>
59
+ <h3 class="h3">By period and forecast day, 24 cities</h3><div class="tw"><table class="wt" id="wper"></table></div>
60
+ <h3 class="h3" style="margin-top:16px">By city and forecast day, 2026 year to date</h3><div class="tw"><table class="wt" id="wcity"></table></div><div class="lg" id="lg3"></div></div>
61
  <div class="pn" style="margin-top:14px"><h2 id="h2">Accuracy board</h2><div id="bars"></div></div>
62
  <div class="grid2">
63
  <div class="pn"><h2>Error by forecast day</h2><div id="curve"></div><div class="lg" id="lg1"></div></div>
64
  <div class="pn"><h2>Most accurate model by city</h2><div id="map"></div><div class="lg" id="lg2"></div></div>
65
  </div>
66
+ <div class="pn" style="margin-top:14px"><h2 id="h4">Results and 10-day outlook</h2>
67
  <div class="ctl" style="margin:0 0 12px"><label>Outlook city<select id="ocity"></select></label></div>
68
  <div class="ol" id="otiles"></div><div class="tw"><table class="ot" id="otab"></table></div><p class="note" id="onote" style="margin-top:10px"></p></div>
69
  <div class="pn" style="margin-top:14px"><h2 id="h3">Monthly champions 2026</h2><div class="mo" id="mo"></div></div>
70
  <div class="pn" style="margin-top:14px"><h2>How it is scored</h2>
71
+ <p class="note">Every day each model's forecast is recorded for up to 10 days ahead. When the observed value for a day is published, every forecast made for that day is scored and the cumulative record is updated, once a day. A forecast issued N days earlier is compared with the ERA5 daily maximum 2 m temperature for the same UTC day at each city. Lower RMSE ranks higher. Models are compared on the same cases: days and cities where every listed model issued a forecast. Type shows how a model works: <b>AI</b> models learn the forecast from data, <b>Physics (Supercomputer)</b> models solve the equations of the atmosphere on supercomputers. ERA5 is published about five days after the fact, so the latest verification date trails today. Forecasts 1 to 7 days ahead are scored from 2026-01-01; forecasts 8 to 10 days ahead are archived from 2026-11-13 and enter the ranking as their target days are verified. <b>Darwin-Prediction-Weather</b> is VIDRAFT's fusion engine: local bias correction plus skill-weighted fusion of the public models, fitted only on days before the one being scored. It is ranked on exactly the same cases as the public models. In the 10-day outlook the fusion for days beyond the longest scored lead uses that lead's calibration.</p></div>
72
  <footer>Full daily record since 2026-01-01 (every model forecast and the ERA5 value): <a href="https://huggingface.co/datasets/FINAL-Bench/Weather-Model-Forecast-Archive">Weather-Model-Forecast-Archive</a>. Weather data by <a href="https://open-meteo.com/">Open-Meteo.com</a> (CC BY 4.0). Verification: ERA5, Copernicus Climate Change Service. Model sources: ECMWF, NOAA NCEP, DWD, JMA, ECCC, MET Norway. Engine: <a href="https://huggingface.co/FINAL-Bench/Darwin-Prediction-Weather">Darwin-Prediction-Weather</a>. Leaderboard and compiled record: CC BY-NC 4.0, non-commercial use only. Contact: <a href="mailto:vidraft@mail.vidraft.net">vidraft@mail.vidraft.net</a></footer>
73
  </main><script>
74
  const CITIES={"Seoul":[37.57,126.98],"Busan":[35.18,129.08],"Tokyo":[35.68,139.69],"Beijing":[39.90,116.40],"Singapore":[1.35,103.82],"Delhi":[28.61,77.21],"Dubai":[25.20,55.27],"Moscow":[55.76,37.62],"Berlin":[52.52,13.40],"London":[51.51,-0.13],"Paris":[48.86,2.35],"Madrid":[40.42,-3.70],"Cairo":[30.04,31.24],"Nairobi":[-1.29,36.82],"Johannesburg":[-26.20,28.05],"New York":[40.71,-74.01],"Chicago":[41.88,-87.63],"Los Angeles":[34.05,-118.24],"Mexico City":[19.43,-99.13],"Sao Paulo":[-23.55,-46.63],"Buenos Aires":[-34.60,-58.38],"Sydney":[-33.87,151.21],"Anchorage":[61.22,-149.90],"Reykjavik":[64.15,-21.94]};
75
+ const DW=["Darwin-Prediction-Weather","VIDRAFT","AI","kr","South Korea","#ffc83d"];
76
  const MODELS={"ecmwf_ifs025":["ECMWF IFS","ECMWF","Physics","eu","Europe","#5b8cff"],"ecmwf_aifs025_single":["ECMWF AIFS","ECMWF","AI","eu","Europe","#35d0ff"],"gfs_seamless":["GFS","NOAA NCEP","Physics","us","United States","#ff8a4c"],"ncep_aigfs025":["AIGFS","NOAA NCEP","AI","us","United States","#ffd166"],"icon_seamless":["ICON","DWD","Physics","de","Germany","#7be495"],"jma_seamless":["JMA GSM","JMA","Physics","jp","Japan","#ff6b9d"],"gem_seamless":["GEM","ECCC","Physics","ca","Canada","#c79bff"],"metno_seamless":["MET Nordic / IFS","MET Norway","Physics","no","Norway","#8fe3d0"]};
77
  let LEADS=[1,3,5,7];const NAMES=Object.keys(CITIES),MK=Object.keys(MODELS),DAYS=50,LAG=6,MIN=31,DWC="#ffffff";
78
  const flag=(cc,nm)=>`<img class="fl" src="https://flagcdn.com/w40/${cc}.png" alt="${nm}" title="${nm}" width="20" height="14">`;
79
+ const inf=m=>m==="darwin"?DW:MODELS[m];
80
+ const tyb=m=>`<span class="ty ${inf(m)[2]==="AI"?"ai":"ph"}">${inf(m)[2]==="AI"?"AI":"Physics (Supercomputer)"}</span>`;
81
  const $=id=>document.getElementById(id),iso=d=>d.toISOString().slice(0,10);
82
  const end=new Date(Date.now()-LAG*864e5),start=new Date(end-(DAYS-1)*864e5);
83
  const lat=NAMES.map(c=>CITIES[c][0]).join(","),lon=NAMES.map(c=>CITIES[c][1]).join(",");
 
102
  const use=ms.filter(m=>F[m]&&F[m][li]&&fin(num(OL.models[m][city][L])));if(use.length<3)return NaN;const {bias,mse}=fit(li,LEADS[li],dates.length,use);const good=use.filter(m=>fin(mse[m])&&mse[m]>0&&fin(bias[m][c]));if(good.length<3)return NaN;
103
  let ws=0,f=0;good.forEach(m=>ws+=1/mse[m]);good.forEach(m=>f+=(1/mse[m])/ws*(OL.models[m][city][L]-bias[m][c]));return f});
104
  const dn=d=>new Date(d+"T12:00:00Z").toLocaleString("en",{weekday:"short",timeZone:"UTC"}).toUpperCase();
105
+ $("h4").textContent=`Results and 10-day outlook: ${city}, daily maximum temperature`;
106
  $("otiles").innerHTML=days.map((d,k)=>{const vs=ms.map(m=>num(OL.models[m][city][k+1])).filter(fin),sp=vs.length>1?Math.max(...vs)-Math.min(...vs):NaN;return `<div class="ot1"><div class="dn">${dn(d)}</div><div class="dd">${d.slice(5)}</div><div class="tv">${fin(fus[k])?fus[k].toFixed(0)+"°":"–"}</div><div class="sp">${fin(sp)?"±"+(sp/2).toFixed(1)+"° models":""}</div></div>`}).join("");
107
+ // rolling timeline: cumulative record | last 7 days with results | today | next 10 days
108
+ const Rc=OL.recent,Dl=+$("lead").value,Lp=Math.min(Dl,7),liH=LEADS.indexOf(Lp),cum=liH>=0?run(liH,MIN,dates.length-1,c):null,cv=m=>{const x=cum&&cum.rows.find(r=>r.m===m);return x?x.r.toFixed(2):"–"};
109
+ const idx=d=>Math.round((Date.parse(d)-Date.parse(dates[0]))/864e5),pd=Rc?Rc.dates:[],ob=Rc?Rc.obs[city]||[]:[];
110
+ const pf=(m,j)=>Rc&&Rc.F[m]&&Rc.F[m][city]?num(Rc.F[m][city][Lp-1][j]):NaN;
111
+ const pfus=j=>{if(liH<0||!Rc)return NaN;const use=ms.filter(m=>F[m]&&F[m][liH]&&fin(pf(m,j)));if(use.length<3)return NaN;const {bias,mse}=fit(liH,Lp,idx(pd[j]),use);const good=use.filter(m=>fin(mse[m])&&mse[m]>0&&fin(bias[m][c]));if(good.length<3)return NaN;let ws=0,f=0;good.forEach(m=>ws+=1/mse[m]);good.forEach(m=>f+=(1/mse[m])/ws*(pf(m,j)-bias[m][c]));return f};
112
+ const cell=(v,o)=>{if(!fin(v))return "<td>–</td>";if(!fin(o))return `<td>${v.toFixed(1)}</td>`;const e=v-o,k=Math.abs(e)<1?"g":Math.abs(e)<2?"y":"r";return `<td>${v.toFixed(1)}<span class="er ${k}">${e>=0?"+":""}${e.toFixed(1)}</span></td>`};
113
+ let h=`<tr><th>Model</th><th class="cu">RMSE to ${dates[dates.length-1].slice(5)}<br>${Lp}-day lead</th>`+pd.map((d,j)=>`<th class="${j===pd.length-1?"td":"pa"}">${j===pd.length-1?"TODAY":"−"+(pd.length-1-j)+"d"}<br>${d.slice(5)}</th>`).join("")+days.map((d,k)=>`<th class="fu">+${k+1}d<br>${d.slice(5)}</th>`).join("")+"</tr>";
114
+ if(Rc)h+=`<tr class="obr"><td>Observed</td><td class="cu"></td>${ob.map((v,j)=>`<td class="${j===pd.length-1?"td":""}">${fin(num(v))?v.toFixed(1)+(j===pd.length-1?"*":""):"–"}</td>`).join("")}${days.map(()=>"<td></td>").join("")}</tr>`;
115
+ h+=`<tr class="dwo"><td>Darwin-Prediction-Weather</td><td class="cu">${cv("darwin")}</td>${pd.map((d,j)=>cell(pfus(j),j===pd.length-1?NaN:num(ob[j]))).join("")}${fus.map(v=>`<td>${fin(v)?v.toFixed(1):"–"}</td>`).join("")}</tr>`;
116
+ ms.forEach(m=>h+=`<tr><td>${flag(MODELS[m][3],MODELS[m][4])}${MODELS[m][0]}</td><td class="cu">${cv(m)}</td>${pd.map((d,j)=>cell(pf(m,j),j===pd.length-1?NaN:num(ob[j]))).join("")}${days.map((d,k)=>{const v=num(OL.models[m][city][k+1]);return `<td>${fin(v)?v.toFixed(1):"–"}</td>`}).join("")}</tr>`);
117
+ $("otab").innerHTML=h;$("onote").textContent=`Forecasts issued ${OL.issued.replace("T"," ").replace("Z"," UTC")}, in °C. The large numbers are the Darwin-Prediction-Weather fusion; "± models" is half the spread between the public models, a guide to how settled the forecast is. Each of these forecasts is scored on the board above once the day is verified.${OL.recent?` Past days show the forecast issued ${Lp} day${Lp>1?"s":""} earlier and its error against the observed value; recent observed values are preliminary until ERA5 is published. * Today so far (${OL.recent.today_hours}:00 UTC).`:""}`}
118
  // bias and weights use only days whose truth was known before scoring day t (t-30 .. t-lead)
119
  function fit(li,D,t,ms){const w0=Math.max(0,t-30),t1=t-D;const bias={},mse={};
120
  for(const m of ms){bias[m]=[];let s2=0,n2=0;
 
127
  function run(li,t0,t1,ci){const key=[li,t0,t1,ci].join("|");if(memo[key])return memo[key];const D=LEADS[li];
128
  const cov={};let tot=0;for(let t=t0;t<=t1;t++)for(let c=0;c<NAMES.length;c++){if(ci>=0&&c!==ci)continue;if(!fin(num(O[c][t])))continue;tot++;for(const m of MK)if(F[m]&&F[m][li]&&fin(num(F[m][li][c][t])))cov[m]=(cov[m]||0)+1}
129
  const EL=MK.filter(m=>(cov[m]||0)>=Math.max(1,0.6*tot)&&tot>0),OUT=MK.filter(m=>!EL.includes(m));
130
+ const mk=()=>{const A={};return{A,add:(k,gs,e)=>{if(!fin(e))return;const a=A[k]||(A[k]={s:0,n:0,g:{}});a.s+=e*e;a.n++;for(const g of gs){const b=a.g[g]||(a.g[g]=[0,0]);b[0]+=e*e;b[1]++}}}},P=mk(),Q=mk();
131
+ // P: every common case (public models only). Q: the cases where the fusion also exists, so it is ranked on identical cases.
132
  for(let t=t0;t<=t1;t++){const {bias,mse}=fit(li,D,t,EL);const good=EL.filter(m=>fin(mse[m])&&mse[m]>0);let ws=0;good.forEach(m=>ws+=1/mse[m]);const mon=dates[t].slice(0,7);
133
  for(let c=0;c<NAMES.length;c++){if(ci>=0&&c!==ci)continue;const o=num(O[c][t]);if(!fin(o))continue;if(!EL.every(m=>fin(num(F[m][li][c][t]))))continue;
134
+ for(const m of EL)P.add(m,["c"+c,mon],num(F[m][li][c][t])-o);
135
  let fu=0,ok=good.length>=3&&good.length===EL.length;for(const m of good){const x=num(F[m][li][c][t])-bias[m][c];if(!fin(x)){ok=false;break}fu+=(1/mse[m])/ws*x}
136
+ if(ok){for(const m of EL)Q.add(m,["c"+c,mon],num(F[m][li][c][t])-o);Q.add("darwin",["c"+c,mon],fu-o)}}}
137
+ const A=Q.A.darwin?Q.A:P.A,ks=EL.filter(m=>A[m]).concat(A.darwin?["darwin"]:[]);
138
+ const rows=ks.map(m=>({m,r:Math.sqrt(A[m].s/A[m].n),n:A[m].n})).sort((a,b)=>a.r-b.r);let rk=0,prev=null;rows.forEach((x,i)=>{if(prev===null||x.r.toFixed(2)!==prev){rk=i+1;prev=x.r.toFixed(2)}x.rk=rk});
139
+ const pub=rows.filter(x=>x.m!=="darwin");
140
+ return memo[key]={rows,pub,A,OUT,dw:A.darwin?Math.sqrt(A.darwin.s/A.darwin.n):NaN,dn:A.darwin?A.darwin.n:0}}
141
  const grp=(A,k,g,min)=>A[k]&&A[k].g[g]&&A[k].g[g][1]>=min?Math.sqrt(A[k].g[g][0]/A[k].g[g][1]):NaN;
142
  function render(){
143
+ const D=+$("lead").value,li=LEADS.indexOf(D),per=$("period").value,ci=+$("city").value,t1=$("date").value==="latest"?dates.length-1:dates.indexOf($("date").value),n=per==="day"?1:(per==="ytd"?9999:+per),t0=Math.max(MIN,t1-n+1);
144
+ const R=run(li,t0,t1,ci),rows=R.rows,best=R.pub.length?R.pub[0].r:NaN,where=ci<0?"24 cities":NAMES[ci],span=t0===t1?dates[t1]:dates[t0]+" to "+dates[t1];
145
  $("stamp").innerHTML=`Verified through <b>${dates[dates.length-1]}</b> (ERA5)${gen?"<br>Updated "+gen:""}`;
146
+ $("h1").textContent=`Most accurate model: ${D}-day forecast, ${where}`;$("h2").textContent=`Accuracy board: ${D}-day forecast, ${span}, ${where}`;
147
  if(!rows.length){const e="<p class='note'>No verified cases yet for this selection.</p>";$("status").textContent="";$("champ").innerHTML=e;$("dwc").innerHTML=e;$("bars").innerHTML=e;$("tick").textContent=`${D}-day forecasts are being archived and will appear here as their target days are verified.`}
148
  else{
149
+ $("status").textContent=`All models scored as issued, on the cases every listed model covers.${R.OUT.length?" Not listed for this selection (insufficient coverage): "+R.OUT.map(m=>MODELS[m][0]).join(", ")+".":""}${rows[0].n<30?" Small sample: results for a single day or city vary widely.":""}`;
150
+ const c=rows[0],M=inf(c.m);
151
  $("champ").innerHTML=`<div class="champ"><div class="medal">1</div><div><div class="cn">${M[0]}</div><div class="sub" style="margin:6px 0">${flag(M[3],M[4])}${M[1]} &nbsp; ${tyb(c.m)}</div><div class="big">${c.r.toFixed(2)}<small>°C RMSE</small></div><div class="sub">${c.n.toLocaleString()} verified forecasts, ${span}</div></div></div>`+
152
+ `<div class="run">${rows.slice(1,3).map(x=>`<div class="rn"><div class="k">NO. ${x.rk}</div><div class="v">${inf(x.m)[0]}</div><div class="sub">${flag(inf(x.m)[3],inf(x.m)[4])}${x.r.toFixed(2)} °C</div></div>`).join("")}</div>`;
153
  $("dwc").innerHTML=fin(R.dw)?`<div class="sub" style="margin-bottom:6px">${flag("kr","South Korea")}VIDRAFT &nbsp; <span class="ty ai">AI</span> &nbsp; fusion engine</div><div class="big">${R.dw.toFixed(2)}<small>°C RMSE</small></div><div class="gain">${R.dw<best?((1-R.dw/best)*100).toFixed(1)+"% lower error than the best public model":"Level with the best public model"}</div><div class="sub" style="margin-top:10px">${R.dn.toLocaleString()} verified forecasts, ${D}-day lead</div>`:"<p class='note'>Fusion needs at least three models with 30 days of history for this selection.</p>";
154
+ const mx=Math.max(...rows.map(x=>x.r));let h="";
155
+ rows.forEach(x=>{const M=inf(x.m),d=x.m==="darwin";h+=`<div class="bar ${x.rk===1?"f":""} ${d?"dwr":""}"><div class="rk">${x.rk}</div><div class="nm">${M[0]}<span class="d">${flag(M[3],M[4])}${M[1]} &nbsp; ${tyb(x.m)}${d?" &nbsp; fusion":""}</span></div><div class="trk"><i style="width:${x.r/mx*100}%;background:${d?"linear-gradient(90deg,#35d0ff,#9be9ff)":M[5]}"></i></div><div class="val">${x.r.toFixed(2)}</div></div>`});
 
156
  $("bars").innerHTML=h;
157
+ const tk=`<b>${D}-DAY FORECAST</b> · ${span} · ${where} &nbsp;&nbsp;`+rows.map(x=>x.m==="darwin"?`<em>#${x.rk}</em> <b>DARWIN-PREDICTION-WEATHER ${x.r.toFixed(2)}°C</b>`:`<em>#${x.rk}</em> ${MODELS[x.m][0]} ${x.r.toFixed(2)}°C`).join(" &nbsp;•&nbsp; ")+" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
158
  $("tick").innerHTML=tk+tk;
159
  }
160
+ // champions at a glance (independent of the period and city selectors)
161
+ const last=dates.length-1,SH={darwin:"Darwin",ecmwf_ifs025:"ECMWF IFS",ecmwf_aifs025_single:"ECMWF AIFS",gfs_seamless:"GFS",ncep_aigfs025:"AIGFS",icon_seamless:"ICON",jma_seamless:"JMA",gem_seamless:"GEM",metno_seamless:"MET Nordic"},seen={};
162
+ const wc=(m,v)=>{if(!m)return '<td class="e">–</td>';seen[m]=1;return `<td class="w" style="background:${inf(m)[5]}">${SH[m]}<small>${v.toFixed(2)}°</small></td>`},LA=LEADS.map((L,i)=>i).filter(i=>MK.some(m=>F[m]&&F[m][i]&&F[m][i][0].some(v=>v!==null&&v!==undefined)));
163
+ const hd="<tr><th></th>"+LA.map(i=>`<th>${LEADS[i]}-day</th>`).join("")+"</tr>";
164
+ $("wper").innerHTML=hd+[["Latest day",1],["Last 7 days",7],["Last 30 days",30],["Last 90 days",90],["2026 year to date",9999]].map(([nm,n])=>`<tr><td>${nm}</td>${LA.map(i=>{const r=run(i,Math.max(MIN,last-n+1),last,-1).rows[0];return r?wc(r.m,r.r):wc(null)}).join("")}</tr>`).join("");
165
+ $("wcity").innerHTML=hd+NAMES.map((c,ci2)=>`<tr><td>${c}</td>${LA.map(i=>{const Y=run(i,MIN,last,-1);let bm=null,bv=1e9;Y.rows.forEach(x=>{const v=grp(Y.A,x.m,"c"+ci2,30);if(fin(v)&&v<bv){bv=v;bm=x.m}});return wc(bm,bv)}).join("")}</tr>`).join("");
166
+ $("lg3").innerHTML=["darwin"].concat(MK).filter(m=>seen[m]).map(m=>`<span><i style="background:${inf(m)[5]}"></i>${inf(m)[0]}</span>`).join("");
167
  // error by forecast day
168
  const cur=LEADS.map((L,i)=>run(i,t0,t1,ci)),act=LEADS.map((L,i)=>cur[i].rows.length?i:-1).filter(i=>i>=0),W=520,H=260,pl=38,pb=28,pt=10,pr=10;
169
  if(act.length>1){const ymax=Math.max(...act.flatMap(i=>cur[i].rows.map(x=>x.r)))*1.08,X=i=>pl+(W-pl-pr)*(act.indexOf(i)/(act.length-1)),Y=v=>pt+(H-pt-pb)*(1-v/ymax);let s=`<svg viewBox="0 0 ${W} ${H}" role="img" aria-label="RMSE by forecast day">`;
 
178
  for(let l=-150;l<=150;l+=30)ms+=`<line x1="${px(l)}" x2="${px(l)}" y1="0" y2="${mh}" stroke="#16335f"/>`;for(let l=60;l>=-30;l-=30)ms+=`<line x1="0" x2="${mw}" y1="${py(l)}" y2="${py(l)}" stroke="${l===0?"#2a5596":"#16335f"}"/>`;
179
  ms+=`<text x="4" y="${py(0)-4}" fill="#5f7fb3" font-size="9">EQUATOR</text>`;const used={};
180
  NAMES.forEach((c,i)=>{let bm=null,bv=1e9;RA.rows.forEach(x=>{const v=grp(RA.A,x.m,"c"+i,Math.min(5,t1-t0+1));if(fin(v)&&v<bv){bv=v;bm=x.m}});if(!bm)return;used[bm]=1;const x=px(CITIES[c][1]),y=py(CITIES[c][0]),left=x>mw-90;
181
+ ms+=`<circle cx="${x}" cy="${y}" r="6.5" fill="${inf(bm)[5]}" stroke="#061226" stroke-width="1.5"><title>${c}: ${inf(bm)[0]} ${bv.toFixed(2)} °C</title></circle><text x="${left?x-9:x+9}" y="${y+3.5}" fill="#dbe7fb" font-size="9.5" font-weight="600" text-anchor="${left?"end":"start"}">${c}</text>`});
182
+ $("map").innerHTML=ms+"</svg>";$("lg2").innerHTML=["darwin"].concat(MK).filter(m=>used[m]).map(m=>`<span><i style="background:${inf(m)[5]}"></i>${inf(m)[0]}</span>`).join("")||"No verified cases yet.";
183
  // monthly champions over the whole record for this lead
184
  const RY=run(li,MIN,dates.length-1,-1),months=[...new Set(dates.slice(MIN).map(d=>d.slice(0,7)))];$("h3").textContent=`Monthly champions 2026: ${D}-day forecast, 24 cities`;
185
+ $("mo").innerHTML=months.map(mo=>{let bm=null,bv=1e9;RY.rows.forEach(x=>{const v=grp(RY.A,x.m,mo,100);if(fin(v)&&v<bv){bv=v;bm=x.m}});const nm=new Date(mo+"-15").toLocaleString("en",{month:"short"}).toUpperCase();
186
+ return bm?`<div class="mc" style="border-top-color:${inf(bm)[5]}"><div class="m">${nm}</div><div class="w">${inf(bm)[0]}</div><div class="e">${bv.toFixed(2)} °C</div></div>`:""}).join("")||"<p class='note'>No verified months yet for this lead.</p>";
187
  }
188
+ load().then(()=>{LEADS.forEach(d=>$("lead").insertAdjacentHTML("beforeend",`<option value="${d}"${d===7?" selected":""}>${d} day${d>1?"s":""} ahead</option>`));NAMES.forEach((c,i)=>$("city").insertAdjacentHTML("beforeend",`<option value="${i}">${c}</option>`));
189
+ $("date").insertAdjacentHTML("beforeend",`<option value="latest" selected>Today · latest (${dates[dates.length-1]})</option>`);for(let i=dates.length-1;i>=MIN;i--)$("date").insertAdjacentHTML("beforeend",`<option>${dates[i]}</option>`);
190
  NAMES.forEach((c,i)=>$("ocity").insertAdjacentHTML("beforeend",`<option value="${i}">${c}</option>`));$("ocity").onchange=outlook;
191
+ ["lead","period","date","city"].forEach(id=>$(id).onchange=()=>{render();if(id==="city"&&+$("city").value>=0)$("ocity").value=$("city").value;outlook()});render();outlook()}).catch(e=>{$("status").textContent="Could not load data. Please reload in a moment.";console.error(e)});
192
  </script></body></html>