pypsa-meets-earth / pypsa-earth-sec

GNU General Public License v3.0
19 stars 16 forks source link

Demand workflow #219

Closed hazemakhalek closed 10 months ago

hazemakhalek commented 10 months ago

Closes # 79

Changes proposed in this Pull Request

This PR downloads the energy balances from UNSD, filters them by the chosen base year and country and processes the data to the sectors and carriers included in the model. The main output is: energy_totals for any country of the world for any historic year.

Following PR will project the energy_balances to the future (planning_horizons) year.

Checklist

hazemakhalek commented 10 months ago

@energyLS @davide-f we have a new package here: py7zr. Should I issue a pypsa-earth PR for this?

davide-f commented 10 months ago

Yeah, please :) Add a Pr to add the dependency

energyLS commented 10 months ago

@hazemakhalek could you either add the UNSD to the data/ folder or provide a snakemake rule which downloads it? Currently the rule points to a only locally available file.

hazemakhalek commented 10 months ago

@davide-f, will do

hazemakhalek commented 10 months ago

@energyLS , will do. Also finishing up the projection feature. Will ping you when ready

hazemakhalek commented 10 months ago

@davide-f I issued the PR for the new dependency.

davide-f commented 10 months ago

I'm updating the submodule to the latest version of the repo: https://github.com/pypsa-meets-earth/pypsa-earth-sec/pull/228

That should fix the issue once complete. I expect no breaking changes except the revision of the cutout name

hazemakhalek commented 10 months ago

Next steps:

hazemakhalek commented 10 months ago

First testing shows: 2030 works, 2040 throws error, 2050 works but has the same values as 2030. What is the issue here? @energyLS "2030 and 2050 are similar": Any time horizon you choose will be based on the parameters of the new csv files (growth factors, efficiency gains and fuel shares). These are not scenario specific, so the user needs to change them when the change the year to to complete the scenario definition. "2040 throwing an error": Maybe this is an issue of the costs file not existing for 2040, or do you mean the script itself fails?

energyLS commented 10 months ago

@hazemakhalek I have checked this again, this error for e.g. appears due to missing config factors of e.g. fuell cell share. So this would just needed to be added to the config, but this could be done user specific and does not have to be part of the PR. One important thing though: since efficiency_gains is currently for 2030 only, could you rename it to e.g. efficiency_gains_2030 to avoid confusion? The implementation of yearly efficiency gains could be done in a seperate PR :)

First testing shows: 2030 works, 2040 throws error, 2050 works but has the same values as 2030. What is the issue here? @energyLS "2030 and 2050 are similar": Any time horizon you choose will be based on the parameters of the new csv files (growth factors, efficiency gains and fuel shares). These are not scenario specific, so the user needs to change them when the change the year to to complete the scenario definition. "2040 throwing an error": Maybe this is an issue of the costs file not existing for 2040, or do you mean the script itself fails?

hazemakhalek commented 10 months ago

@energyLS I actually didn't want to leave something for later so I implemented the cagr now. Let's see what the CI says about it :)

energyLS commented 10 months ago

@energyLS I actually didn't want to leave something for later so I implemented the cagr now. Let's see what the CI says about it :)

Fantastic, thanks!