ED.GEN
Power generation by technology (MW) — single value.
Signature
ED.GEN([tech], [date], [hour], [minute], [tz])Description
Returns generation (MW) for a technology at one timestamp. Source is REE / ESIOS at native 5-minute resolution. Pass minute for an exact 5-min value; omit it for the hourly average.
Tech codes: 1=solar_pv, 2=wind, 3=nuclear, 4=hydro, 5=combined_cycle (gas), 6=coal, 7=solar_thermal, 8=total, 9=renewable, 10=thermal, 11=fossil — plus string aliases for ENTSO-E-only techs (biomass, oil, geothermal, etc.). Full list in the value table below. For named technologies see the metric catalog at /data/catalog (e.g. gen_solar_pv, gen_combined_cycle).
Pass tz to switch the timezone interpretation: 0/madrid (default, DST-aware), 1/cet (UTC+1 fixed — 8760 hourly buckets/year), or 2/utc. See /docs/concepts for why this matters around the spring/autumn DST transitions.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| tech | 1-11 | string | 1 (solar_pv) | Tech code or name (see table below). Codes 8-11 are virtual aggregates (total / renewable / thermal / fossil). |
| date | date | — | Date. Omit for the latest hour. |
| hour | 0-23 | — | Hour of day. Omit for the latest hour. |
| minute | 0,5,10...55 | — | 5-min slot inside the hour. Omit for the hourly average. |
| tz | 0 | 1 | 2 | "madrid" | Madrid (DST-aware) / CET (fixed) / UTC. |
Valid values for tech
| Code | English alias | Description |
|---|---|---|
| 1 | solar_pv, solar, pv, fotovoltaica | Solar photovoltaic only (ESIOS 1295). For combined PV + thermosolar use ED.RANGE on gen_solar_pv and gen_solar_thermal separately. |
| 2 | wind, eolica | Onshore wind (ESIOS 551). |
| 3 | nuclear | Nuclear — Almaraz, Ascó, Vandellós, Cofrentes, Trillo (ESIOS 549). |
| 4 | hydro, hidraulica | Reservoir + run-of-river hydro (ESIOS 546). Excludes pumped storage. |
| 5 | combined_cycle, ccgt, gas | Combined-cycle gas (ESIOS 550). |
| 6 | coal, carbon | Coal-fired thermal (ESIOS 547). Largely retired since 2020. |
| 7 | solar_thermal, termosolar, thermosolar, csp | Concentrated solar thermal (ESIOS 1294). |
| 8 | total, all | All techs combined — solar_pv + solar_thermal + wind + nuclear + hydro + ccgt + coal + cogeneration + biomass + fuel_gas + pumped_storage (+ ENTSO-E catch-alls in non-ES zones). Excludes gen_exchanges and gen_pumped_consumption. Matches REE published peninsular generation within ~1-2%. Maps to gen_total. |
| 9 | renewable, renovable | Renewable techs only — solar_pv + solar_thermal + wind + hydro + biomass + geothermal + other_renewable. Pumped-hydro generation excluded to avoid double-counting the underlying energy. Maps to gen_renewable. |
| 10 | thermal, termica | Thermal techs — nuclear + ccgt + coal + oil + cogeneration + fuel_gas. Includes nuclear (thermal but non-fossil) and CHP (cogeneration). Maps to gen_thermal. |
| 11 | fossil, fosil | Fossil-fuel techs only — ccgt + coal + oil + cogeneration + fuel_gas. Excludes nuclear by design. Useful for emissions analysis. Maps to gen_fossil. |
| biomass | biomasa | Biomass + biogas. ENTSO-E sourced; mostly non-ES zones. |
| oil | — | Oil-fired generation. ENTSO-E sourced. |
| geothermal | — | Geothermal. ENTSO-E sourced. |
| other_renewable | — | Other renewables (small hydro, etc.). ENTSO-E sourced. |
| waste | — | Waste-to-energy. ENTSO-E sourced. |
| other | — | Other / unclassified generation. ENTSO-E sourced. |
| exchanges | interchange | Net international interchanges (ESIOS 553). Positive = import to Spain. |
The add-in accepts either the canonical Spanish code or the English alias — both are equivalent.
Returns
Number — generation in MW.
Examples
=ED.GEN(1, "2025-07-01", 14)— Solar PV at hour 14 average=ED.GEN(7, "2025-07-01", 14)— Solar thermal (termosolar) at hour 14 — new in v7.1.9=ED.GEN(2, "2025-07-01", 14, 30)— Wind at 14:30 (5-min slot)=ED.GEN(3)— Latest nuclear output=ED.GEN("hydro", "2025-07-01")— Hydro daily average (named tech)=ED.GET("gen_biomass", "2025-07-01")— For ENTSO-E-only techs use ED.GET with the metric name directly.=ED.GET("gen_total")— All-tech sum (MW) — virtual aggregate via ED.GETNotes
- Need the total across all techs? Use the virtual aggregates:
gen_total,gen_renewable,gen_thermal,gen_fossil. Available viaED.GET(single value) andED.RANGE(time series). They sum the per-tech series at each native timestamp before aggregation.