Support runs without EU27 countries (e.g. GB)
Version Checks (indicate both or one)
-
[x] I have confirmed this bug exists on the lastest release of PyPSA-Eur.
-
[x] I have confirmed this bug exists on the current
masterbranch of PyPSA-Eur.
Issue Description
Currently running the config.default.yaml in PyPSA-Eur with just 1 or 2 changes such that it only covers GB as a country. So I have adjusted the countries and cutout options.
I am running it as a sector coupled network : snakemake -call all
However, when reaching the rule : build_energy_totals, GB is not recognised as a country.
I printed out the country codes in that section of the code (eu27) :
['AT', 'BE', 'BG', 'HR', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE']
and GB is not in the eu27. This means that I get an empty index in idees_countries, which causes an error to be thrown.
Is this a genuinine issue with the code? or is there a way I can alter the code or config to bypass this?
let me know if more information is needed.
Reproducible Example
using config.default.yaml, countries set to just ["GB"], and a cutout that covers just GB too.
Expected Behavior
Traceback (most recent call last):
File "C:\Shared_Data\pypsa-eur.snakemake\scripts\tmp591x4zza.build_energy_totals.py", line 1610, in
Installed Versions
There is also no GB in the jrc-idees-2021 which I assume is why it was disregarded in eu27. Do I have to skip the build_energy_totals rule entirely?
Yes, reproduced this problem just now.
Potential workaround, include IE and drop later -- until we fix it. Shouldn't be too difficult.