Skip to content
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

Use scalars_base.csv as input for prepare_re_potential.py #171

Merged
merged 3 commits into from
Mar 14, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ rule prepare_re_potential:
pv_road_railway="raw/area_potential/2021-05-18_pv_road_railway_brandenburg_kreise_epsg32633.csv",
wind="raw/area_potential/2021-05-18_wind_brandenburg_kreise_epsg32633.csv",
kreise="raw/lookup_table_brandenburg_kreise.csv",
assumptions="raw/scalars.csv",
assumptions="raw/scalars_base.csv",
script="scripts/prepare_re_potential.py"
output:
directory("results/_resources/RE_potential/")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if this is already planned / intended here, but this would ensure that the correct scalars are selected via wildcards:

Suggested change
assumptions="raw/scalars_base.csv",
script="scripts/prepare_re_potential.py"
output:
directory("results/_resources/RE_potential/")
assumptions="raw/scalars_{range}.csv",
script="scripts/prepare_re_potential.py"
output:
directory("results/_resources/{range}/RE_potential/")
wildcard_constraints:
range=("base|high|low")

However, if we were to build on our current scalars structure, then the wildcards would have to be extended by the specification of a year and hence adjusted to:

Suggested change
assumptions="raw/scalars_base.csv",
script="scripts/prepare_re_potential.py"
output:
directory("results/_resources/RE_potential/")
assumptions="raw/scalars_{range}_{year}.csv",
script="scripts/prepare_re_potential.py"
output:
directory("results/_resources/{range}_{year}/RE_potential/")
wildcard_constraints:
range=("base|high|low"),
year=("2040|2050")

Just a thought without any particular change request.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @MaGering!
The thing is, that using the different csvs does not have any effect on the input data to the simulations, as the renewable potential is not copied to _resources/scal_base.csv.
I would add the potential automatically in prepare_scalars.py using results/_resources/scal_power_potential_wind_pv.csv as input. Do you agree @jnnr?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MaGering I will include that, giving you credit, in #176 after the release. thanks again!

Expand Down
6 changes: 3 additions & 3 deletions scripts/prepare_re_potential.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
-------
filename_pv_agriculture : str
``raw/area_potential/2021-05-18_pv_agriculture_brandenburg_kreise_epsg32633.csv``: Path incl.
file name of area potential of agriculture PV
file name of area potential of agriculture pv
filename_pv_road_railway : str
``raw/area_potential/2021-05-18_pv_road_railway_brandenburg_kreise_epsg32633.csv``: Path incl.
file name of area potential of roads and railway PV
file name of area potential of roads and railway pv
filename_wind : str
``raw/area_potential/2021-05-18_wind_brandenburg_kreise_epsg32633.csv``: Path incl. file name
of area potential wind
filename_kreise : str
``raw/lookup_table_brandenburg_kreise.csv``: Path incl. file name of lookup table Kreise and
NUTS of Brandenburg
filename_assumptions : str
``raw/scalars.csv``: Path incl. file name of assumptions
``raw/scalars_base.csv``: Path incl. file name of assumptions
output_dir : str
``results/_resources/RE_potential/``: Path of output directory where power and area potential of
single areas and of "Landkreise" is saved
Expand Down