Skip to content

Commit

Permalink
refactor configs: boil down to effective diff in tutorial yaml and sc…
Browse files Browse the repository at this point in the history
…enarios yaml
  • Loading branch information
FabianHofmann committed Jul 8, 2024
1 parent dde594b commit 686f4d5
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 452 deletions.
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

test:
set -e
snakemake solve_all_networks -call --configfile config.tutorial.yaml &&
snakemake solve_all_networks -call --configfile config.tutorial.yaml test/config.custom.yaml &&
snakemake solve_all_networks -call --configfile config.tutorial.yaml configs/scenarios/config.NG.yaml &&
snakemake solve_all_networks -call --configfile config.tutorial.yaml test/config.tutorial_noprogress.yaml &&
snakemake solve_all_networks_monte -call --configfile config.tutorial.yaml test/config.monte_carlo.yaml &&
snakemake solve_all_networks -call --configfile config.tutorial.yaml test/config.landlock.yaml &&
snakemake solve_all_networks -call --configfile config.tutorial.yaml
snakemake solve_all_networks -call --configfile config.tutorial.yaml test/config.custom.yaml
snakemake solve_all_networks -call --configfile config.tutorial.yaml configs/scenarios/config.NG.yaml
snakemake solve_all_networks -call --configfile config.tutorial.yaml test/config.tutorial_noprogress.yaml
snakemake solve_all_networks_monte -call --configfile config.tutorial.yaml test/config.monte_carlo.yaml
snakemake solve_all_networks -call --configfile config.tutorial.yaml test/config.landlock.yaml
echo "All tests completed successfully."

setup:
Expand All @@ -20,8 +20,8 @@ setup:

clean:
# Add clean-up commands here
snakemake -j1 solve_all_networks --delete-all-output --configfile config.tutorial.yaml test/config.custom.yaml &&
snakemake -j1 solve_all_networks --delete-all-output --configfile config.tutorial.yaml test/config.tutorial_noprogress.yaml &&
snakemake -j1 solve_all_networks_monte --delete-all-output --configfile test/config.monte_carlo.yaml &&
snakemake -j1 solve_all_networks --delete-all-output --configfile config.tutorial.yaml test/config.custom.yaml
snakemake -j1 solve_all_networks --delete-all-output --configfile config.tutorial.yaml test/config.tutorial_noprogress.yaml
snakemake -j1 solve_all_networks_monte --delete-all-output --configfile test/config.monte_carlo.yaml
snakemake -j1 run_all_scenarios --delete-all-output --configfile test/config.landlock.yaml
echo "Clean-up complete."
14 changes: 10 additions & 4 deletions config.default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ enable:
# requires cds API key https://cds.climate.copernicus.eu/api-how-to
# More information https://atlite.readthedocs.io/en/latest/introduction.html#datasets

# CI relevant
retrieve_databundle: # required to be "false" for nice CI test output
show_progress: true # show (true) or do not show (false) the progress bar in retrieve_databundle while downloading data


custom_rules: [] # Default empty [] or link to custom rule file e.g. ["my_folder/my_rules.smk"] that add rules to Snakefile

run:
Expand Down Expand Up @@ -99,7 +104,7 @@ build_shape_options:

clean_osm_data_options: # osm = OpenStreetMap
names_by_shapes: true # Set the country name based on the extended country shapes
threshold_voltage: 51000 # [V] assets below that voltage threshold will not be used (cable, line, generator, etc.)
threshold_voltage: 51000 # [V] minimum voltage threshold to keep the asset (cable, line, generator, etc.) [V]
tag_substation: "transmission" # Filters only substations with 'transmission' tag, ('distribution' also available)
add_line_endings: true # When "True", then line endings are added to the dataset of the substations
generator_name_method: OSM # Methodology to specify the name to the generator. Options: OSM (name as by OSM dataset), closest_city (name by the closest city)
Expand Down Expand Up @@ -198,7 +203,9 @@ transformers:
atlite:
nprocesses: 4
cutouts:
# geographical bounds automatically determined from countries input
# use 'base' to determine geographical bounds and time span from config
# base:
# module: era5
cutout-2013-era5:
module: era5
dx: 0.3 # cutout resolution
Expand Down Expand Up @@ -312,7 +319,7 @@ renewable:
extendable: true
normalization:
method: hydro_capacities # 'hydro_capacities' to rescale country hydro production by using hydro_capacities, 'eia' to rescale by eia data, false for no rescaling
year: 2013 # (optional) year of statistics used to rescale the runoff time series. When not provided, the weather year of the snapshots is used
year: 2013 # (optional) year of statistics used to rescale the runoff time series. When not provided, the cutout weather year is used
multiplier: 1.1 # multiplier applied after the normalization of the hydro production; default 1.0
csp:
cutout: cutout-2013-era5
Expand All @@ -336,7 +343,6 @@ renewable:
csp_model: advanced # simple or advanced

# TODO: Needs to be adjusted for Africa.
# Costs Configuration (Do not remove, needed for Sphynx documentation).
costs:
year: 2030
version: v0.5.0
Expand Down
Loading

0 comments on commit 686f4d5

Please sign in to comment.