Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
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
6 changes: 3 additions & 3 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ jobs:
# <scenario>/<plot_name>.png
plots: >
"
KN2045_Bal_v4/ariadne/primary_energy.png
KN2045_Bal_v4/ariadne/secondary_energy.png
KN2045_Bal_v4/ariadne/final_energy.png
KN2045_Mix/ariadne/primary_energy.png
KN2045_Mix/ariadne/secondary_energy.png
KN2045_Mix/ariadne/final_energy.png
ariadne_comparison/Trade-Secondary-Energy-Hydrogen-Volume.png
ariadne_comparison/Trade-Secondary-Energy-Liquids-Hydrogen-Volume.png
ariadne_comparison/Capacity-Electricity-Solar.png
Expand Down
32 changes: 0 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,42 +24,11 @@ Where `{os}` should be replaced with your operating system, e.g. for linux the c
conda env create -f envs/linux-pinned.yaml
```

## Connecting to the Ariadne-Database

### For external users: Use config.public.yaml

The default workflow configured for this repository assumes access to the internal Ariadne2 database. The database will soon be publicly available. Until then, users that do not have the required login details can run the analysis based on the data published during the [first phase of the Ariadne project](https://data.ece.iiasa.ac.at/ariadne/).

This is possible by providing an additional config to the snakemake workflow. For every `snakemake COMMAND` specified in the instructions below, public users should use:

```
snakemake COMMAND --configfile=config/config.public.yaml
```

The additional config file specifies the required database, model, and scenario names for Ariadne1. If public users wish to edit the default scenario specifications, they can do so by changing `scenarios.public.yaml` to `scenarios.manual.yaml`. More details on using scenarios are given below.

### For internal users: Provide login details

The snakemake rule `retrieve_ariadne_database` logs into the interal Ariadne IIASA Database via the [`pyam`](https://pyam-iamc.readthedocs.io/en/stable/tutorials/iiasa.html) package. The credentials for logging into this database have to be stored locally on your machine with `ixmp4`. To do this activate the project environment and run

```
ixmp4 login <username>
```

You will be prompted to enter your `<password>`.

Caveat: These credentials are stored on your machine in plain text.

To switch between internal and public use, the command `ixmp4 logout` may be necessary.

## Run the analysis

Before running any analysis with scenarios, the rule `build_scenarios` must be executed. This will create the file `config/scenarios.automated.yaml` which includes input data and CO2 targets from the IIASA Ariadne database as well as the specifications from the manual scenario file. [This file is specified in the config.de.yaml via they key `run:scenarios:manual_file` and located at `config/scenarios.manual.yaml` by default].

snakemake build_scenarios -f
or in case of using the public database

snakemake build_scenarios --configfile=config/config.public.yaml -f

Note that the hierarchy of scenario files is the following: `scenarios.automated.yaml` > (any `explicitly specified --configfiles`) > `config.de.yaml `> `config.default.yaml `Changes in the file `scenarios.manual.yaml `are only taken into account if the rule `build_scenarios` is executed.

Expand Down Expand Up @@ -88,7 +57,6 @@ PyPSA-DE is a softfork of PyPSA-EUR. As such, large parts of the functionality a
- Default resolution of 16 regions in Germany and 13 region for neighboring countries
- 10 pre-defined scenarios (1 Current Policies, 3 Net-Zero Scenarios (Balanced, Focus H2, Focus Electricity), 2 Demand Variations based on the Balanced Scenario, 4 Demand Variations Based on the Current Policies Scenario)
- Specific cost assumption for Germany:

- Gas, Oil, Coal prices
- electrolysis and heat-pump costs
- Infrastructure costs [according to the Netzentwicklungsplan](https://github.com/PyPSA/pypsa-ariadne/pull/193) 2021 and 2023
Expand Down
7 changes: 1 addition & 6 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -453,9 +453,6 @@ rule modify_existing_heating:
params:
iiasa_reference_scenario=config_provider("iiasa_database", "reference_scenario"),
leitmodelle=config_provider("iiasa_database", "leitmodelle"),
fallback_reference_scenario=config_provider(
"iiasa_database", "fallback_reference_scenario"
),
input:
ariadne=resources("ariadne_database.csv"),
existing_heating="data/existing_infrastructure/existing_heating_raw.csv",
Expand Down Expand Up @@ -641,9 +638,7 @@ rule export_ariadne_variables:
rule plot_ariadne_variables:
params:
iiasa_scenario=config_provider("iiasa_database", "reference_scenario"),
fallback_reference_scenario=config_provider(
"iiasa_database", "fallback_reference_scenario"
),
reference_scenario=config_provider("iiasa_database", "reference_scenario"),
input:
exported_variables_full=RESULTS + "ariadne/exported_variables_full.xlsx",
ariadne_database=resources("ariadne_database.csv"),
Expand Down
34 changes: 14 additions & 20 deletions config/config.de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@
run:
prefix: 20250414_merge_master_april
name:
# - CurrentPolicies
- KN2045_Bal_v4
# - KN2045_Elec_v4
# - KN2045_H2_v4
# - KN2045plus_EasyRide
# - KN2045plus_LowDemand
# - KN2045minus_WorstCase
# - KN2045minus_SupplyFocus
# - KN2045_Bal_LowDemand
# - KN2045_Bal_HighDemand
# - ExPol
- KN2045_Mix
# - KN2045_Elek
# - KN2045_H2
# - KN2045_NFniedrig
# - KN2045_NFhoch
scenarios:
enable: true
manual_file: config/scenarios.manual.yaml
Expand All @@ -32,22 +28,20 @@ run:
disable_progressbar: true

iiasa_database:
db_name: ariadne2_intern
db_name: ariadne2
leitmodelle:
general: REMIND-EU v1.1
buildings: REMod v1.0
transport: Aladin v1
industry: FORECAST v1.0
scenarios:
- CurrentPolicies
- KN2045_Elec_v4
- KN2045_H2_v4
- KN2045_Bal_v4
- KN2045plus_EasyRide
- KN2045plus_LowDemand
- KN2045minus_WorstCase
- KN2045minus_SupplyFocus
reference_scenario: KN2045_Bal_v4
- ExPol
- KN2045_Elek
- KN2045_H2
- KN2045_Mix
- KN2045_NFniedrig
- KN2045_NFhoch
reference_scenario: KN2045_Mix
region: Deutschland

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#foresight
Expand Down
38 changes: 0 additions & 38 deletions config/config.public.yaml

This file was deleted.

Loading
Loading