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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- tabular-regression
|
| 5 |
+
- image-to-image
|
| 6 |
+
tags:
|
| 7 |
+
- meteorology
|
| 8 |
+
- weather
|
| 9 |
+
- ERA5
|
| 10 |
+
- ECMWF
|
| 11 |
+
- reanalysis
|
| 12 |
+
- gridded-data
|
| 13 |
+
- patches
|
| 14 |
+
size_categories:
|
| 15 |
+
- 100K<n<1M
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# ERA5 Patchified Dataset
|
| 19 |
+
|
| 20 |
+
Patches extracted from ECMWF ERA5 reanalysis on a 0.25° global grid, tiled into 128×128 non-overlapping patches with float16 normalized channels. Designed for ML training — use alongside [IFS HRES open data](https://huggingface.co/datasets/meteolibre-dev/weather_ifs_hres_128_0dot025) at inference time for a train-on-reanalysis / infer-on-forecast workflow.
|
| 21 |
+
|
| 22 |
+
## Data Structure
|
| 23 |
+
|
| 24 |
+
Files are stored as Parquet, named:
|
| 25 |
+
|
| 26 |
+
```
|
| 27 |
+
era5_{first_snapshot}_{region}_patches_{group_idx:04d}_{file_idx:04d}.parquet
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
### Columns
|
| 31 |
+
|
| 32 |
+
| Column | Type | Description |
|
| 33 |
+
|---|---|---|
|
| 34 |
+
| `ifs_data` | bytes | Raw float16 bytes of the (T, C, H, W) patch tensor |
|
| 35 |
+
| `ifs_shape` | list[int] | Shape tuple, e.g. `[3, 77, 128, 128]` |
|
| 36 |
+
| `ifs_dtype` | str | `"e"` (numpy half / float16) |
|
| 37 |
+
| `channel_names` | list[str] | Ordered channel names (see below) |
|
| 38 |
+
| `channel_offsets` | list[float] | Per-channel normalization offset |
|
| 39 |
+
| `channel_scales` | list[float] | Per-channel normalization scale |
|
| 40 |
+
| `elevation_data` | bytes | Float16 elevation patch (128, 128) |
|
| 41 |
+
| `elevation_shape` | list[int] | `(128, 128)` |
|
| 42 |
+
| `elevation_dtype` | str | `"e"` (float16) |
|
| 43 |
+
| `epsg` | int | CRS, always `4326` |
|
| 44 |
+
| `lon` | float | Center longitude of patch |
|
| 45 |
+
| `lat` | float | Center latitude of patch |
|
| 46 |
+
| `patch_x_idx` | int | X index in the regional grid |
|
| 47 |
+
| `patch_y_idx` | int | Y index in the regional grid |
|
| 48 |
+
| `region` | str | Region name (e.g. `europe`, `global`) |
|
| 49 |
+
| `snapshot_labels` | list[str] | ISO labels of the T snapshots |
|
| 50 |
+
| `time_spacing_hours` | int | Hours between snapshots (`6`) |
|
| 51 |
+
| `resolution` | float | Grid resolution in degrees (`0.25`) |
|
| 52 |
+
| `patch_size` | int | Spatial patch size (`128`) |
|
| 53 |
+
| `source` | str | Always `"era5"` |
|
| 54 |
+
|
| 55 |
+
### Recovering the Tensor
|
| 56 |
+
|
| 57 |
+
```python
|
| 58 |
+
import numpy as np
|
| 59 |
+
import pyarrow.parquet as pq
|
| 60 |
+
|
| 61 |
+
table = pq.read_table("era5_2024-06-01T0000Z_europe_patches_0000_0000.parquet")
|
| 62 |
+
row = table.slice(0, 1).to_pydict()
|
| 63 |
+
|
| 64 |
+
# Reconstruct tensor
|
| 65 |
+
tensor = np.frombuffer(row["ifs_data"][0], dtype=row["ifs_dtype"][0]).reshape(row["ifs_shape"][0])
|
| 66 |
+
# tensor shape: (T, C, 128, 128), float16
|
| 67 |
+
|
| 68 |
+
# De-normalize
|
| 69 |
+
for ci, (offset, scale) in enumerate(zip(row["channel_offsets"][0], row["channel_scales"][0])):
|
| 70 |
+
if scale != 0:
|
| 71 |
+
tensor[:, ci, :, :] = tensor[:, ci, :, :].astype(np.float32) * scale + offset
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
## Channels (77 total)
|
| 75 |
+
|
| 76 |
+
### Surface (13 channels)
|
| 77 |
+
|
| 78 |
+
| # | Name | Description | Unit | Offset | Scale |
|
| 79 |
+
|---|---|---|---|---|---|
|
| 80 |
+
| 1 | `mucape` | Convective available potential energy (surface-based) | J kg⁻¹ | 0 | 500 |
|
| 81 |
+
| 2 | `2t` | 2m temperature | K | 273.15 | 40 |
|
| 82 |
+
| 3 | `2d` | 2m dewpoint temperature | K | 273.15 | 30 |
|
| 83 |
+
| 4 | `10u` | 10m U wind component | m s⁻¹ | 0 | 30 |
|
| 84 |
+
| 5 | `10v` | 10m V wind component | m s⁻¹ | 0 | 30 |
|
| 85 |
+
| 6 | `100u` | 100m U wind component | m s⁻¹ | 0 | 40 |
|
| 86 |
+
| 7 | `100v` | 100m V wind component | m s⁻¹ | 0 | 40 |
|
| 87 |
+
| 8 | `tp` | Total precipitation | m | 0 | 0.05 |
|
| 88 |
+
| 9 | `sp` | Surface pressure | Pa | 101325 | 5000 |
|
| 89 |
+
| 10 | `msl` | Mean sea level pressure | Pa | 101325 | 5000 |
|
| 90 |
+
| 11 | `tcwv` | Total column water vapour | kg m⁻² | 0 | 50 |
|
| 91 |
+
| 12 | `tcc` | Total cloud cover | (0–1) | 0 | 1 |
|
| 92 |
+
| 13 | `lsm` | Land-sea mask | (0–1) | 0 | 1 |
|
| 93 |
+
|
| 94 |
+
### Pressure Levels × 8 variables = 64 channels
|
| 95 |
+
|
| 96 |
+
Levels: **1000, 925, 850, 700, 500, 300, 250, 200 hPa**
|
| 97 |
+
|
| 98 |
+
| # | Prefix | Description | Unit | Offset | Scale |
|
| 99 |
+
|---|---|---|---|---|---|
|
| 100 |
+
| 14–21 | `t_{level}` | Temperature | K | 273.15 | 50 |
|
| 101 |
+
| 22–29 | `u_{level}` | U wind component | m s⁻¹ | 0 | 60 |
|
| 102 |
+
| 30–37 | `v_{level}` | V wind component | m s⁻¹ | 0 | 60 |
|
| 103 |
+
| 38–45 | `q_{level}` | Specific humidity | kg kg⁻¹ | 0 | 0.02 |
|
| 104 |
+
| 46–53 | `w_{level}` | Vertical velocity | Pa s⁻¹ | 0 | 5 |
|
| 105 |
+
| 54–61 | `gh_{level}` | Geopotential height | m | 5000 | 30000 |
|
| 106 |
+
| 62–69 | `vo_{level}` | Relative vorticity | s⁻¹ | 0 | 5×10⁻⁴ |
|
| 107 |
+
| 70–77 | `r_{level}` | Relative humidity | % | 50 | 50 |
|
| 108 |
+
|
| 109 |
+
Full channel name example: `t_850` = temperature at 850 hPa.
|
| 110 |
+
|
| 111 |
+
## Normalization
|
| 112 |
+
|
| 113 |
+
Values are stored normalized as float16:
|
| 114 |
+
|
| 115 |
+
```
|
| 116 |
+
normalized = (raw_value - offset) / scale
|
| 117 |
+
```
|
| 118 |
+
|
| 119 |
+
Recover raw values with:
|
| 120 |
+
|
| 121 |
+
```
|
| 122 |
+
raw_value = normalized * scale + offset
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
Normalization constants are **identical to the IFS HRES dataset**, enabling seamless cross-training (train on ERA5, infer on IFS HRES) without re-normalization.
|
| 126 |
+
|
| 127 |
+
## Temporal Structure
|
| 128 |
+
|
| 129 |
+
Each patch contains **T consecutive analysis snapshots** spaced **6 hours** apart (cycles 00, 06, 12, 18 UTC). The default is T=3 (18h window).
|
| 130 |
+
|
| 131 |
+
Consecutive patch groups stride by T×6 hours for continuous temporal coverage with no gaps:
|
| 132 |
+
|
| 133 |
+
```
|
| 134 |
+
Group 1: 00z → 06z → 12z
|
| 135 |
+
Group 2: 18z → 00z(+1d) → 06z(+1d)
|
| 136 |
+
Group 3: 12z(+1d) → 18z(+1d) → 00z(+2d)
|
| 137 |
+
...
|
| 138 |
+
```
|
| 139 |
+
|
| 140 |
+
## Spatial Coverage
|
| 141 |
+
|
| 142 |
+
| Region | Bounding Box (lon_min, lat_min, lon_max, lat_max) |
|
| 143 |
+
|---|---|
|
| 144 |
+
| `global` | (-180, -90, 180, 90) |
|
| 145 |
+
| `europe` | (-30, 30, 45, 75) |
|
| 146 |
+
| `north_atlantic` | (-80, 20, 0, 70) |
|
| 147 |
+
| `north_america` | (-140, 15, -50, 75) |
|
| 148 |
+
| `asia` | (50, 0, 160, 75) |
|
| 149 |
+
|
| 150 |
+
Grid: 0.25° × 0.25° regular lat-lon (EPSG:4326). Patches are non-overlapping 128×128 grid cells (≈32° × 32° at 0.25° resolution).
|
| 151 |
+
|
| 152 |
+
## Comparison with IFS HRES Patchified Dataset
|
| 153 |
+
|
| 154 |
+
| | ERA5 (this dataset) | IFS HRES |
|
| 155 |
+
|---|---|---|
|
| 156 |
+
| **Type** | Reanalysis (best-estimate historical) | Operational analysis (near-real-time) |
|
| 157 |
+
| **Temporal range** | 1940 → present | Rolling 2–3 days only |
|
| 158 |
+
| **Latency** | ~5 days (ERA5T) / ~2 months (final) | Near real-time |
|
| 159 |
+
| **Resolution** | 0.25° | 0.25° (open data) / 0.08° (licensed) |
|
| 160 |
+
| **Consistency** | Reanalysis = physically consistent | Model upgrades cause breaks |
|
| 161 |
+
| **CAPE** | Surface-based CAPE | Most-unstable CAPE |
|
| 162 |
+
| **Channels** | 77 (no `tprate`) | 78 (includes `tprate`) |
|
| 163 |
+
| **Geopotential** | Height (m) after ÷9.80665 | Height (m) |
|
| 164 |
+
| **Normalization** | Same offsets/scales | Same offsets/scales |
|
| 165 |
+
|
| 166 |
+
**Recommended workflow**: Train on ERA5 (years of consistent data), infer on IFS HRES (real-time availability). The shared normalization and channel naming makes this a drop-in switch.
|
| 167 |
+
|
| 168 |
+
## Elevation
|
| 169 |
+
|
| 170 |
+
Each patch includes a 128×128 float16 elevation map derived from a global DEM, reprojected to the same 0.25° grid. Elevation is stored raw (meters above sea level), not normalized.
|
| 171 |
+
|
| 172 |
+
## Source
|
| 173 |
+
|
| 174 |
+
Data downloaded from the [Copernicus Climate Data Store (CDS)](https://cds.climate.copernicus.eu) via the `cdsapi` Python client.
|
| 175 |
+
|
| 176 |
+
- Surface: [`reanalysis-era5-single-levels`](https://cds.climate.copernicus.eu/datasets/reanalysis-era5-single-levels)
|
| 177 |
+
- Pressure levels: [`reanalysis-era5-pressure-levels`](https://cds.climate.copernicus.eu/datasets/reanalysis-era5-pressure-levels)
|
| 178 |
+
|
| 179 |
+
## License
|
| 180 |
+
|
| 181 |
+
CC-BY-4.0 — please attribute ECMWF / Copernicus Climate Change Service as the data source. See the [CDS terms of use](https://cds.climate.copernicus.eu/api/v2/terms/static/licence-to-use-copernicus-products.pdf) and [ERA5 licence](https://cds.climate.copernicus.eu/datasets/reanalysis-era5-single-levels/licence).
|