Openmeteo
openmeteo
Open-Meteo's public model archive on AWS (s3://openmeteo) as a source.
Open-Meteo keeps, for many NWP models (Météo-France ARPEGE, ECMWF IFS, DWD
ICON, NOAA GFS, ...), a continuous series at the model's native time step,
built from the most recent run available at each valid time (runs are
stitched; lead times are not kept). Each
variable and level lives in its own .om files, one per block of
chunk_time_length time steps (e.g. 104 three-hour steps = 312 h for IFS).
Inside a file the data are chunked spatially (e.g.
1 latitude row x 14 longitudes x all time steps): reading one step costs as much
as reading the whole block, so blocks are read per geographic tile and kept in
an in-memory LRU, and every later time step and flight of the block is free.
Values are stored as scaled integers (lossy); against Météo-France's own files
we measured differences of 0.035 m/s (wind) and 0.08 K (temperature) RMS.
Licence: CC-BY 4.0 (credit Open-Meteo and the model's producer).
Reading needs omfiles (pip install 'barograph-met[openmeteo]').
The same layout on a local disk (<root>/data/<model>/...) is read as a
mirror: pass its directory as base_url.
Three parts: :class:ArchiveCatalog (what is archived), :class:TileReader
(reading and caching tiles) and :class:OpenMeteoSource (the source contract).
ArchiveCatalog
Time chunking, grid box, levels and first chunk of one archived model.
Source code in packages/barograph-met/src/baro/met/openmeteo.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | |
chunk_hours
property
Duration of a chunk in hours, distinct from its number of samples.
common_levels(allowed)
Levels archived for every variable (optionally restricted to allowed).
Source code in packages/barograph-met/src/baro/met/openmeteo.py
locate_first_chunk(variable, hpa)
Index of the oldest archived time chunk.
Source code in packages/barograph-met/src/baro/met/openmeteo.py
path(variable, hpa, chunk)
Relative path of one archive file.
time_index(valid)
Epoch-relative sample index (floored to the native time step).
OpenMeteoSource
Bases: _ArchiveSource
Isobaric fields of one Open-Meteo archived model.
This is a stitched forecast archive, not an ERA5-like reanalysis. Original
run identities and forecast lead times are not retained (CubeKey.run
and CubeKey.lead are None). ecmwf_ifs025 provides 3-hourly data;
the enricher interpolates linearly between native valid times.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
str
|
Open-Meteo model folder, e.g. |
'meteofrance_arpege_europe'
|
fields
|
dict[str, str] | None
|
Output name -> key of :data: |
None
|
levels
|
Sequence[int] | None
|
Isobaric levels (hPa) allowed; default: all archived levels. |
None
|
base_url
|
str
|
The public bucket, or a local mirror directory with the same layout. |
OPENMETEO_BASE_URL
|
tile_deg
|
float
|
Size of the geographic tiles read and cached (degrees). |
5.0
|
cache_mb
|
float
|
Memory budget of the tile LRU. |
1024.0
|
merge_adjacent_tiles
|
bool
|
Group touching tiles into one request (default True). Set False for sparse trajectories on fine grids: each occupied tile gets its own domain and pressure range, with the enricher's interpolation margin. |
True
|
Source code in packages/barograph-met/src/baro/met/openmeteo.py
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 | |
fetch(key, domain, p_range, *, level_margin=1, executor=None)
One native time step over domain with the levels bracketing p_range (Pa).
Source code in packages/barograph-met/src/baro/met/openmeteo.py
TileReader
Reads (lat, lon, all time steps) tiles of archive files and keeps them in an LRU.
Source code in packages/barograph-met/src/baro/met/openmeteo.py
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 | |
blocks(wanted, chunk, rows, cols)
Tiles of every (variable, level) covering rows x cols for one time chunk.
Source code in packages/barograph-met/src/baro/met/openmeteo.py
close()
Release the HTTP pool (the shared I/O loop keeps running).
ensure_shape(variable, hpa)
Grid shape, read once from the newest file (always the (lat, lon, time) layout).
Source code in packages/barograph-met/src/baro/met/openmeteo.py
grid()
Latitudes descending and longitudes ascending of the archive grid.
Source code in packages/barograph-met/src/baro/met/openmeteo.py
tile_points()
Tile edge, in grid points.
Source code in packages/barograph-met/src/baro/met/openmeteo.py
gather_tiles(tiles, rows, cols, tp, t_in)
Values at archive rows x cols (output order) for one time step, from cached tiles.