-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update powerplants according to new powerplantmatching version #84
Conversation
…into eb5194-add_own_carriers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
scripts/add_electricity.py
Outdated
.difference(estim_hydro_max_hours.dropna().index)) | ||
if not missing_countries.empty: | ||
logger.warning("Assuming max_hours=6 for hydro reservoirs in the countries: {}" | ||
.format(", ".join(missing_countries))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need these amazingly crude estimations, how well does just using the JRC data work out?
snakemake.input.hydro_capacities
contain hand researched energy storage capacities from Emil. Maybe check in his thesis for the full references: /home/vres/data/literature/MasterThesis/150729_MasterThesis_EmilEriksen.pdf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we have to rely on them a bit longer. So far only roughly a third of all hydro dams in JRC have stated storage capacities. But then on the other hand, the question is, is it worth it to modify the option
hydro_max_hours == 'estimate_by_large_installations'
so that non-NA max_hours
values are untouched?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, i'd think so!
Hi Fabian, sure I'm fine with reducing the code and your adaption (which I also tried to realise in a later commit in #64 , see ffef74e). Yet the functionality now is a bit different if I understand correctly? I suggested to allow the user to add a type of carrier in a specific country or replace all of them (instead of only replacing as in your version above). Also I cannot find the restriction to a specific build year? That was only 5 lines of code or so |
Let's make the build year restriction a separate PR. |
hey @eb5194, the query function allows you to do all three points
Does that cover what you mean? |
Yes it does. Thanks for the explanation - I imagined query's functionality less powerful, then. Awesome! |
ok cool |
Update powerplants according to new powerplantmatching version
This PR inlcudes a revision of
build_powerplants.py
andadd_electricity.py
Conclusion:
query
functions are the right choice here))Some technical remarks:
load_powerplants
does not take the network as an argument anymore, as the filtering of nodes (as for what it was used before) is already taking place inbuild_powerplants.py
load_powerplants
now converts column names according topypsa.generators
columns. Before, this was done on the run inattach_conventional_generators
, but since it is also necessary forattach_extendable_generators
, I guess, it makes more sense in this wayattach_hydro
now splits theppl
frame intoror
,phs
andhydro
pieces where only respective generators are included. These are then directlymadd
ed to the network (if not empty). There is no inflow for phs anymore as this information is not statet by the JRC dataattach_hydro
andhydro_max_hours == 'energy_capacity_totals_by_country'
, then only missing values ofmax_hours
are scaled up. Other hydro dams with non-NAmax_hours
value are untouched.