Live Earth: wind default, clouds, city champions map; stronger button; model links
Browse files- index.html +30 -23
index.html
CHANGED
|
@@ -12,7 +12,13 @@ body{margin:0;color:var(--ink);font:15px/1.45 "Segoe UI",system-ui,-apple-system
|
|
| 12 |
.brand{font-weight:800;letter-spacing:.06em;font-size:17px;text-transform:uppercase}.brand b{color:var(--cy)}
|
| 13 |
.live{display:inline-flex;align-items:center;gap:6px;background:var(--red);color:#fff;font-weight:800;font-size:11px;letter-spacing:.1em;padding:3px 9px;border-radius:4px}
|
| 14 |
.live i{width:7px;height:7px;border-radius:50%;background:#fff;animation:bl 1.2s infinite}@keyframes bl{50%{opacity:.25}}
|
| 15 |
-
.le{display:inline-flex;align-items:center;gap:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
.mdl{position:fixed;inset:0;background:rgba(2,6,14,.82);z-index:50;display:flex;align-items:center;justify-content:center;padding:14px}.mdl[hidden]{display:none}
|
| 17 |
.mbox{width:min(1200px,100%);height:min(780px,100%);background:#061226;border:1px solid var(--cy);border-radius:14px;display:flex;flex-direction:column;overflow:hidden}
|
| 18 |
.mhd{display:flex;align-items:center;gap:12px;padding:10px 14px;background:linear-gradient(90deg,#0b2a5c,#0a1c3a);border-bottom:1px solid var(--line);flex-wrap:wrap}.mhd b{letter-spacing:.1em}
|
|
@@ -20,7 +26,7 @@ body{margin:0;color:var(--ink);font:15px/1.45 "Segoe UI",system-ui,-apple-system
|
|
| 20 |
.mx{margin-left:auto;font-size:24px;line-height:1;color:var(--ink);background:none;border:0;cursor:pointer;padding:0 6px}
|
| 21 |
.mbody{flex:1;position:relative;min-height:0}#lmap,#wfr{position:absolute;inset:0;width:100%;height:100%;border:0;background:#030912}#lmap[hidden],#wfr[hidden]{display:none}
|
| 22 |
.mft{padding:7px 14px;font-size:11px;color:var(--mut);border-top:1px solid var(--line)}.mft a{color:var(--cy)}
|
| 23 |
-
.
|
| 24 |
.stamp{margin-left:auto;color:var(--mut);font-size:13px;text-align:right}.stamp b{color:var(--ink)}
|
| 25 |
.tick{background:#040b18;border-bottom:1px solid var(--line);overflow:hidden;white-space:nowrap;font-size:13px;font-weight:600}
|
| 26 |
.tick span{display:inline-block;padding:7px 0;animation:mq 45s linear infinite}.tick b{color:var(--gold)}.tick em{color:var(--cy);font-style:normal}
|
|
@@ -52,15 +58,15 @@ svg{width:100%;height:auto;display:block}.lg{display:flex;flex-wrap:wrap;gap:6px
|
|
| 52 |
@media(max-width:700px){.ol{grid-template-columns:repeat(5,minmax(0,1fr))}}
|
| 53 |
.tw{overflow-x:auto;scrollbar-color:#2a5596 #0a1c3a;scrollbar-width:thin}.tw::-webkit-scrollbar{height:8px}.tw::-webkit-scrollbar-track{background:#0a1c3a;border-radius:4px}.tw::-webkit-scrollbar-thumb{background:#2a5596;border-radius:4px}.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 td .ty{margin-left:6px;font-size:9px}.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}.wl{display:block;font-size:10px;font-weight:800}.ot td.fc{color:var(--cy);font-weight:700}.win{display:block;font-size:9px;font-weight:900;letter-spacing:.12em;color:#3a2a00;background:linear-gradient(180deg,#ffe08a,#ffc83d);border-radius:4px;padding:1px 5px;margin:0 0 3px auto;width:max-content}.ot td.wn1{background:rgba(255,200,61,.12);box-shadow:inset 0 0 0 1px rgba(255,200,61,.6);border-radius:6px}.er.g{color:#7be495}.er.y{color:#ffd166}.er.r{color:#ff6b7d}
|
| 54 |
.h3{margin:0 0 8px;font-size:13px;font-weight:700;color:var(--ink)}.wt{border-collapse:separate;border-spacing:5px;width:100%;min-width:760px;font-size:12px}.wt th{color:var(--mut);font-size:11px;letter-spacing:.1em;text-transform:uppercase;padding:4px 6px;text-align:left;white-space:nowrap;font-weight:800}.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{background:rgba(4,11,24,.5);border:1px solid var(--line);border-left:4px solid var(--cy);border-radius:8px;padding:7px 9px;white-space:nowrap}.wt td.w.dwn{background:linear-gradient(160deg,rgba(255,200,61,.16),rgba(4,11,24,.5) 70%);border-color:rgba(255,200,61,.55)}.wn{font-weight:800;font-size:13px;color:var(--ink)}.wm{display:flex;align-items:center;gap:8px;margin-top:4px}.wm b{font-size:13px;color:var(--ink)}.wt td.w.dwn .wm b{color:var(--gold)}.wt td.e{text-align:center;color:var(--mut)}
|
| 55 |
-
.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}
|
| 56 |
</style>
|
| 57 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.min.css">
|
| 58 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.min.js" defer></script></head><body>
|
| 59 |
-
<div class="top"><span class="live"><i></i>LIVE</span><span class="brand">Global Weather Model <b>Leaderboard</b></span><button class="le" id="lebtn" type="button"><i></i>LIVE EARTH</button><span class="stamp" id="stamp">Loading…</span></div>
|
| 60 |
<div class="tick"><span id="tick">Loading the latest verification…</span></div>
|
| 61 |
<div class="mdl" id="mdl" hidden><div class="mbox" role="dialog" aria-modal="true" aria-label="Live Earth">
|
| 62 |
<div class="mhd"><span class="live"><i></i>LIVE</span><b>LIVE EARTH</b>
|
| 63 |
-
<div class="mtabs"><button type="button" class="mt on" data-t="
|
| 64 |
<button type="button" class="mx" id="mclose" aria-label="Close">×</button></div>
|
| 65 |
<div class="mbody"><div id="lmap"></div><iframe id="wfr" title="Live weather map" hidden></iframe></div>
|
| 66 |
<div class="mft" id="mft"></div></div></div>
|
|
@@ -98,6 +104,8 @@ const DW=["Darwin-Prediction-Weather","VIDRAFT","AI","kr","South Korea","#ffc83d
|
|
| 98 |
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"]};
|
| 99 |
let LEADS=[1,3,5,7];const NAMES=Object.keys(CITIES),MK=Object.keys(MODELS),DAYS=50,LAG=6,MIN=31,DWC="#ffffff";
|
| 100 |
const flag=(cc,nm)=>`<img class="fl" src="https://flagcdn.com/w40/${cc}.png" alt="${nm}" title="${nm}" width="20" height="14">`;
|
|
|
|
|
|
|
| 101 |
const inf=m=>m==="darwin"?DW:MODELS[m];
|
| 102 |
const tyb=m=>`<span class="ty ${inf(m)[2]==="AI"?"ai":"ph"}">${inf(m)[2]==="AI"?"AI":"Physics (Supercomputer)"}</span>`;
|
| 103 |
const $=id=>document.getElementById(id),iso=d=>d.toISOString().slice(0,10);
|
|
@@ -142,8 +150,8 @@ function outlook(){if(!OL){$("otiles").innerHTML="";$("otab").innerHTML="";$("on
|
|
| 142 |
const cell=(v,o,w)=>{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 class="${w?"wn1":""}">${w?'<span class="win">WIN</span>':""}${v.toFixed(1)}<span class="er ${k}">${e>=0?"+":""}${e.toFixed(1)}</span></td>`};
|
| 143 |
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>";
|
| 144 |
if(Rc)h+=`<tr class="obr"><td>Actual temperature</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>`;
|
| 145 |
-
h+=`<tr class="dwo"><td>${flag("kr","South Korea")}
|
| 146 |
-
ms.forEach(m=>h+=`<tr><td>${flag(MODELS[m][3],MODELS[m][4])}${
|
| 147 |
$("otab").innerHTML=h;
|
| 148 |
$("onote").textContent=`Forecasts issued ${iss}, in °C. The large numbers are the Darwin-Prediction-Weather forecast; "± models" is half the spread between the models, a guide to how settled the forecast is.${Rc?` "Actual temperature" is what really happened. Past days show each forecast issued ${Lp} day${Lp>1?"s":""} earlier and, in colour, how far it was from the actual temperature. Recent actual values are preliminary until ERA5 is published. * Today so far (${Rc.today_hours}:00 UTC). WIN marks the closest forecast of each day; days ahead receive their WIN when the actual temperature is in.${Object.keys(wcount).length?" Wins in the last "+wins.filter(Boolean).length+" days: "+Object.entries(wcount).sort((a,b)=>b[1]-a[1]).map(([m,n])=>inf(m)[0]+" "+n).join(", ")+".":""}`:""}`}
|
| 149 |
// bias and weights use only days whose truth was known before scoring day t (t-30 .. t-lead)
|
|
@@ -179,19 +187,19 @@ function render(){
|
|
| 179 |
else{
|
| 180 |
$("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.":""}`;
|
| 181 |
const c=rows[0],M=inf(c.m);
|
| 182 |
-
$("champ").innerHTML=`<div class="champ"><div class="medal">1</div><div><div class="cn">${
|
| 183 |
-
`<div class="run">${rows.slice(1,3).map(x=>`<div class="rn"><div class="k">NO. ${x.rk}</div><div class="v">${
|
| 184 |
-
const bAI=rows.find(x=>inf(x.m)[2]==="AI"),bPH=rows.find(x=>inf(x.m)[2]!=="AI"),vs=(x,lab)=>x?`<div class="rn" style="margin-bottom:10px"><div class="k">BEST ${lab} · NO. ${x.rk} OVERALL</div><div class="v">${
|
| 185 |
$("dwc").innerHTML=vs(bAI,"AI")+vs(bPH,"PHYSICS (SUPERCOMPUTER)")+(bAI&&bPH?`<div class="gain">${bAI.r<bPH.r?"AI leads by "+((1-bAI.r/bPH.r)*100).toFixed(1)+"%":"Physics leads by "+((1-bPH.r/bAI.r)*100).toFixed(1)+"%"}</div><div class="sub" style="margin-top:10px">${rows.filter(x=>inf(x.m)[2]==="AI").length} AI models and ${rows.filter(x=>inf(x.m)[2]!=="AI").length} physics models on this board</div>`:"");
|
| 186 |
const mx=Math.max(...rows.map(x=>x.r));let h="";
|
| 187 |
-
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">${
|
| 188 |
$("bars").innerHTML=h;
|
| 189 |
const tk=`<b>${D}-DAY FORECAST</b> · ${span} · ${where} `+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(" • ")+" ";
|
| 190 |
$("tick").innerHTML=tk+tk;
|
| 191 |
}
|
| 192 |
// champions at a glance (independent of the period and city selectors)
|
| 193 |
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={};
|
| 194 |
-
const wc=(m,v)=>{if(!m)return '<td class="e">–</td>';seen[m]=1;const M=inf(m);return `<td class="w ${m==="darwin"?"dwn":""}" style="border-left-color:${M[5]}"><div class="wn">${flag(M[3],M[4])}${SH[m]}</div><div class="wm"><span class="ty ${M[2]==="AI"?"ai":"ph"}">${M[2]==="AI"?"AI":"Physics"}</span><b>${v.toFixed(2)}°</b></div></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)));
|
| 195 |
const hd="<tr><th></th>"+LA.map(i=>`<th>${LEADS[i]}-day</th>`).join("")+"</tr>";
|
| 196 |
$("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("");
|
| 197 |
$("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("");
|
|
@@ -219,21 +227,20 @@ function render(){
|
|
| 219 |
}
|
| 220 |
// LIVE EARTH: satellite (NASA GIBS) + rain radar (RainViewer) + city pins on our own map, and live wind / rain / temperature maps
|
| 221 |
let LM=null;const G="https://gibs.earthdata.nasa.gov/wmts/epsg3857/best/";
|
| 222 |
-
async function liveMap(){if(LM){setTimeout(()=>LM.invalidateSize(),60);return}if(!window.L){$("mft").textContent="Map library is still loading. Please try again in a moment.";return}
|
| 223 |
LM=L.map("lmap",{center:[25,125],zoom:3,minZoom:2,maxZoom:7,worldCopyJump:true,attributionControl:false});
|
| 224 |
-
L.tileLayer(G+"BlueMarble_NextGeneration/default/default/GoogleMapsCompatible_Level8/{z}/{y}/{x}.jpeg",{maxNativeZoom:8}).addTo(LM);
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
$("mft").innerHTML=`Satellite: infrared cloud imagery from Himawari, GOES-West and GOES-East, updated every 10 minutes. Rain radar${LM._rv?" at "+LM._rv:""}. Pins: the most accurate model in each city; click a pin. We acknowledge the use of imagery provided by services from NASA's Global Imagery Browse Services (GIBS), part of NASA's Earth Science Data and Information System (ESDIS). Weather data by <a href="https://www.rainviewer.com/" target="_blank" rel="noopener">RainViewer</a>.`}
|
| 232 |
function liveTab(t){document.querySelectorAll(".mt").forEach(b=>b.classList.toggle("on",b.dataset.t===t));const f=$("wfr");
|
| 233 |
if(t==="sat"){f.hidden=true;$("lmap").hidden=false;liveMap()}
|
| 234 |
-
else{$("lmap").hidden=true;f.hidden=false;const ov={wind:"wind",rain:"radar",temp:"temp"}[t];f.src=`https://embed.windy.com/embed.html?type=map&location=coordinates&metricRain=mm&metricTemp=%C2%B0C&metricWind=m%2Fs&zoom=3&overlay=${ov}&product=${t==="rain"?"radar":"ecmwf"}&level=surface&lat=25&lon=125`;
|
| 235 |
$("mft").innerHTML='Live map by <a href="https://www.windy.com/" target="_blank" rel="noopener">Windy.com</a>.'}}
|
| 236 |
-
function liveOpen(){$("mdl").hidden=false;document.body.style.overflow="hidden";liveTab("
|
| 237 |
function liveClose(){$("mdl").hidden=true;document.body.style.overflow="";$("wfr").src="about:blank"}
|
| 238 |
load().then(()=>{$("lebtn").onclick=liveOpen;$("mclose").onclick=liveClose;$("mdl").onclick=e=>{if(e.target===$("mdl"))liveClose()};document.addEventListener("keydown",e=>{if(e.key==="Escape"&&!$("mdl").hidden)liveClose()});document.querySelectorAll(".mt").forEach(b=>b.onclick=()=>liveTab(b.dataset.t));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>`));
|
| 239 |
$("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>`);
|
|
|
|
| 12 |
.brand{font-weight:800;letter-spacing:.06em;font-size:17px;text-transform:uppercase}.brand b{color:var(--cy)}
|
| 13 |
.live{display:inline-flex;align-items:center;gap:6px;background:var(--red);color:#fff;font-weight:800;font-size:11px;letter-spacing:.1em;padding:3px 9px;border-radius:4px}
|
| 14 |
.live i{width:7px;height:7px;border-radius:50%;background:#fff;animation:bl 1.2s infinite}@keyframes bl{50%{opacity:.25}}
|
| 15 |
+
.le{position:relative;display:inline-flex;align-items:center;gap:10px;font:inherit;font-weight:900;font-size:14px;letter-spacing:.1em;color:#04121f;background:linear-gradient(180deg,#b5f0ff 0%,#35d0ff 45%,#1aa6e0 100%);border:1px solid #d9f7ff;border-radius:12px;padding:10px 18px 10px 12px;cursor:pointer;box-shadow:0 4px 0 #0b6f9c,0 8px 22px rgba(53,208,255,.55);transition:transform .08s,box-shadow .08s,filter .15s;animation:lep 2.2s ease-in-out infinite;overflow:hidden}
|
| 16 |
+
.le:hover{filter:brightness(1.12);transform:translateY(-1px);box-shadow:0 5px 0 #0b6f9c,0 12px 28px rgba(53,208,255,.75)}.le:active{transform:translateY(3px);box-shadow:0 1px 0 #0b6f9c,0 3px 10px rgba(53,208,255,.5)}.le:focus-visible{outline:3px solid #fff;outline-offset:3px}
|
| 17 |
+
.le i{width:24px;height:24px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#dff8ff,#2d8fe6 55%,#0a2a66);box-shadow:inset -3px -3px 6px rgba(0,0,0,.35),0 0 0 2px rgba(255,255,255,.7);animation:les 6s linear infinite}
|
| 18 |
+
.le u{text-decoration:none;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:#04121f;color:#7fe3ff;font-size:11px;margin-left:2px}
|
| 19 |
+
.le:after{content:"";position:absolute;top:0;left:-60%;width:40%;height:100%;background:linear-gradient(100deg,transparent,rgba(255,255,255,.65),transparent);animation:lesh 3.2s ease-in-out infinite}
|
| 20 |
+
@keyframes lep{0%,100%{box-shadow:0 4px 0 #0b6f9c,0 8px 22px rgba(53,208,255,.45)}50%{box-shadow:0 4px 0 #0b6f9c,0 8px 34px rgba(53,208,255,.95),0 0 0 6px rgba(53,208,255,.18)}}@keyframes lesh{0%,55%{left:-60%}100%{left:130%}}@keyframes les{to{filter:hue-rotate(25deg)}}
|
| 21 |
+
@media(prefers-reduced-motion:reduce){.le,.le:after,.le i{animation:none}}
|
| 22 |
.mdl{position:fixed;inset:0;background:rgba(2,6,14,.82);z-index:50;display:flex;align-items:center;justify-content:center;padding:14px}.mdl[hidden]{display:none}
|
| 23 |
.mbox{width:min(1200px,100%);height:min(780px,100%);background:#061226;border:1px solid var(--cy);border-radius:14px;display:flex;flex-direction:column;overflow:hidden}
|
| 24 |
.mhd{display:flex;align-items:center;gap:12px;padding:10px 14px;background:linear-gradient(90deg,#0b2a5c,#0a1c3a);border-bottom:1px solid var(--line);flex-wrap:wrap}.mhd b{letter-spacing:.1em}
|
|
|
|
| 26 |
.mx{margin-left:auto;font-size:24px;line-height:1;color:var(--ink);background:none;border:0;cursor:pointer;padding:0 6px}
|
| 27 |
.mbody{flex:1;position:relative;min-height:0}#lmap,#wfr{position:absolute;inset:0;width:100%;height:100%;border:0;background:#030912}#lmap[hidden],#wfr[hidden]{display:none}
|
| 28 |
.mft{padding:7px 14px;font-size:11px;color:var(--mut);border-top:1px solid var(--line)}.mft a{color:var(--cy)}
|
| 29 |
+
.bm{filter:brightness(.62) saturate(.85)}.cpin2{position:absolute;transform:translate(-50%,-50%);background:rgba(6,18,38,.92);border:2px solid #35d0ff;border-radius:8px;padding:3px 7px;white-space:nowrap;font:700 11px/1.25 "Segoe UI",system-ui,sans-serif;color:#f2f7ff;text-align:center;box-shadow:0 2px 8px rgba(0,0,0,.6);cursor:pointer}.cpin2 b{display:block}.cpin2 span{display:block;font-size:10px}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#0d2247;color:#f2f7ff;border:1px solid #1d3f78}.leaflet-popup-content{margin:10px 12px;font:13px/1.4 "Segoe UI",system-ui,sans-serif}.leaflet-container{font:inherit}
|
| 30 |
.stamp{margin-left:auto;color:var(--mut);font-size:13px;text-align:right}.stamp b{color:var(--ink)}
|
| 31 |
.tick{background:#040b18;border-bottom:1px solid var(--line);overflow:hidden;white-space:nowrap;font-size:13px;font-weight:600}
|
| 32 |
.tick span{display:inline-block;padding:7px 0;animation:mq 45s linear infinite}.tick b{color:var(--gold)}.tick em{color:var(--cy);font-style:normal}
|
|
|
|
| 58 |
@media(max-width:700px){.ol{grid-template-columns:repeat(5,minmax(0,1fr))}}
|
| 59 |
.tw{overflow-x:auto;scrollbar-color:#2a5596 #0a1c3a;scrollbar-width:thin}.tw::-webkit-scrollbar{height:8px}.tw::-webkit-scrollbar-track{background:#0a1c3a;border-radius:4px}.tw::-webkit-scrollbar-thumb{background:#2a5596;border-radius:4px}.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 td .ty{margin-left:6px;font-size:9px}.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}.wl{display:block;font-size:10px;font-weight:800}.ot td.fc{color:var(--cy);font-weight:700}.win{display:block;font-size:9px;font-weight:900;letter-spacing:.12em;color:#3a2a00;background:linear-gradient(180deg,#ffe08a,#ffc83d);border-radius:4px;padding:1px 5px;margin:0 0 3px auto;width:max-content}.ot td.wn1{background:rgba(255,200,61,.12);box-shadow:inset 0 0 0 1px rgba(255,200,61,.6);border-radius:6px}.er.g{color:#7be495}.er.y{color:#ffd166}.er.r{color:#ff6b7d}
|
| 60 |
.h3{margin:0 0 8px;font-size:13px;font-weight:700;color:var(--ink)}.wt{border-collapse:separate;border-spacing:5px;width:100%;min-width:760px;font-size:12px}.wt th{color:var(--mut);font-size:11px;letter-spacing:.1em;text-transform:uppercase;padding:4px 6px;text-align:left;white-space:nowrap;font-weight:800}.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{background:rgba(4,11,24,.5);border:1px solid var(--line);border-left:4px solid var(--cy);border-radius:8px;padding:7px 9px;white-space:nowrap}.wt td.w.dwn{background:linear-gradient(160deg,rgba(255,200,61,.16),rgba(4,11,24,.5) 70%);border-color:rgba(255,200,61,.55)}.wn{font-weight:800;font-size:13px;color:var(--ink)}.wm{display:flex;align-items:center;gap:8px;margin-top:4px}.wm b{font-size:13px;color:var(--ink)}.wt td.w.dwn .wm b{color:var(--gold)}.wt td.e{text-align:center;color:var(--mut)}
|
| 61 |
+
.ml{color:inherit;text-decoration:none;border-bottom:1px dotted rgba(255,255,255,.45)}.ml:hover{color:var(--cy);border-bottom-color:var(--cy)}.ml .ex{font-size:.7em;margin-left:3px;opacity:.7}.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}
|
| 62 |
</style>
|
| 63 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.min.css">
|
| 64 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.min.js" defer></script></head><body>
|
| 65 |
+
<div class="top"><span class="live"><i></i>LIVE</span><span class="brand">Global Weather Model <b>Leaderboard</b></span><button class="le" id="lebtn" type="button" title="Open the live global weather map"><i></i>LIVE EARTH MAP<u>▶</u></button><span class="stamp" id="stamp">Loading…</span></div>
|
| 66 |
<div class="tick"><span id="tick">Loading the latest verification…</span></div>
|
| 67 |
<div class="mdl" id="mdl" hidden><div class="mbox" role="dialog" aria-modal="true" aria-label="Live Earth">
|
| 68 |
<div class="mhd"><span class="live"><i></i>LIVE</span><b>LIVE EARTH</b>
|
| 69 |
+
<div class="mtabs"><button type="button" class="mt on" data-t="wind">Wind</button><button type="button" class="mt" data-t="satw">Clouds</button><button type="button" class="mt" data-t="rain">Rain radar</button><button type="button" class="mt" data-t="temp">Temperature</button><button type="button" class="mt" data-t="sat">City champions</button></div>
|
| 70 |
<button type="button" class="mx" id="mclose" aria-label="Close">×</button></div>
|
| 71 |
<div class="mbody"><div id="lmap"></div><iframe id="wfr" title="Live weather map" hidden></iframe></div>
|
| 72 |
<div class="mft" id="mft"></div></div></div>
|
|
|
|
| 104 |
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"]};
|
| 105 |
let LEADS=[1,3,5,7];const NAMES=Object.keys(CITIES),MK=Object.keys(MODELS),DAYS=50,LAG=6,MIN=31,DWC="#ffffff";
|
| 106 |
const flag=(cc,nm)=>`<img class="fl" src="https://flagcdn.com/w40/${cc}.png" alt="${nm}" title="${nm}" width="20" height="14">`;
|
| 107 |
+
const URLS={darwin:"https://huggingface.co/FINAL-Bench/Darwin-Prediction-Weather",ecmwf_ifs025:"https://www.ecmwf.int/en/forecasts/documentation-and-support/medium-range-forecasts",ecmwf_aifs025_single:"https://huggingface.co/ecmwf/aifs-single-1.0",gfs_seamless:"https://www.emc.ncep.noaa.gov/emc/pages/numerical_forecast_systems/gfs.php",ncep_aigfs025:"https://www.emc.ncep.noaa.gov/emc.php",icon_seamless:"https://www.dwd.de/EN/research/weatherforecasting/num_modelling/01_num_weather_prediction_modells/icon_description.html",jma_seamless:"https://www.jma.go.jp/jma/en/Activities/nwp.html",gem_seamless:"https://eccc-msc.github.io/open-data/msc-data/nwp_gdps/readme_gdps_en/",metno_seamless:"https://www.met.no/en"};
|
| 108 |
+
const lk=(m,t)=>`<a class="ml" href="${URLS[m]}" target="_blank" rel="noopener" title="Open the ${inf(m)[0]} page">${t||inf(m)[0]}<span class="ex">↗</span></a>`;
|
| 109 |
const inf=m=>m==="darwin"?DW:MODELS[m];
|
| 110 |
const tyb=m=>`<span class="ty ${inf(m)[2]==="AI"?"ai":"ph"}">${inf(m)[2]==="AI"?"AI":"Physics (Supercomputer)"}</span>`;
|
| 111 |
const $=id=>document.getElementById(id),iso=d=>d.toISOString().slice(0,10);
|
|
|
|
| 150 |
const cell=(v,o,w)=>{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 class="${w?"wn1":""}">${w?'<span class="win">WIN</span>':""}${v.toFixed(1)}<span class="er ${k}">${e>=0?"+":""}${e.toFixed(1)}</span></td>`};
|
| 151 |
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>";
|
| 152 |
if(Rc)h+=`<tr class="obr"><td>Actual temperature</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>`;
|
| 153 |
+
h+=`<tr class="dwo"><td>${flag("kr","South Korea")}${lk("darwin")} ${tyb("darwin")}</td><td class="cu">${cv("darwin")}</td>${pd.map((d,j)=>cell(PF[j],j===pd.length-1?NaN:num(ob[j]),wins[j]==="darwin")).join("")}${fus.map(v=>`<td>${fin(v)?v.toFixed(1):"–"}</td>`).join("")}</tr>`;
|
| 154 |
+
ms.forEach(m=>h+=`<tr><td>${flag(MODELS[m][3],MODELS[m][4])}${lk(m)} ${tyb(m)}</td><td class="cu">${cv(m)}</td>${pd.map((d,j)=>cell(pf(m,j),j===pd.length-1?NaN:num(ob[j]),wins[j]===m)).join("")}${days.map((d,k)=>{const v=num(OL.models[m][city][k+1]);return `<td>${fin(v)?v.toFixed(1):"–"}</td>`}).join("")}</tr>`);
|
| 155 |
$("otab").innerHTML=h;
|
| 156 |
$("onote").textContent=`Forecasts issued ${iss}, in °C. The large numbers are the Darwin-Prediction-Weather forecast; "± models" is half the spread between the models, a guide to how settled the forecast is.${Rc?` "Actual temperature" is what really happened. Past days show each forecast issued ${Lp} day${Lp>1?"s":""} earlier and, in colour, how far it was from the actual temperature. Recent actual values are preliminary until ERA5 is published. * Today so far (${Rc.today_hours}:00 UTC). WIN marks the closest forecast of each day; days ahead receive their WIN when the actual temperature is in.${Object.keys(wcount).length?" Wins in the last "+wins.filter(Boolean).length+" days: "+Object.entries(wcount).sort((a,b)=>b[1]-a[1]).map(([m,n])=>inf(m)[0]+" "+n).join(", ")+".":""}`:""}`}
|
| 157 |
// bias and weights use only days whose truth was known before scoring day t (t-30 .. t-lead)
|
|
|
|
| 187 |
else{
|
| 188 |
$("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.":""}`;
|
| 189 |
const c=rows[0],M=inf(c.m);
|
| 190 |
+
$("champ").innerHTML=`<div class="champ"><div class="medal">1</div><div><div class="cn">${lk(c.m)}</div><div class="sub" style="margin:6px 0">${flag(M[3],M[4])}${M[1]} ${tyb(c.m)}</div><div class="big">${c.r.toFixed(2)}<small>°C RMSE</small></div>${rows[1]&&c.r<rows[1].r?`<div class="gain" style="margin:8px 0 6px">${((1-c.r/rows[1].r)*100).toFixed(1)}% lower error than no. 2</div>`:""}<div class="sub">${c.n.toLocaleString()} verified forecasts, ${span}</div></div></div>`+
|
| 191 |
+
`<div class="run">${rows.slice(1,3).map(x=>`<div class="rn"><div class="k">NO. ${x.rk}</div><div class="v">${lk(x.m)}</div><div class="sub">${flag(inf(x.m)[3],inf(x.m)[4])}${x.r.toFixed(2)} °C</div></div>`).join("")}</div>`;
|
| 192 |
+
const bAI=rows.find(x=>inf(x.m)[2]==="AI"),bPH=rows.find(x=>inf(x.m)[2]!=="AI"),vs=(x,lab)=>x?`<div class="rn" style="margin-bottom:10px"><div class="k">BEST ${lab} · NO. ${x.rk} OVERALL</div><div class="v">${lk(x.m)}</div><div class="sub">${flag(inf(x.m)[3],inf(x.m)[4])}${inf(x.m)[1]} <b style="color:#fff;font-size:18px">${x.r.toFixed(2)} °C</b></div></div>`:"";
|
| 193 |
$("dwc").innerHTML=vs(bAI,"AI")+vs(bPH,"PHYSICS (SUPERCOMPUTER)")+(bAI&&bPH?`<div class="gain">${bAI.r<bPH.r?"AI leads by "+((1-bAI.r/bPH.r)*100).toFixed(1)+"%":"Physics leads by "+((1-bPH.r/bAI.r)*100).toFixed(1)+"%"}</div><div class="sub" style="margin-top:10px">${rows.filter(x=>inf(x.m)[2]==="AI").length} AI models and ${rows.filter(x=>inf(x.m)[2]!=="AI").length} physics models on this board</div>`:"");
|
| 194 |
const mx=Math.max(...rows.map(x=>x.r));let h="";
|
| 195 |
+
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">${lk(x.m)}<span class="d">${flag(M[3],M[4])}${M[1]} ${tyb(x.m)}${d?" 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>`});
|
| 196 |
$("bars").innerHTML=h;
|
| 197 |
const tk=`<b>${D}-DAY FORECAST</b> · ${span} · ${where} `+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(" • ")+" ";
|
| 198 |
$("tick").innerHTML=tk+tk;
|
| 199 |
}
|
| 200 |
// champions at a glance (independent of the period and city selectors)
|
| 201 |
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={};
|
| 202 |
+
const wc=(m,v)=>{if(!m)return '<td class="e">–</td>';seen[m]=1;const M=inf(m);return `<td class="w ${m==="darwin"?"dwn":""}" style="border-left-color:${M[5]}"><div class="wn">${flag(M[3],M[4])}${lk(m,SH[m])}</div><div class="wm"><span class="ty ${M[2]==="AI"?"ai":"ph"}">${M[2]==="AI"?"AI":"Physics"}</span><b>${v.toFixed(2)}°</b></div></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)));
|
| 203 |
const hd="<tr><th></th>"+LA.map(i=>`<th>${LEADS[i]}-day</th>`).join("")+"</tr>";
|
| 204 |
$("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("");
|
| 205 |
$("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("");
|
|
|
|
| 227 |
}
|
| 228 |
// LIVE EARTH: satellite (NASA GIBS) + rain radar (RainViewer) + city pins on our own map, and live wind / rain / temperature maps
|
| 229 |
let LM=null;const G="https://gibs.earthdata.nasa.gov/wmts/epsg3857/best/";
|
| 230 |
+
async function liveMap(){if(LM){setTimeout(()=>LM.invalidateSize(),60);$("mft").innerHTML=LM._ft;return}if(!window.L){$("mft").textContent="Map library is still loading. Please try again in a moment.";return}
|
| 231 |
LM=L.map("lmap",{center:[25,125],zoom:3,minZoom:2,maxZoom:7,worldCopyJump:true,attributionControl:false});
|
| 232 |
+
L.tileLayer(G+"BlueMarble_NextGeneration/default/default/GoogleMapsCompatible_Level8/{z}/{y}/{x}.jpeg",{maxNativeZoom:8,className:"bm"}).addTo(LM);
|
| 233 |
+
try{const r=await (await fetch("https://api.rainviewer.com/public/weather-maps.json")).json(),f=r.radar.past[r.radar.past.length-1];L.tileLayer(r.host+f.path+"/256/{z}/{x}/{y}/4/1_1.png",{maxNativeZoom:7,opacity:.8}).addTo(LM);LM._rv=new Date(f.time*1000).toISOString().slice(11,16)+" UTC"}catch(e){}
|
| 234 |
+
const li=LEADS.indexOf(+$("lead").value),li2=li>=0&&li<7?li:0,Y=run(li2,MIN,dates.length-1,-1);
|
| 235 |
+
NAMES.forEach((c,i)=>{let bm=null,bv=1e9;Y.rows.forEach(x=>{const v=grp(Y.A,x.m,"c"+i,30);if(fin(v)&&v<bv){bv=v;bm=x.m}});const o=OL&&OL.models?ocalc(i):null,col=bm?inf(bm)[5]:"#35d0ff",M=bm?inf(bm):null;
|
| 236 |
+
const mk=L.marker(CITIES[c],{icon:L.divIcon({className:"",html:`<div class="cpin2" style="border-color:${col}"><b>${c}</b>${M?`<span style="color:${col}">${SHN[bm]}</span>`:""}</div>`,iconSize:[0,0]})}).addTo(LM);
|
| 237 |
+
mk.bindPopup(`<b style="font-size:15px">${c}</b>${M?`<br>No. 1 in 2026: <b>${M[0]}</b> (${bv.toFixed(2)} °C, ${LEADS[li2]}-day forecast)`:""}${o?`<br>Darwin forecast, next days: ${o.fus.slice(0,5).map((v,k)=>fin(v)?`<b>${v.toFixed(0)}°</b>`:"–").join(" · ")}`:""}`)});
|
| 238 |
+
LM._ft=`The most accurate model in each city in 2026, over live rain radar${LM._rv?" ("+LM._rv+")":""}. Click a city for its forecast. We acknowledge the use of imagery provided by services from NASA's Global Imagery Browse Services (GIBS), part of NASA's Earth Science Data and Information System (ESDIS). Weather data by <a href="https://www.rainviewer.com/" target="_blank" rel="noopener">RainViewer</a>.`;$("mft").innerHTML=LM._ft}
|
|
|
|
| 239 |
function liveTab(t){document.querySelectorAll(".mt").forEach(b=>b.classList.toggle("on",b.dataset.t===t));const f=$("wfr");
|
| 240 |
if(t==="sat"){f.hidden=true;$("lmap").hidden=false;liveMap()}
|
| 241 |
+
else{$("lmap").hidden=true;f.hidden=false;const ov={wind:"wind",rain:"radar",temp:"temp",satw:"clouds"}[t];f.src=`https://embed.windy.com/embed.html?type=map&location=coordinates&metricRain=mm&metricTemp=%C2%B0C&metricWind=m%2Fs&zoom=3&overlay=${ov}&product=${t==="rain"?"radar":"ecmwf"}&level=surface&lat=25&lon=125`;
|
| 242 |
$("mft").innerHTML='Live map by <a href="https://www.windy.com/" target="_blank" rel="noopener">Windy.com</a>.'}}
|
| 243 |
+
function liveOpen(){$("mdl").hidden=false;document.body.style.overflow="hidden";liveTab("wind")}
|
| 244 |
function liveClose(){$("mdl").hidden=true;document.body.style.overflow="";$("wfr").src="about:blank"}
|
| 245 |
load().then(()=>{$("lebtn").onclick=liveOpen;$("mclose").onclick=liveClose;$("mdl").onclick=e=>{if(e.target===$("mdl"))liveClose()};document.addEventListener("keydown",e=>{if(e.key==="Escape"&&!$("mdl").hidden)liveClose()});document.querySelectorAll(".mt").forEach(b=>b.onclick=()=>liveTab(b.dataset.t));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>`));
|
| 246 |
$("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>`);
|