PyPSA model of an energy district located in South Italy

here is a PyPSA model of an energy district located in South Italy and supplying baseload electricity and hydrogen services Git-Hub repo

Why a single-district model

Before starting a detailed network model for Italy I wanted to assess some issues that I hypothesized as relevant for energy scenarios in Italy—and in fact my results show that these are three crucial points:

  • Prospective onshore wind with site-specific optimization, i.e. 2050 capacity factors that are not underestimated.
  • PV with high capacity factor as allowed by ground-based PV (GPV) with mono-axial tracking versus solar rooftop.
  • Lack of low-cost geological storage for hydrogen.

You may want to look up news from Italy to get an idea about our current energy “debate”. For example, the government intention of reintroducing nuclear and the unfounded criticism against land-based solar.

Given this unfortunate setting that will likely delay decarbonization in Italy,
a single-district scenario may be useful to compare the choice of installing a nuclear reactor or solar-wind-storage with the same level of service for a given territory.
This is why this district is sized for baseload services and such that one 1.5 GWe nuclear reactor could supply them.

Moreover, there are other minor issues that I wanted to explore before doing a full-scale national scenario:

  • Pumped Hydro Storage (PHS) as a conservative assumption on storage technologies.
  • Methanation for its synergies with the agro-forestry sector (relevant in South Italy).

PHS is a mature technology and further cost decreases are not expected.
Italy has a large techno-economical potential of closed-loop off-river PHS, see Stocks et al. 2021.
This potential is two orders of magnitude larger than what will be reasonably necessary.
PHS may have synergies with other public interests besides decarbonization, namely the minimization of extreme-weather risks under climate change such as droughts and floods.

Methanation will both offer synergies with the agro-forestry sector and solve the issue of lack of low-cost geological storage for hydrogen.
In Italy the geological storage capacity of fossil gas (I refuse to call it “natural”) is 200 TWh_thermal, one order of magnitude less than what would be necessary.

Why I’ve forked w.r.t. PyPSA

This is a relatively simple model, I didn’t need full PyPSA support, but there are a few issues that motivated the fork.

First, and foremost, I had to renounce to Atlite for the onshore wind capacity factor (CF).
In an orographically complex country such as Italy the wide-area averaging bias is significant, and it is further compounded by assuming only one average wind turbine type and hub height, instead of optimizing for local conditions.
This is why I’ve used a capacity factor for the studied area from Ryberg et al. 2019 where prospective wind turbines are granularly optimized.
Given this yearly CF, I’ve searched for a compatible hourly CF in
I’ve then used as well for GPV in the same area and year.
A manual and cumbersome procedure, I acknowledge, but this is the only way to get 2050 CFs for land-based solar and wind that are not underestimated.
I understand that for flat countries all this does not matter, but in mountainous countries such as Italy it does.
I would have much preferred to have hourly wind CFs directly from the results of Ryberg et al. where the reanalysis meteo data are corrected by the Global Wind Atlas.
But I’ve no idea how to do it, and there is more in the method of Ryberg et al. (notably single turbine siting by ellipses, and multi-year LCOE optimization of specific power and hub height).

Second, I wanted to use some additional data sources for the techno-economical parameters, see Section 3 of the current draft.
I’ve also modified the procedure for the cost computation. I had to handle nuclear and there the F&OM vs V&OM distinction is tricky. The investment for nuclear now accounts for the construction time from an overnight capital value.
The resulting OPEX and LCOE values as a function of the nuclear CF show a good alignment with the IEA Net-Zero-2050 report, see Section 3.2 of the mentioned draft.

Third, and this is a minor issue that you may want to skip, I just wanted to double-check the model results and I’ve created some redundant (and fragile) post-opt data structures.
This was my first PyPSA model, so please excuse me for being so suspicious to have to double-check the results!
This part of the code will be scrapped in future versions. In the meantime, I use it to generate new types of figures for results analysis.


Thanks to all of you for this great open source tool.
I’ve unappealing memories from a geological era ago, the late '90s, when energy scenario optimization was based on inaccessible codes.
Nowadays, instead, energy scenarios can be easily reproduced and the underlying assumptions debated.
It really makes a huge difference!