Repository navigation
Expand file tree
/
Copy pathtable_docs.json
More file actions
473 lines (473 loc) · 40.5 KB
/
Copy pathtable_docs.json
File metadata and controls
473 lines (473 loc) · 40.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
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
195
196
197
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
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
{
"ref.basins": {
"doc": "Spain's 25 river basin districts (demarcaciones hidrográficas), one row each. Each is managed by one authority, most with their own SAIH real-time network. Source: MITECO ArcGIS 'Demarcaciones' (outlines simplified to ~200 m). Static; refreshed when MITECO republishes.",
"columns": {
"basin_id": "EU water-framework district code, e.g. ES030 (Tajo). Key.",
"miteco_code": "MITECO's own district code, e.g. 31 (Tajo).",
"basin_name": "Spanish name, e.g. Tajo.",
"basin_name_en": "English name, e.g. Tagus.",
"authority_name": "Body that manages the district and its SAIH network.",
"saih_network": "Network key used in ref.stations.network for this district's live data (e.g. saih-tajo); null where there is none.",
"area_km2": "Land area of the district in km².",
"geometry": "District outline, MultiPolygon, EPSG:4326.",
"source": "Key of the source (miteco-arcgis)."
}
},
"ref.catchments": {
"doc": "Small drainage units (HydroBASINS level 12, ~130 km² median) covering Spain's river basin districts, each linked to the unit it drains into. Used to collect all land upstream of a reservoir. Source: HydroSHEDS HydroBASINS v1c (CC BY 4.0). Static.",
"columns": {
"catchment_id": "HydroBASINS unit id (HYBAS_ID). Key.",
"downstream_catchment_id": "Unit this one drains into; null at the sea or an inland sink.",
"pfafstetter_code": "Hierarchical Pfafstetter code: shared prefixes mean nested catchments.",
"basin_id": "River basin district (ref.basins) the unit belongs to.",
"local_area_km2": "Area of this unit alone, km².",
"upstream_area_km2": "Total area draining through this unit, itself included, km².",
"is_endorheic": "True for units draining to an inland sink rather than the sea; excluded from upstream areas.",
"geometry": "Unit outline, Polygon, EPSG:4326.",
"source": "Key of the source (hydrobasins)."
}
},
"ref.rivers": {
"doc": "River network for maps: one row per HydroRIVERS segment in Spain's basin districts, with its size so line width can follow the river. Source: HydroSHEDS HydroRIVERS v1.0 (CC BY 4.0). Static.",
"columns": {
"river_segment_id": "HydroRIVERS segment id (HYRIV_ID). Key.",
"downstream_segment_id": "Next segment downstream; null at the mouth.",
"river_name": "Official river name where matched (not yet filled).",
"stream_order": "Strahler order: 1 for headwater streams, rising as tributaries join.",
"length_km": "Segment length, km.",
"upstream_area_km2": "Area draining through this segment, km².",
"mean_flow_m3s": "Long-term modelled mean flow (HydroSHEDS, 1971–2000), m³/s. For scale on the map, not a measurement.",
"catchment_id": "Catchment unit (ref.catchments) the segment lies in.",
"basin_id": "River basin district (ref.basins).",
"geometry": "Segment line, LineString, EPSG:4326.",
"source": "Key of the source (hydrorivers)."
}
},
"ref.reservoirs": {
"doc": "The 375 reservoirs in MITECO's weekly reservoir bulletin (practically all of Spain's stored water), one row each, enriched with the national dam inventory, the reservoir's water outline and its upstream catchment. Key reservoir_id is MITECO's EMBALSE_ID, stable since 1988. Links to the inventory, outlines and catchments were made automatically by location, name and capacity; see quality_flags. Sources: MITECO ArcGIS (Embalses_Mapa, UP_Presas_y_embalses, Láminas_Embalses), HydroSHEDS.",
"columns": {
"reservoir_id": "MITECO bulletin EMBALSE_ID, stable since 1988. Key.",
"reservoir_name": "Name as in the weekly bulletin.",
"bulletin_area_name": "Area the bulletin groups it under (ámbito); close to, but not the same as, the basin district.",
"basin_id": "River basin district the dam is in (ref.basins).",
"capacity_hm3": "Capacity used by the weekly bulletin, hm³.",
"is_hydroelectric": "True when the bulletin also reports stored energy for it.",
"energy_capacity_gwh": "Energy the full reservoir could generate, GWh (bulletin).",
"dam_inventory_code": "Code of the main dam in MITECO's national dam inventory.",
"dam_name": "Dam name in the inventory; can differ from the reservoir name (Alcántara's dam is José María de Oriol).",
"river_name": "River dammed, as in the inventory.",
"province": "Province of the dam.",
"region": "Autonomous community of the dam.",
"uses": "Uses listed in the inventory (Abastecimiento, Riego, Hidroeléctrico, Defensa frente avenidas, …).",
"dam_type": "Construction type, from the inventory.",
"catchment_area_km2": "Area draining into the dam, km², computed from HydroRIVERS at the dam's river segment. Median error vs the inventory is 2% for catchments over 200 km²; preferred over inventory_catchment_area_km2.",
"inventory_catchment_area_km2": "Catchment area as recorded in the dam inventory, km² (filled for about half; some values are wrong).",
"mean_annual_inflow_hm3": "Average yearly inflow from the dam inventory, hm³/yr. Lets a storm be expressed as a share of a normal year.",
"surface_area_ha": "Area of the water outline (Láminas_Embalses), hectares.",
"river_segment_id": "HydroRIVERS segment the dam was snapped to (ref.rivers).",
"catchment_id": "Catchment unit the dam sits in (ref.catchments).",
"gauges_upstream": "Rain gauges (AEMET + SAIH) inside the upstream catchment. 0 means upstream rain is interpolated from outside.",
"quality_flags": "Caveats: no_upstream_gauges, small_catchment (<50 km²), no_river_segment, inventory_catchment_area_differs (>25%), no_water_outline.",
"dam_location": "Dam position from the bulletin, Point, EPSG:4326.",
"water_outline": "Reservoir water surface, Polygon, EPSG:4326 (null for 7).",
"link_status": "How inventory, outline and catchment were attached: auto or reviewed.",
"source": "Key of the source (miteco-arcgis)."
}
},
"ref.reservoir_catchments": {
"doc": "Bridge table: for each bulletin reservoir, every catchment unit upstream of its dam (traced up the HydroRIVERS network). Makes 'rain over the land that drains into this reservoir' a plain join: obs.precipitation → ref.stations.catchment_id → this table → reservoir. Endorheic units excluded.",
"columns": {
"reservoir_id": "Reservoir (ref.reservoirs).",
"catchment_id": "Catchment unit upstream of the dam (ref.catchments).",
"is_dam_unit": "True for the unit the dam sits in.",
"area_km2": "Area of the unit, km².",
"area_weight": "Share of the reservoir's total upstream area (sums to 1 per reservoir), for area-weighted rain.",
"upstream_reservoir_id": "Nearest other bulletin reservoir between this unit and the dam, if any: water from here is regulated by it before arriving."
}
},
"ref.reservoir_links": {
"doc": "How the reservoirs are connected, one row per direct link, water flowing from from_reservoir_id to to_reservoir_id. River links join each reservoir to the next one downstream on the river network, so following them upstream gives every reservoir that drains into a given one. Canal and transfer links (added from the river-basin plans) join reservoirs that no river connects. A reservoir with no row as from_reservoir_id drains to the sea or out of Spain without passing another bulletin reservoir.",
"columns": {
"from_reservoir_id": "Reservoir the water leaves (ref.reservoirs).",
"to_reservoir_id": "Reservoir the water reaches (ref.reservoirs).",
"link_type": "river (the next reservoir downstream on the river network), canal or transfer (built conduits, from the river-basin plans).",
"link_name": "Name of the canal or transfer; empty for river links.",
"length_km": "Length of the river path between the two dams, km (HydroRIVERS); for canals, the conduit length when the source gives it.",
"river_segments": "River links: HydroRIVERS segments walked from one dam to the next.",
"path": "River links: the river line from the upper dam to the lower one, LineString or MultiLineString, EPSG:4326. Null for canals whose route is not published.",
"confidence": "auto (computed, consistent), review (computed but doubtful: see notes) or reviewed (checked by hand).",
"notes": "Why a link needs review, or what the reviewer found.",
"source": "Key of the source: hydrorivers for river links; the plan and annex for canals and transfers."
}
},
"ref.municipalities": {
"doc": "Every municipality in Spain, one row each: INE code and name, province, autonomous community, official population and boundary. Key municipality_code is INE's 5-digit code (2 digits province + 3 municipality). Sources: INE (Relación de municipios y sus códigos; Cifras oficiales de población, Revisión del Padrón), IGN (INSPIRE administrative units).",
"columns": {
"municipality_code": "INE municipality code, 5 digits as text (keeps the leading zero: 05002). Key.",
"municipality_name": "Name as people write it, article first: \"Las Rozas de Madrid\". Bilingual names keep both forms: \"Donostia/San Sebastián\".",
"official_name": "Name exactly as in INE's register, article last: \"Rozas de Madrid, Las\".",
"province_code": "INE province code, 2 digits (the first two of municipality_code).",
"province_name": "Province, INE's official name (\"Alicante/Alacant\", \"A Coruña\", \"Illes Balears\").",
"region_code": "INE code of the autonomous community or city, 2 digits.",
"region_name": "Autonomous community or city (\"Comunidad de Madrid\", \"Ceuta\").",
"population": "Official population on 1 January of population_year (INE, Revisión del Padrón municipal).",
"population_year": "Year of the population figure.",
"area_km2": "Area of the boundary, km².",
"longitude": "A point guaranteed inside the municipality (not always the town centre), longitude, EPSG:4326.",
"latitude": "Latitude of the same point.",
"boundary": "Municipal boundary, MultiPolygon, EPSG:4326, simplified to about 20 m. Null where IGN has none.",
"source": "Key of the sources (ine-ign)."
}
},
"ref.supply_units": {
"doc": "Urban supply units (unidades de demanda urbana, UDU) as each river-basin plan defines them: a town, or a group of towns sharing intakes and a network; plus the bulk supply networks those units draw on (unit_type network). One row per unit. Which municipalities a unit serves is in ref.municipality_supply; where it takes its water, in ref.supply_sources.",
"columns": {
"supply_unit_id": "Key: basin_id and the plan's own code, \"ES030-SAT04A13\"; networks: basin_id and a short name, \"ES030-CYII\". Unique across basins.",
"basin_id": "River basin district whose plan defines the unit (ref.basins).",
"unit_code": "Code the plan gives the unit (SAT04A13).",
"unit_name": "Name the plan gives the unit (\"Majadahonda (CYII)\", \"Mancomunidad de Aguas del Sorbe\").",
"unit_type": "urban (a supply unit a river-basin plan defines, serving the municipalities in ref.municipality_supply) or network (a bulk supplier's system, such as Canal de Isabel II or the Mancomunidad de los Canales del Taibilla, that urban units take water from; its own sources are its rows in ref.supply_sources).",
"plan_cycle": "Planning cycle of the plan read (2022-2027).",
"source_document": "Document, annex and table the unit was read from.",
"source_url": "Where that document is published.",
"source": "Key of the source (ph-tajo-2022-2027, …)."
}
},
"ref.municipality_supply": {
"doc": "Which supply unit serves each municipality, as the river-basin plans assign them. One row per municipality and unit; a municipality split between units has one row each, with share_pct. Municipalities a loaded plan does not list have no row (yet).",
"columns": {
"municipality_code": "INE municipality code (ref.municipalities).",
"supply_unit_id": "Supply unit (ref.supply_units).",
"share_pct": "Share of the municipality's population this unit serves, 0–100, when the source gives the split; null when the unit serves all of it, or when a plan places the municipality in several units without saying how much each serves.",
"intake_description": "The plan's own description of where this municipality's water is taken, verbatim in Spanish (\"Toma en embalses de Guadiloba y Alcántara\"). ref.supply_sources holds the same, structured.",
"additional_intakes": "Further intakes the plan counts for this municipality besides the ordinary one, when it gives the number.",
"source": "Key of the source (ph-tajo-2022-2027, …)."
}
},
"ref.supply_sources": {
"doc": "Where a supply unit takes its water, one row per source: a reservoir, river, aquifer, spring, desalination plant, transfer or a network that brings water from elsewhere. A row with municipality_code applies to that municipality only (some plans describe intakes town by town); a row without it applies to every municipality of the unit. Reservoirs in MITECO's weekly bulletin carry reservoir_id, so their levels can be joined.",
"columns": {
"supply_unit_id": "Supply unit (ref.supply_units).",
"municipality_code": "Set when the source applies to one municipality of the unit only; null when it applies to the whole unit.",
"source_rank": "Order in which the plan lists the source, 1 first.",
"source_type": "reservoir, river (any watercourse: río, arroyo, garganta…), aquifer (groundwater), spring, desalination, transfer, or network (a supplier's network that brings water from its own sources, such as Canal de Isabel II).",
"source_name": "Name as the plan gives it (\"Picadas\", \"río Tiétar\", \"Talavera - Picadas II\"); null when the plan does not name it.",
"role": "main (the ordinary source), backup (reinforcement in dry periods or emergencies) or minor (a small part of the unit only).",
"reservoir_id": "The reservoir in MITECO's weekly bulletin (ref.reservoirs), when the source is one of them. Smaller reservoirs have none.",
"network_unit_id": "For network and transfer sources: the network's own row in ref.supply_units (unit_type network), whose sources say where that network takes its water. Follow it to reach the reservoirs behind a network.",
"water_body_code": "Code of the surface or groundwater body (masa de agua) when the plan gives it.",
"share_pct": "Share of the unit's water from this source, 0–100, when the plan gives it.",
"confidence": "auto (read from the plan by rule), review (read, but doubtful: see notes) or reviewed (written or checked by hand against the cited document).",
"notes": "Short remarks of ours, in English. The plan's wording is in ref.municipality_supply.intake_description.",
"source": "Key of the source (ph-tajo-2022-2027, …)."
}
},
"ref.river_intake_reservoirs": {
"doc": "Estimated, not stated by any plan: for a municipality whose supply takes water from a river (ref.supply_sources, source_type river) and that has no bulletin reservoir behind it otherwise, the bulletin reservoirs on a river of the same name, in the same basin district, whose water passes within 8 km of the municipality on its way down the river network (HydroSHEDS HydroRIVERS). Regulated tributaries are not included. One row per municipality, intake and reservoir. Peninsula only.",
"columns": {
"municipality_code": "INE municipality code (ref.municipalities).",
"supply_unit_id": "The supply unit whose river source this is (ref.supply_units).",
"source_name": "The river, as the plan names it (ref.supply_sources.source_name): \"río Mero\".",
"reservoir_id": "Bulletin reservoir upstream on that river (ref.reservoirs).",
"distance_km": "Closest distance from the river below the dam to the municipality's point (ref.municipalities longitude, latitude), km. The point stands in for the intake, whose place the plans do not give.",
"method": "How the link was made: river-name-downstream-8km.",
"source": "Key of the sources (ph-2022-2027 + hydrorivers)."
}
},
"ref.stations": {
"doc": "Every measuring station in one register: AEMET weather stations (official inventory), the SAIH real-time stations of each basin authority (MITECO's national SAIH register): reservoirs, river gauges and rain gauges, and the 519 active SiAR agro-weather stations (network siar, MAPA's Info/ESTACIONES, added 2026-11-17). MITECO's register lists no Cantábrico reservoir, so the 13 SAIH Cantábrico reservoir stations (the viewer's codes) were added by hand from sql/reference/stations_cantabrico.sql (2026-11-17). One row per physical station per network; station_id is network:native_code. Sources: AEMET OpenData, MITECO ArcGIS 'SAIH', SAIH Cantábrico viewer, SiAR API.",
"columns": {
"station_id": "network:native_code, unique across networks, e.g. saih-tajo:E_36, aemet:5769X. Key.",
"network": "Network: aemet, aca, siar, or saih-<basin> (saih-tajo, saih-ebro, …).",
"operator": "Organisation that runs the station.",
"native_code": "The station's code in its own network, as its feed uses it (for Júcar, Segura and Andalusia the register uses names).",
"station_name": "Name as published (for reservoir stations without one, the reservoir's name).",
"station_type": "reservoir, river_gauge, rain_gauge or weather_station.",
"variables": "What it measures: water_level, stored_volume, fill_pct, flow, precipitation, air_temperature, relative_humidity, wind, solar_radiation.",
"reservoir_id": "Reservoir it measures (ref.reservoirs); set for reservoir stations within 1.5 km of a bulletin dam (SAIH Cantábrico: matched by name and capacity).",
"basin_id": "River basin district (ref.basins).",
"catchment_id": "Catchment unit it sits in (ref.catchments); drives upstream-rain calculations. Null outside the Iberian peninsula.",
"elevation_m": "Station altitude, m (AEMET).",
"update_interval_minutes": "How often its source publishes a new value.",
"first_seen_at": "When it entered this register (UTC).",
"last_seen_at": "Last time a feed returned a value for it (UTC); filled by the ingestion.",
"location": "Station position, Point, EPSG:4326.",
"source": "Key of the source (aemet-opendata, miteco-arcgis, saih-cantabrico, saih-tajo, saih-ebro, saih-guadiana, saih-hidrosur, chduero-open-data, siar): where the row came from; hand-matched rows are loaded by sql/reference/stations_*.sql."
}
},
"obs.precipitation": {
"doc": "Rain measured at each gauge, always as the amount over an explicit interval, so 10-, 15-, 60-minute and daily networks can be added up. Append-only, partitioned by day of period_end_at. Sources: AEMET hourly observations (~830 stations, period_minutes 60) since 2026-11-10 22:00 UTC; SiAR daily totals (519 agro-weather stations, period_minutes 1440, the Europe/Madrid calendar day, a day late) since 2026-11-17 (sink siar_precipitation). Sinks deliver at least once: de-duplicate on (station_id, period_end_at, source). Real-time values are provisional (not validated by the publisher).",
"columns": {
"station_id": "Gauge (ref.stations).",
"period_start_at": "Start of the interval the rain fell in (UTC).",
"period_end_at": "End of the interval (UTC). AEMET's fint.",
"period_minutes": "Interval length in minutes (60 for AEMET, 1440 for SiAR's daily totals).",
"precipitation_mm": "Rain in the interval, mm (1 mm = 1 litre per m²).",
"is_provisional": "True for real-time values not yet validated by the publisher.",
"source": "Key of the source (aemet-opendata, siar).",
"__ingest_ts": "when the sink received the batch (RFC 3339, the intake's clock)"
}
},
"obs.weather": {
"doc": "Hourly temperature, humidity, wind and pressure at weather stations. Append-only, partitioned by day of observed_at. Today: AEMET hourly observations (~850 stations) since 2026-11-10 22:00 UTC. Provisional real-time values.",
"columns": {
"station_id": "Weather station (ref.stations).",
"observed_at": "End of the hour the values describe (UTC).",
"air_temperature_c": "Air temperature at the observation time, °C.",
"air_temperature_min_c": "Lowest temperature in the previous hour, °C.",
"air_temperature_max_c": "Highest temperature in the previous hour, °C.",
"relative_humidity_pct": "Relative humidity, %.",
"dew_point_c": "Dew point, °C.",
"wind_speed_ms": "Mean wind speed, m/s.",
"wind_gust_ms": "Strongest gust in the previous hour, m/s.",
"wind_direction_deg": "Direction the wind comes from, degrees (0 = north).",
"pressure_hpa": "Station-level air pressure, hPa.",
"is_provisional": "True for real-time values not yet validated.",
"source": "Key of the source (aemet-opendata).",
"__ingest_ts": "when the sink received the batch (RFC 3339, the intake's clock)"
}
},
"obs.reservoir_readings": {
"doc": "Live reservoir level and storage from each basin's SAIH network, Andalusia's Hidrosur, and the ACA's daily open data for Catalonia, plus inflow and outflow where published. Append-only, partitioned by day of observed_at. One row per station and observation time; sinks deliver at least once, so de-duplicate on (station_id, observed_at). Provisional real-time values.",
"columns": {
"station_id": "Reservoir station (ref.stations).",
"reservoir_id": "Reservoir (ref.reservoirs), copied from ref.stations for easy filtering.",
"observed_at": "Time of the reading (UTC).",
"water_level_masl": "Water surface height, metres above sea level.",
"stored_volume_hm3": "Water stored, hm³.",
"fill_pct": "Stored volume as a share of capacity, %, as published by the source.",
"inflow_m3s": "Water entering, m³/s, where published.",
"outflow_m3s": "Water released through the dam, m³/s, where published.",
"is_provisional": "True for real-time values not yet validated.",
"source": "Key of the source (saih-ebro, saih-guadalquivir, saih-segura, saih-minosil, saih-cantabrico, saih-guadiana, saih-tajo, saih-hidrosur, saih-duero (the CH Duero's open data), aca).",
"__ingest_ts": "when the sink received the batch (RFC 3339, the intake's clock)"
}
},
"obs.river_flow": {
"doc": "Flow and water depth at SAIH river gauges. A storm shows here as rising flow hours before reservoir levels move. Append-only, partitioned by day of observed_at; de-duplicate on (station_id, observed_at). Provisional real-time values.",
"columns": {
"station_id": "River gauge (ref.stations).",
"observed_at": "Time of the reading (UTC).",
"flow_m3s": "Water flowing past the gauge, m³/s.",
"water_level_m": "Water depth at the gauge, m.",
"is_provisional": "True for real-time values not yet validated.",
"source": "Key of the source (saih-ebro, …)."
}
},
"ref.grid_cells": {
"doc": "H3 resolution-6 cells (~37 km²) covering Spain's river basin districts: the grid rain is interpolated onto (now.rain_grid). Built by sql/reference/grid.sql.",
"columns": {
"h3_cell": "H3 cell index (resolution 6), as a hex string. Key.",
"basin_id": "River basin district the cell centre lies in.",
"cell_area_km2": "Cell area, km².",
"geometry": "Cell outline, Polygon, EPSG:4326."
}
},
"ref.catchment_cells": {
"doc": "Which H3 grid cells make up each catchment unit, so gridded rain can be averaged over any catchment. Built by sql/reference/grid.sql.",
"columns": {
"catchment_id": "Catchment unit (ref.catchments).",
"h3_cell": "Grid cell (ref.grid_cells).",
"cell_weight": "Weight of the cell within the unit (equal weights, summing to 1 per unit)."
}
},
"now.rain_grid": {
"doc": "Rain over the last 1, 6, 12, 24 and 72 hours on the H3 grid, interpolated from every gauge within 40 km (inverse-distance weighting, power 2, 1 km smoothing). A gauge counts in a window when it reported at least 75% of it. Rebuilt hourly inside LakehouseBox by sql/now/rain_grid.sql.",
"columns": {
"h3_cell": "Grid cell (ref.grid_cells).",
"time_window": "1h, 6h, 12h, 24h or 72h, ending at as_of.",
"as_of": "End of the window: the latest hour at least half the gauges have reported (UTC).",
"rain_mm": "Interpolated rain depth, mm.",
"stations_used": "Gauges within 40 km that contributed.",
"nearest_station_km": "Distance to the nearest contributing gauge, km. Large values mean low confidence.",
"__ingest_ts": "when the sink received the batch (RFC 3339, the intake's clock)"
}
},
"now.upstream_rain": {
"doc": "Rain over all the land that drains into each reservoir, per window: the gridded rain averaged over the reservoir's upstream catchment units (ref.reservoir_catchments), also expressed as a volume so it compares with the reservoir's change. Rebuilt hourly inside LakehouseBox by sql/now/upstream_rain.sql.",
"columns": {
"reservoir_id": "Reservoir (ref.reservoirs).",
"time_window": "1h, 6h, 12h, 24h or 72h.",
"as_of": "End of the window (UTC).",
"areal_rain_mm": "Average rain depth over the upstream area, mm.",
"max_station_rain_mm": "Highest single gauge inside the upstream area, mm.",
"rain_volume_hm3": "areal_rain_mm × upstream area ÷ 1000: water that fell, hm³. Not all of it reaches the reservoir.",
"upstream_area_km2": "Upstream area the average is taken over, km².",
"area_covered_pct": "Share of the upstream area with an interpolated value (gauges within 40 km), %.",
"stations_reporting": "Gauges inside the upstream area that reported in the window.",
"__ingest_ts": "when the sink received the batch (RFC 3339, the intake's clock)"
}
},
"now.reservoir_status": {
"doc": "One row per bulletin reservoir with its latest state, recent change, the rain upstream and how it compares with the same week last year and the 10-year average. The main table the map draws. Live SAIH fields fill in as obs.reservoir_readings is ingested; until then the source is the weekly bulletin. Rebuilt hourly inside LakehouseBox by sql/now/reservoir_status.sql.",
"columns": {
"reservoir_id": "Reservoir (ref.reservoirs).",
"as_of": "When this row was computed (UTC).",
"latest_reading_at": "Time of the newest value used (UTC).",
"data_source": "saih-<basin> for a live reading (under 6 h old), aca for the ACA's daily reading (under 36 h old), or miteco-weekly for the bulletin.",
"stored_volume_hm3": "Latest stored volume, hm³.",
"capacity_hm3": "Capacity, hm³.",
"fill_pct": "Latest fill level, %.",
"change_6h_hm3": "Change over 6 hours, hm³ (live stations only).",
"change_24h_hm3": "Change over 24 hours, hm³ (live stations only).",
"change_72h_hm3": "Change over 72 hours, hm³ (live stations only).",
"change_12h_hm3": "Change over 12 hours, hm³ (live stations only).",
"change_48h_hm3": "Change over 48 hours, hm³ (live stations only).",
"change_since_bulletin_hm3": "Change since the last weekly bulletin, hm³ (live stations only).",
"weekly_change_hm3": "Change in the last weekly bulletin, hm³.",
"inflow_m3s": "Latest inflow, m³/s, where published.",
"outflow_m3s": "Latest release, m³/s, where published.",
"upstream_rain_24h_mm": "From now.upstream_rain.",
"upstream_rain_volume_24h_hm3": "From now.upstream_rain.",
"upstream_rain_72h_mm": "From now.upstream_rain.",
"fill_pct_same_week_last_year": "Fill in the bulletin closest to the same date last year, %.",
"fill_pct_10y_average": "Average fill in the same week over the last 10 years, %.",
"data_age_minutes": "Minutes since latest_reading_at.",
"reservoir_name": "Reservoir name, as in the weekly bulletin (copied from ref.reservoirs so a reader needs no join).",
"basin_name": "Name of the river basin district (ref.basins).",
"river_name": "River the dam is on (MITECO inventory).",
"province": "Province where the dam stands (MITECO inventory).",
"region": "Comunidad autónoma where the dam stands (MITECO inventory).",
"longitude": "Longitude of the dam, WGS84 degrees: the same point as ref.reservoirs.dam_location, as a number, so no spatial extension is needed.",
"latitude": "Latitude of the dam, WGS84 degrees."
}
},
"now.basin_summary": {
"doc": "Totals per river basin district for headlines: stored water vs capacity, last year and the 10-year average, and rain over the district. Rebuilt hourly inside LakehouseBox by sql/now/basin_summary.sql.",
"columns": {
"basin_id": "District (ref.basins).",
"as_of": "When this row was computed (UTC).",
"stored_volume_hm3": "Sum over its bulletin reservoirs, hm³.",
"capacity_hm3": "Sum of capacities, hm³.",
"fill_pct": "Stored ÷ capacity, %.",
"weekly_change_hm3": "Change in the last weekly bulletin, hm³.",
"change_24h_hm3": "Change over 24 hours from live stations, hm³.",
"fill_pct_same_week_last_year": "District fill in the same week last year, %.",
"fill_pct_10y_average": "Average district fill in the same week over 10 years, %.",
"areal_rain_24h_mm": "Average interpolated rain over the district in 24 hours, mm.",
"reservoirs_live": "Reservoirs with a live reading under 3 hours old.",
"reservoirs_total": "Bulletin reservoirs in the district.",
"__ingest_ts": "when the sink received the batch (RFC 3339, the intake's clock)"
}
},
"now.station_status": {
"doc": "What a station page shows: latest weather, recent rain, and rain since 1 October compared with the previous two hydrological years. Rebuilt hourly inside LakehouseBox by sql/now/station_status.sql.",
"columns": {
"station_id": "Station (ref.stations).",
"as_of": "End of the rain windows (UTC).",
"latest_observation_at": "Newest weather observation (UTC).",
"air_temperature_c": "Latest temperature, °C.",
"relative_humidity_pct": "Latest humidity, %.",
"rain_1h_mm": "Rain in the last hour, mm.",
"rain_6h_mm": "Rain in the last 6 hours, mm.",
"rain_12h_mm": "Rain in the last 12 hours, mm.",
"rain_24h_mm": "Rain in the last 24 hours, mm.",
"rain_hydro_year_mm": "Rain since 1 October (daily values, then hourly after the last daily value), mm.",
"hydro_year_daily_through": "Last day covered by AEMET's daily values (they run ~4 days behind).",
"rain_same_period_last_year_mm": "Rain from 1 October to the same date last year, mm.",
"rain_last_hydro_year_total_mm": "Total of the previous October–September year, mm.",
"rain_two_years_ago_total_mm": "Total of the October–September year before that, mm.",
"data_age_minutes": "Minutes since latest_observation_at.",
"station_name": "Station name (copied from ref.stations so a reader needs no join).",
"basin_name": "Name of the river basin district the station is in (ref.basins).",
"longitude": "Longitude of the station, WGS84 degrees: the same point as ref.stations.location, as a number, so no spatial extension is needed.",
"latitude": "Latitude of the station, WGS84 degrees."
}
},
"now.municipality_water": {
"doc": "One row per municipality: where its tap water comes from and how full the reservoirs behind it are together. Reservoirs counted are those its supply units take water from (directly or through a network such as Canal de Isabel II or a transfer) plus every reservoir upstream of them on the river network; the level is weighted by capacity, so a large reservoir counts for more than a small one. Where no plan names a reservoir behind the supply but it takes water from a river, the reservoirs upstream on that river count instead (an estimate: ref.river_intake_reservoirs, listed in river_reservoir_ids). Municipalities served only by groundwater, desalination or rivers with no bulletin reservoir upstream have no level. Rebuilt hourly inside LakehouseBox by sql/now/municipality_water.sql from ref.municipality_supply, ref.supply_sources, ref.reservoir_links, ref.river_intake_reservoirs and now.reservoir_status.",
"columns": {
"municipality_code": "INE municipality code (ref.municipalities).",
"municipality_name": "Name as people write it.",
"province_name": "Province.",
"population": "Official population (ref.municipalities).",
"supply_unit_names": "Supply units serving the municipality, as the river-basin plans name them; empty when no loaded plan places it.",
"source_types": "Kinds of source its water comes from, through networks too: reservoir, river, aquifer, spring, desalination, transfer, reclaimed.",
"source_reservoir_ids": "Bulletin reservoirs the supply takes water from (ref.reservoirs), directly or through networks and transfers.",
"upstream_reservoir_ids": "Bulletin reservoirs upstream of those on the river network (ref.reservoir_links), whose water flows down to them.",
"reservoirs": "Reservoirs counted in the level: source and upstream ones with a current reading.",
"stored_volume_hm3": "Water stored in them now, hm³ (now.reservoir_status).",
"capacity_hm3": "Their total capacity, hm³.",
"fill_pct": "stored_volume_hm3 ÷ capacity_hm3, %: how full the water behind this tap is, a large reservoir weighing more than a small one.",
"fill_pct_same_week_last_year": "The same, for the same week a year ago, capacity-weighted, %.",
"fill_pct_10y_average": "The same week averaged over the previous 10 years, capacity-weighted, %.",
"as_of": "When the reservoir levels were last updated (now.reservoir_status), UTC.",
"river_reservoir_ids": "Estimated: bulletin reservoirs upstream of the municipality's river intakes (ref.river_intake_reservoirs), used only where no plan names a reservoir behind its supply. They count in the levels.",
"__ingest_ts": "when the sink received the batch (RFC 3339, the intake's clock)"
}
},
"obs.reservoir_weekly": {
"doc": "MITECO weekly reservoir bulletin (Boletin Hidrologico), one row per reservoir and bulletin, 1988-01-05 onward. Peninsular reservoirs > 5 hm3. Source: MITECO ArcGIS FeatureServer Embalses_Total (backfill by ingest/miteco_reservoir_weekly.py). Bulletins are Tuesdays.",
"columns": {
"reservoir_id": "MITECO EMBALSE_ID, stable reservoir id (note: Pajares/Ebro appears as 353 in 2003 and 362 from 2006)",
"bulletin_date": "Bulletin date (a Tuesday), from fecha at 00:00 UTC",
"bulletin_year": "boletin_anyo, calendar year of the bulletin",
"bulletin_number": "boletin_num, bulletin number within the year",
"stored_volume_hm3": "agua_actual: water stored on the bulletin date, hm3",
"capacity_hm3": "agua_total: capacity at normal maximum level, hm3 (0 for some rows)",
"fill_pct": "stored/capacity*100, 2 dp; null when capacity is 0 or null. Source errors make a few rows exceed 100 (max 700)",
"weekly_change_hm3": "stored_volume_hm3 minus the same reservoir's previous bulletin; null for its first bulletin (a few gaps span more than a week)",
"stored_energy_gwh": "energia_actual: theoretical hydroelectric energy stored, GWh (null/0 for non-hydro reservoirs)",
"energy_capacity_gwh": "energia_total: hydroelectric energy at capacity, GWh",
"source": "'miteco-arcgis'",
"__ingest_ts": "when the sink received the batch (RFC 3339, the intake's clock)"
}
},
"obs.daily_weather": {
"doc": "AEMET daily climatological values, one row per station and day, all stations, 2023-10-01 onward (AEMET publishes ~4 days late). Source: AEMET OpenData valores/climatologicos/diarios (backfill by ingest/aemet_daily.py).",
"columns": {
"station_id": "'aemet:' || AEMET indicativo (same ids as obs.weather / obs.precipitation)",
"observation_date": "AEMET fecha (climatological day)",
"precipitation_mm": "prec: precipitation 07 to 07 UTC, mm. 'Ip' (<0.1 mm) -> 0.0; 'Acum' or missing -> null",
"air_temperature_mean_c": "tmed, daily mean air temperature, degC",
"air_temperature_min_c": "tmin, daily minimum air temperature, degC",
"air_temperature_max_c": "tmax, daily maximum air temperature, degC",
"relative_humidity_mean_pct": "hrMedia, daily mean relative humidity, %",
"hydrological_year": "Year of the 1 October the date falls on or after (2025-10-01..2026-09-30 -> 2025)",
"is_complete": "false when prec is missing, 'Acum' or non-numeric",
"source": "'aemet-climatological'"
}
},
"ref.map_outlines": {
"doc": "Simplified outlines for drawing a map of Spain (peninsula and Balearic Islands): river basin districts, comunidades autónomas, provinces, the main rivers and the catchment of each reservoir. The shape is GeoJSON text, so it can be read without a spatial extension (for example from a browser). For analysis use ref.basins, ref.rivers and ref.catchments, which hold the full geometry. Static: loaded once by sql/reference/map_outlines.sql.",
"columns": {
"layer": "What the outline is: basin, region (comunidad autónoma), province, river, or catchment (the area that drains to one reservoir).",
"outline_id": "Identifier within the layer: basin_id for basins (ref.basins), the name for regions and provinces, a running number for rivers, reservoir_id for catchments (ref.reservoirs).",
"name": "Name to show. For basins it equals ref.basins.basin_name; regions and provinces use the official Spanish names. Empty for rivers.",
"stream_order": "Rivers only: stream order (HydroRIVERS), larger for main stems.",
"mean_flow_m3s": "Rivers only: long-term mean discharge in m³/s (HydroRIVERS), useful for line width.",
"geojson": "GeoJSON geometry as text (Polygon, MultiPolygon, LineString or MultiLineString), WGS84 longitude and latitude, simplified for display.",
"source": "Where the outline comes from."
}
},
"ref.municipality_outlines": {
"doc": "Simplified outline of every municipality, for drawing a map (for example in a browser, without a spatial extension). GeoJSON text, WGS84, simplified to about 200 m. Partitioned by province_code, so reading one province reads one file. For analysis use ref.municipalities.boundary, the full geometry. Static: loaded by sql/reference/municipality_outlines.sql from ref.municipalities.",
"columns": {
"municipality_code": "INE municipality code (ref.municipalities).",
"province_code": "INE province code, the first two digits of municipality_code; the partition.",
"municipality_name": "Name as people write it (ref.municipalities.municipality_name).",
"geojson": "GeoJSON geometry as text (Polygon or MultiPolygon), WGS84 longitude and latitude, simplified for display (tolerance 0.002°, coordinates to 0.0001°). Neighbouring outlines are simplified one by one, so they may not meet exactly.",
"source": "Where the outline comes from."
}
},
"now.municipality_path": {
"doc": "Where each municipality's tap water comes from, step by step: its supply units and their sources (depth 0), then the sources of each network or transfer they draw on (depth 1, 2 …). One row per unit and source, in municipality order. Built inside LakehouseBox by sql/now/municipality_path.sql from ref.municipality_supply, ref.supply_units, ref.supply_sources and ref.river_intake_reservoirs: once a day, and at once after those tables are reloaded.",
"columns": {
"province_code": "INE province code, the first two digits of municipality_code.",
"municipality_code": "INE municipality code (ref.municipalities).",
"depth": "0: a supply unit of the municipality; 1 and more: a network or transfer reached through the units above it.",
"id": "Supply unit or network (ref.supply_units.supply_unit_id).",
"unit": "Its name, as the basin plan or the network gives it.",
"type": "urban or network (ref.supply_units.unit_type).",
"doc": "The document it was read from.",
"url": "Where that document is published.",
"source_type": "reservoir, river, aquifer, spring, desalination, transfer, reclaimed or network; null when the plan names no source.",
"source_name": "The source, as the plan names it.",
"reservoir_id": "Bulletin reservoir (ref.reservoirs), for a reservoir source.",
"network_unit_id": "For a network or transfer source: the unit whose own sources follow at the next depth.",
"role": "backup for a source used only in droughts or emergencies; otherwise null.",
"river_reservoir_ids": "For a river source: bulletin reservoirs upstream of the intake on that river (ref.river_intake_reservoirs). An estimate, not stated by the plan.",
"__ingest_ts": "when the sink received the batch (RFC 3339, the intake's clock)"
}
}
}