Closed asolavi closed 1 year ago
One question for the experts:
resources/renewable_profiles/profile_hydro.nc
in MW or in a "water unit" (e.g., depth of water in meters if it were spread over the corresponding region/cell)?One question for the experts:
- Are inflows from the xarray in
resources/renewable_profiles/profile_hydro.nc
in MW or in a "water unit" (e.g., depth of water in meters if it were spread over the corresponding region/cell)?
Hello @asolavi! Fantastic work 😄
Great to have well-elaborated explanation of details of hydro calculations. To me, our hydro calculations still have a bit of mystery :)
According to the docstring, the hydro profiles inflows are in MW.
That simplifies work with hydro generation, e.g. we need only account for GWh -> W transformation when doing normalisation of hydro.
Although, I can't say that unit transformation is absolutely evident for me from atlite
source code, where shift_and_aggregate_runoff_for_plants() function is used to translate water depth per cell area into MW.
Thank you @ekatef. I've been further looking into this and, from my understanding, it seems that:
cutouts/{cutout_name}-2013-era5.nc
has the surface runoff in depth of water in meters if it were spread over the corresponding region/cell.
As you mentioned above, the docstring in build_renewable_profiles.py suggests that inflows are in MW already.
The file data/eia_hydro_annual_generation.csv
is expressed in billions kWh per year. This is one of the possibile sources to do the normalization.
I also don't see exactly where the transformation from depth of water per area to an energy unit happens. I suspect that it takes place indirectly in the normalization. This is because the normalization makes the total hydro generation equal to the total generation of an energy metric (MWh or another one), while preserving the local distribution across several regions from the ERA5 dataset.
What do you think? Is this reasonable?
Thank you @ekatef. I've been further looking into this and, from my understanding, it seems that:
cutouts/{cutout_name}-2013-era5.nc
has the surface runoff in depth of water in meters if it were spread over the corresponding region/cell.As you mentioned above, the docstring in build_renewable_profiles.py suggests that inflows are in MW already.
The file
data/eia_hydro_annual_generation.csv
is expressed in billions kWh per year. This is one of the possibile sources to do the normalization.I also don't see exactly where the transformation from depth of water per area to an energy unit happens. I suspect that it takes place indirectly in the normalization. This is because the normalization makes the total hydro generation equal to the total generation of an energy metric (MWh or another one), while preserving the local distribution across several regions from the ERA5 dataset.
What do you think? Is this reasonable?
I think you may be absolutely right. It looks like we silently assume during normalisation that hydropower generation linearly depends on runoff, and scaling is used both for value and unit transformation. If that is the case, probably the docstring can be a bit clarified in part where inflows are introduced.
I'd suggest to discuss it during today's meeting, as it feels like a major question.
Hi @ekatef and @tacwebservices,
as per the discussion yesterday, I've improved the description on the units used for water inflows at every step of the process. I think it is now ready to merge :). Let me know if you agree, or if there is anything that should be changed.
Hey @asolavi and @tacwebservices! Great and very helpful work 🙂
A couple of minor comments (sorry, can't paste it into the code, as git complains on big diff size).
Add hydro types
: not sure it it's clear, could it be probably improved.Otherwise, looks perfect to me 🙂 @davide-f would you have any comments?
Hello @asolavi and @tacwebservices ! :D Great job as always! You are amazing in documentation!!!
The PR is in good state,I'd have few comments:
The rest is perfect :) Great job!
Thank you for your detailed feedback @ekatef and @davide-f. I believe it has now been implemented and it is ready to merge :). Let me know what you think
Looks good to me :) If Katia agrees we can merge. Amazing! :D
Agree that the PR looks ready to go :) Great work @tacwebservices and @asolavi!
Merged, fantastic job! :D
Great, thank you for your help and feedback @davide-f @ekatef
Closes [#54 ]
This PR aims to create a section on hydro in the build_renewable_profile.ipynb notebook, detailing the process made to create the hydro time series. Currently, built_renewable_profile.ipynb focuses on wind and solar.
Hydro modelling is done in three steps:
Preparation of hydro-potential data with atlite: ERA5 reanalysis dataset is used, runoff is being integrated across hydrobasins assuming some flow speed and put into cutout. This is done here. More details in the methodology used by atlite can be found here.
The output of the time series obtained in step 1 (cutout hydro potential) is normalized in pypsa-earth using the normalization procedure described here. This is done to match country statistics. The result is stored in
resources/renewable_profiles/profile_hydro.nc
.Attach_hydro in add_electricity, as described here. Specifies how the different hydro types (runoff river (
ror
), hydro dams (hydro
), and pumped storage (PHS
) are added to the network inadd_electricity
.Checklist
envs/environment.yaml
andenvs/environment.docs.yaml
.config.default.yaml
andconfig.tutorial.yaml
.test/
(note tests are changing the config.tutorial.yaml)doc/configtables/*.csv
and line references are adjusted indoc/configuration.rst
anddoc/tutorial.rst
.doc/release_notes.rst
is amended in the format of previous release notes, including reference to the requested PR.