EmmaScharfmann HF Staff commited on
Commit
ed7104e
·
verified ·
1 Parent(s): 7f68fbf

Legend: 'X wetter' / 'Y wetter'; state that the Space shows differences and does not rank datasets

Browse files
Files changed (3) hide show
  1. ABOUT.md +5 -4
  2. app.py +6 -6
  3. maps.py +4 -4
ABOUT.md CHANGED
@@ -14,14 +14,15 @@
14
  agreement is partly by construction.
15
  - **PARDIG is not a ground truth**, but an experimental dataset. It tends to underestimate snow and drizzle, is less accurate over high mountains and
16
  near the poles, and caps precipitation rates at 75 mm/h.
17
- - **PARDIG is the first global, high-resolution precipitation dataset** with realistic rain structures, which makes it a much better reference than ERA5 to evaluate precipitation predictions.
 
18
  - **The difference map** (left minus right) compares the two cell by cell, hour by hour, after averaging the 10 km
19
  datasets onto ERA5's 28 km cells (area-conservative). Pick the two datasets with the dropdowns; IMERG and PARDIG
20
- are shown by default. In what follows, "ERA5 minus PARDIG" stands for any pair.
21
- Purple: ERA5 has more rain; orange: less; grey: within 0.2 mm. Classes change at 0.2, 1, 3 and
22
  10 mm. Cells where both have less than 0.1 mm are left clear. Grey therefore also includes cells where only one
23
  dataset has a little rain: for example, ERA5 drizzle of 0.15 mm where PARDIG is dry differs by less than 0.2 mm,
24
- so it shows as grey rather than purple. Much of the wide grey area around storms is ERA5 drizzle of this kind.
 
25
  - Times are UTC. Each view plays 48 hours from the chosen day. Maps cover 2026 from 1 January, a few days behind
26
  real time.
27
 
 
14
  agreement is partly by construction.
15
  - **PARDIG is not a ground truth**, but an experimental dataset. It tends to underestimate snow and drizzle, is less accurate over high mountains and
16
  near the poles, and caps precipitation rates at 75 mm/h.
17
+ - **None of the three is a ground truth**, and the Space does not rank them: it shows how they differ, not which one
18
+ is right.
19
  - **The difference map** (left minus right) compares the two cell by cell, hour by hour, after averaging the 10 km
20
  datasets onto ERA5's 28 km cells (area-conservative). Pick the two datasets with the dropdowns; IMERG and PARDIG
21
+ are shown by default. Purple: the left dataset is wetter; orange: the right one is wetter; grey: within 0.2 mm. Classes change at 0.2, 1, 3 and
 
22
  10 mm. Cells where both have less than 0.1 mm are left clear. Grey therefore also includes cells where only one
23
  dataset has a little rain: for example, ERA5 drizzle of 0.15 mm where PARDIG is dry differs by less than 0.2 mm,
24
+ so it shows as grey rather than purple. With ERA5 on one side, much of the wide grey area around storms is ERA5
25
+ drizzle of this kind.
26
  - Times are UTC. Each view plays 48 hours from the chosen day. Maps cover 2026 from 1 January, a few days behind
27
  real time.
28
 
app.py CHANGED
@@ -47,7 +47,8 @@ INTRO = """
47
  PROBLEM = """
48
  <div class="story">
49
  <section>
50
- <p><b>There is no ground truth for rain.</b> Evaluating a prediction requires comparing it to a reference. But since rain is not measured everywhere on the planet, the references we have are not perfect. Rain gauges are accurate but sparse, and each one measures only a single point. Radars cover larger areas but struggle over mountains and in heavy storms. Reanalyses (such as ERA5 or CERRA) and satellite-based estimates (such as IMERG or PARDIG) offer much wider coverage, but they infer rain from a physics model or from satellite measurements, so they come with their own biases.</p></div>
 
51
  """
52
 
53
  STORY = """
@@ -57,10 +58,9 @@ STORY = """
57
  <h3>ERA5: a reconstruction of the past weather hour by hour since 1940</h3>
58
  <p>ERA5 is a reanalysis produced by the European Centre for Medium-Range Weather Forecasts (ECMWF). It
59
  reconstructs the past weather hour by hour since 1940, by combining a physics model of the atmosphere with
60
- observations from satellites, weather stations and weather balloons. It is the dataset most AI weather models
61
- are trained on and evaluated against. ERA5 is very good for variables (such as temperature), but
62
- less accurate for precipitation. The rain from ERA5 is blurred, with light rain over large areas and heavy rain
63
- events that are too weak and too spread out.</p>
64
  </section>
65
  <section>
66
  <div class="kicker"><span class="tag tag-map">Satellites</span></div>
@@ -84,7 +84,7 @@ STORY = """
84
  <h3>IMERG and PARDIG are not independent</h3>
85
  <p>PARDIG learns from GPM, the same satellite mission IMERG is built on. Where the two agree, part of the
86
  agreement comes from sharing that source, so agreement does not prove that both are right. ERA5, built from a
87
- physics model, is the more independent comparison.</p>
88
  </section>
89
  </div>
90
  """
 
47
  PROBLEM = """
48
  <div class="story">
49
  <section>
50
+ <p><b>There is no ground truth for rain.</b> Evaluating a prediction requires comparing it to a reference. But since rain is not measured everywhere on the planet, the references we have are not perfect. Rain gauges are accurate but sparse, and each one measures only a single point. Radars cover larger areas but struggle over mountains and in heavy storms. Reanalyses (such as ERA5 or CERRA) and satellite-based estimates (such as IMERG or PARDIG) offer much wider coverage, but they infer rain from a physics model or from satellite measurements, so they come with their own biases.</p>
51
+ <p><b>This Space does not evaluate the datasets, and does not tell which one is better.</b> It shows two of them side by side, hour by hour, with their difference, so you can see where and how they disagree. A difference shows that two datasets disagree, not which one is right.</p></div>
52
  """
53
 
54
  STORY = """
 
58
  <h3>ERA5: a reconstruction of the past weather hour by hour since 1940</h3>
59
  <p>ERA5 is a reanalysis produced by the European Centre for Medium-Range Weather Forecasts (ECMWF). It
60
  reconstructs the past weather hour by hour since 1940, by combining a physics model of the atmosphere with
61
+ observations from satellites, weather stations and weather balloons, on a 28 km grid. It is the dataset most AI
62
+ weather models are trained on and evaluated against. Its rain comes from the physics model, so it looks smoother
63
+ than the satellite maps: light rain tends to cover larger areas, and heavy rain is weaker and more spread out.</p>
 
64
  </section>
65
  <section>
66
  <div class="kicker"><span class="tag tag-map">Satellites</span></div>
 
84
  <h3>IMERG and PARDIG are not independent</h3>
85
  <p>PARDIG learns from GPM, the same satellite mission IMERG is built on. Where the two agree, part of the
86
  agreement comes from sharing that source, so agreement does not prove that both are right. ERA5, built from a
87
+ physics model, is more independent of both.</p>
88
  </section>
89
  </div>
90
  """
maps.py CHANGED
@@ -38,8 +38,8 @@ MAX_PX = 900 # widest rendered frame
38
 
39
  # One-hue sequential blue ramp (dataviz reference palette, steps 150 -> 700); dry is transparent.
40
  RAIN_COLORS = ["#b7d3f6", "#86b6ef", "#5598e7", "#3987e5", "#2a78d6", "#256abf", "#1c5cab", "#104281", "#0d366b"]
41
- # Difference ERA5 - PARDIG (mm/h), ColorBrewer PuOr (colour-blind safe, no blue so it cannot be read as rain):
42
- # orange-brown where ERA5 is too dry, purple where it is too wet, clear near zero.
43
  DIFF_LEVELS = [-10, -5, -2, -0.5, -0.1, 0.1, 0.5, 2, 5, 10]
44
  DIFF_COLORS = ["#7f3b08", "#b35806", "#e08214", "#fdb863", "#fee0b6", None,
45
  "#d8daeb", "#b2abd2", "#8073ac", "#542788", "#2d004b"]
@@ -299,7 +299,7 @@ def _weights(da: xr.DataArray) -> np.ndarray:
299
 
300
  # ERA5 - PARDIG (mm in the hour) in 9 classes; cells where both are dry stay clear.
301
  DIFF_BOUNDS = [-10, -3, -1, -0.2, 0.2, 1, 3, 10]
302
- # from "ERA5 much drier" (d <= -10) to "ERA5 much wetter" (d >= 10), grey in the middle
303
  DIFF_CLASS_COLORS = ["#7f3b08", "#b35806", "#e08214", "#fdb863", "#bdbcb5",
304
  "#b2abd2", "#8073ac", "#542788", "#2d004b"]
305
 
@@ -381,7 +381,7 @@ def payload(start: str, n_days: int, box: tuple, left: str = "imerg", right: str
381
  {"target": "diff", "style": "bar", "title": f"{la} minus {lb}, mm in the hour · clear: both dry",
382
  "colors": DIFF_CLASS_COLORS[::-1],
383
  "ticks": [f"{abs(v):g}" for v in DIFF_BOUNDS[::-1]],
384
- "ends": [f"{la} wetter", "about the same", f"{la} drier"]},
385
  ],
386
  }
387
  return json.dumps(data), summary(a, b, (la, lb))
 
38
 
39
  # One-hue sequential blue ramp (dataviz reference palette, steps 150 -> 700); dry is transparent.
40
  RAIN_COLORS = ["#b7d3f6", "#86b6ef", "#5598e7", "#3987e5", "#2a78d6", "#256abf", "#1c5cab", "#104281", "#0d366b"]
41
+ # Difference left - right (mm/h), ColorBrewer PuOr (colour-blind safe, no blue so it cannot be read as rain):
42
+ # purple where the left map is wetter, orange-brown where the right one is, clear near zero.
43
  DIFF_LEVELS = [-10, -5, -2, -0.5, -0.1, 0.1, 0.5, 2, 5, 10]
44
  DIFF_COLORS = ["#7f3b08", "#b35806", "#e08214", "#fdb863", "#fee0b6", None,
45
  "#d8daeb", "#b2abd2", "#8073ac", "#542788", "#2d004b"]
 
299
 
300
  # ERA5 - PARDIG (mm in the hour) in 9 classes; cells where both are dry stay clear.
301
  DIFF_BOUNDS = [-10, -3, -1, -0.2, 0.2, 1, 3, 10]
302
+ # from "right much wetter" (d <= -10) to "left much wetter" (d >= 10), grey in the middle
303
  DIFF_CLASS_COLORS = ["#7f3b08", "#b35806", "#e08214", "#fdb863", "#bdbcb5",
304
  "#b2abd2", "#8073ac", "#542788", "#2d004b"]
305
 
 
381
  {"target": "diff", "style": "bar", "title": f"{la} minus {lb}, mm in the hour · clear: both dry",
382
  "colors": DIFF_CLASS_COLORS[::-1],
383
  "ticks": [f"{abs(v):g}" for v in DIFF_BOUNDS[::-1]],
384
+ "ends": [f"{la} wetter", "about the same", f"{lb} wetter"]},
385
  ],
386
  }
387
  return json.dumps(data), summary(a, b, (la, lb))