SeaWolf-AI commited on
Commit
3e3d59c
·
verified ·
1 Parent(s): 4803ea6

Year-to-date ranking on common cases

Browse files
Files changed (1) hide show
  1. index.html +13 -9
index.html CHANGED
@@ -18,15 +18,15 @@ tr.dw td{background:var(--dw);font-weight:600}tr.first td:first-child{color:var(
18
  <p class="sub">Which public forecast model was most accurate? Daily maximum 2 m temperature across 24 world cities, scored against ERA5.</p>
19
  <div class="bar">
20
  <label>Forecast lead<select id="lead"><option value="1">1 day ahead</option><option value="3" selected>3 days ahead</option><option value="5">5 days ahead</option><option value="7">7 days ahead</option></select></label>
21
- <label>Period<select id="period"><option value="day">Single day</option><option value="7">Last 7 days</option><option value="14" selected>Last 14 days</option></select></label>
22
  <label>Verification date<select id="date"></select></label>
23
  <label>City<select id="city"><option value="-1">All 24 cities</option></select></label>
24
  </div>
25
  <div id="status">Loading forecasts and observations…</div>
26
  <div class="card"><h2 id="t1">Ranking</h2><table id="tbl"></table></div>
27
  <div class="card"><h2>How it is scored</h2>
28
- <p style="margin:0;color:var(--mut)">Each model's forecast issued N days earlier is compared with the ERA5 daily maximum for the same UTC day at each city. Lower RMSE ranks higher. ERA5 is published about five days after the fact, so the latest verification date trails today. <b>Darwin-Prediction-Weather</b> is VIDRAFT's fusion engine: local bias correction plus skill-weighted fusion of the eight models, fitted only on days before the one being scored. It is shown alongside the ranking and is not ranked among the public models.</p></div>
29
- <footer>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>.</footer>
30
  </main><script>
31
  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]};
32
  const MODELS={"ecmwf_ifs025":["ECMWF IFS","ECMWF"],"ecmwf_aifs025_single":["ECMWF AIFS","ECMWF (AI)"],"gfs_seamless":["GFS","NOAA NCEP"],"ncep_aigfs025":["AIGFS","NOAA NCEP (AI)"],"icon_seamless":["ICON","DWD Germany"],"jma_seamless":["JMA GSM","JMA Japan"],"gem_seamless":["GEM","ECCC Canada"],"metno_seamless":["MET Nordic / IFS","MET Norway"]};
@@ -51,7 +51,7 @@ async function load(){
51
  }
52
  const num=v=>(v===null||v===undefined)?NaN:v,fin=Number.isFinite;
53
  // bias and weights use only days whose truth was known before scoring day t (t-30 .. t-lead)
54
- function fit(li,D,t){const ms=MK.filter(m=>F[m]),w0=Math.max(0,t-30),t1=t-D;const bias={},mse={};
55
  for(const m of ms){bias[m]=[];let s2=0,n2=0;
56
  for(let c=0;c<NAMES.length;c++){let s=0,n=0;for(let d=w0;d<=t1;d++){const e=num(F[m][li][c][d])-num(O[c][d]);if(fin(e)){s+=e;n++}}bias[m][c]=n>=7?s/n:NaN}
57
  for(let c=0;c<NAMES.length;c++)for(let d=w0;d<=t1;d++){const e=num(F[m][li][c][d])-bias[m][c]-num(O[c][d]);if(fin(e)){s2+=e*e;n2++}}
@@ -59,11 +59,15 @@ function fit(li,D,t){const ms=MK.filter(m=>F[m]),w0=Math.max(0,t-30),t1=t-D;cons
59
  return{ms,bias,mse}}
60
  function render(){
61
  const D=+$("lead").value,li=LEADS.indexOf(D),per=$("period").value,ci=+$("city").value;
62
- const t1=dates.indexOf($("date").value),n=per==="day"?1:+per,se={},cnt={};const add=(k,e)=>{if(fin(e)){se[k]=(se[k]||0)+e*e;cnt[k]=(cnt[k]||0)+1}};
63
  const t0=Math.max(MIN,t1-n+1);
64
- for(let t=t0;t<=t1;t++){const {ms,bias,mse}=fit(li,D,t);const good=ms.filter(m=>fin(mse[m])&&mse[m]>0);let ws=0;good.forEach(m=>ws+=1/mse[m]);
65
- for(let c=0;c<NAMES.length;c++){if(ci>=0&&c!==ci)continue;const o=num(O[c][t]);if(!fin(o))continue;let fu=0,ok=good.length>=3;
66
- for(const m of ms){const x=num(F[m][li][c][t]);add(m,x-o)}
 
 
 
 
67
  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}
68
  if(ok)add("darwin",fu-o)}}
69
  const rows=MK.filter(m=>cnt[m]).map(m=>({m,r:Math.sqrt(se[m]/cnt[m]),n:cnt[m]})).sort((a,b)=>a.r-b.r);
@@ -74,7 +78,7 @@ function render(){
74
  h+=`<tr class="${rk===1?"first":""}"><td>${rk}</td><td>${MODELS[x.m][0]}</td><td>${MODELS[x.m][1]}</td><td>${x.r.toFixed(2)}</td><td>${i?"+"+((x.r/best-1)*100).toFixed(1)+"%":"best"}</td><td>${x.n}</td></tr>`});
75
  $("tbl").innerHTML=h;
76
  $("t1").textContent=`Ranking: ${D}-day forecasts, ${t0===t1?dates[t1]:dates[t0]+" to "+dates[t1]}, ${ci<0?"24 cities":NAMES[ci]}`;
77
- $("status").textContent=rows.length?`Verified through ${dates[dates.length-1]} (ERA5). Public models scored as issued.${rows[0].n<30?" Small sample: results for a single day or city vary widely.":""}`:"No verified cases for this selection."}
78
  load().then(()=>{NAMES.forEach((c,i)=>$("city").insertAdjacentHTML("beforeend",`<option value="${i}">${c}</option>`));
79
  for(let i=dates.length-1;i>=MIN;i--)$("date").insertAdjacentHTML("beforeend",`<option>${dates[i]}</option>`);
80
  ["lead","period","date","city"].forEach(id=>$(id).onchange=render);render()}).catch(e=>{$("status").textContent="Could not load data. Please reload in a moment."});
 
18
  <p class="sub">Which public forecast model was most accurate? Daily maximum 2 m temperature across 24 world cities, scored against ERA5.</p>
19
  <div class="bar">
20
  <label>Forecast lead<select id="lead"><option value="1">1 day ahead</option><option value="3" selected>3 days ahead</option><option value="5">5 days ahead</option><option value="7">7 days ahead</option></select></label>
21
+ <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>
22
  <label>Verification date<select id="date"></select></label>
23
  <label>City<select id="city"><option value="-1">All 24 cities</option></select></label>
24
  </div>
25
  <div id="status">Loading forecasts and observations…</div>
26
  <div class="card"><h2 id="t1">Ranking</h2><table id="tbl"></table></div>
27
  <div class="card"><h2>How it is scored</h2>
28
+ <p style="margin:0;color:var(--mut)">Each model's forecast issued N days earlier is compared with the ERA5 daily maximum 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. ERA5 is published about five days after the fact, so the latest verification date trails today. <b>Darwin-Prediction-Weather</b> is VIDRAFT's fusion engine: local bias correction plus skill-weighted fusion of the eight models, fitted only on days before the one being scored. It is shown alongside the ranking and is not ranked among the public models.</p></div>
29
+ <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>.</footer>
30
  </main><script>
31
  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]};
32
  const MODELS={"ecmwf_ifs025":["ECMWF IFS","ECMWF"],"ecmwf_aifs025_single":["ECMWF AIFS","ECMWF (AI)"],"gfs_seamless":["GFS","NOAA NCEP"],"ncep_aigfs025":["AIGFS","NOAA NCEP (AI)"],"icon_seamless":["ICON","DWD Germany"],"jma_seamless":["JMA GSM","JMA Japan"],"gem_seamless":["GEM","ECCC Canada"],"metno_seamless":["MET Nordic / IFS","MET Norway"]};
 
51
  }
52
  const num=v=>(v===null||v===undefined)?NaN:v,fin=Number.isFinite;
53
  // bias and weights use only days whose truth was known before scoring day t (t-30 .. t-lead)
54
+ function fit(li,D,t,ms){w0=Math.max(0,t-30),t1=t-D;const bias={},mse={};
55
  for(const m of ms){bias[m]=[];let s2=0,n2=0;
56
  for(let c=0;c<NAMES.length;c++){let s=0,n=0;for(let d=w0;d<=t1;d++){const e=num(F[m][li][c][d])-num(O[c][d]);if(fin(e)){s+=e;n++}}bias[m][c]=n>=7?s/n:NaN}
57
  for(let c=0;c<NAMES.length;c++)for(let d=w0;d<=t1;d++){const e=num(F[m][li][c][d])-bias[m][c]-num(O[c][d]);if(fin(e)){s2+=e*e;n2++}}
 
59
  return{ms,bias,mse}}
60
  function render(){
61
  const D=+$("lead").value,li=LEADS.indexOf(D),per=$("period").value,ci=+$("city").value;
62
+ const t1=dates.indexOf($("date").value),n=per==="day"?1:(per==="ytd"?9999:+per),se={},cnt={};const add=(k,e)=>{if(fin(e)){se[k]=(se[k]||0)+e*e;cnt[k]=(cnt[k]||0)+1}};
63
  const t0=Math.max(MIN,t1-n+1);
64
+ 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]&&fin(num(F[m][li][c][t])))cov[m]=(cov[m]||0)+1}
65
+ const EL=MK.filter(m=>(cov[m]||0)>=0.6*tot&&tot>0),OUT=MK.filter(m=>!EL.includes(m));
66
+ 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]);
67
+ for(let c=0;c<NAMES.length;c++){if(ci>=0&&c!==ci)continue;const o=num(O[c][t]);if(!fin(o))continue;
68
+ if(!EL.every(m=>fin(num(F[m][li][c][t]))))continue;
69
+ for(const m of EL)add(m,num(F[m][li][c][t])-o);
70
+ let fu=0,ok=good.length>=3&&good.length===EL.length;
71
  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}
72
  if(ok)add("darwin",fu-o)}}
73
  const rows=MK.filter(m=>cnt[m]).map(m=>({m,r:Math.sqrt(se[m]/cnt[m]),n:cnt[m]})).sort((a,b)=>a.r-b.r);
 
78
  h+=`<tr class="${rk===1?"first":""}"><td>${rk}</td><td>${MODELS[x.m][0]}</td><td>${MODELS[x.m][1]}</td><td>${x.r.toFixed(2)}</td><td>${i?"+"+((x.r/best-1)*100).toFixed(1)+"%":"best"}</td><td>${x.n}</td></tr>`});
79
  $("tbl").innerHTML=h;
80
  $("t1").textContent=`Ranking: ${D}-day forecasts, ${t0===t1?dates[t1]:dates[t0]+" to "+dates[t1]}, ${ci<0?"24 cities":NAMES[ci]}`;
81
+ $("status").textContent=rows.length?`Verified through ${dates[dates.length-1]} (ERA5). Public models scored as issued, on the cases every listed model covers.${OUT.length?" Not listed for this selection (insufficient coverage): "+OUT.map(m=>MODELS[m][0]).join(", ")+".":""}${rows[0].n<30?" Small sample: results for a single day or city vary widely.":""}`:"No verified cases for this selection."}
82
  load().then(()=>{NAMES.forEach((c,i)=>$("city").insertAdjacentHTML("beforeend",`<option value="${i}">${c}</option>`));
83
  for(let i=dates.length-1;i>=MIN;i--)$("date").insertAdjacentHTML("beforeend",`<option>${dates[i]}</option>`);
84
  ["lead","period","date","city"].forEach(id=>$(id).onchange=render);render()}).catch(e=>{$("status").textContent="Could not load data. Please reload in a moment."});