Skip to content

Commit 67c7a64

Browse files
authored
Housekeeping (#167)
* rename plot_scenario_comparison script * change prefix * add rule to compare scenarios * update readme * minor comments * modularize Snakefile * minor * restore option for using the internal db * convert units for internal ariadne DB * minor * improve existing heat pump estimate * minor * increase tolerance of assert
1 parent f5cc6d2 commit 67c7a64

15 files changed

Lines changed: 814 additions & 714 deletions

README.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,37 +12,43 @@ This repository contains the entire scientific project, including data sources a
1212

1313
## Getting ready
1414

15-
You need `conda` or `mamba` to run the analysis. Using conda, you can create an environment from within which you can run the analysis:
16-
15+
First of all, clone the PyPSA-DE repository using the version control system git in the command line.
1716
```
18-
conda env create -f envs/{os}.lock.yaml
17+
git clone https://github.com/PyPSA/pypsa-de.git
1918
```
2019

21-
Where `{os}` should be replaced with your operating system, e.g. for linux the command would be:
22-
20+
PyPSA-DE relies on a set of other Python packages to function. We manage these using [`pixi`](https://pixi.prefix.dev/latest/). Once pixi is installed, you can activate the project environment for your operating system and have access to all the PyPSA-DE dependencies from the command line:
2321
```
24-
conda env create -f envs/linux-64.lock.yaml
22+
pixi shell
2523
```
2624

25+
Tip: You can also set up automatic shell activation in several popular editors (e.g. in VSCode or Zed). Refer to the pixi documentation for the most up-to-date options.
26+
27+
If you cannot access pixi on your machine, you can also install using `conda`. For more details see the corresponding section in the [documentation](https://pypsa-eur.readthedocs.io/en/latest/installation.html#legacy-method-conda) of PyPSA-Eur
28+
2729
## Run the analysis
2830

2931
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].
3032

31-
snakemake build_scenarios -f
33+
snakemake -c1 build_scenarios
3234

3335
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.
3436

35-
To run the analysis use
37+
To run the analysis use, either
38+
39+
snakemake -call # The flag -cN specifies the number N of CPU cores available to snakemake
40+
41+
to generate the solved networks, or
3642

37-
snakemake ariadne_all
43+
snakemake -c1 ariadne_all
3844

39-
This will run all analysis steps to reproduce results. If computational resources on your local machine are limited you may decrease the number of cores by adding, e.g. `-c4` to the call to get only 4 cores. For more option please refer to the [snakemake](https://snakemake.readthedocs.io/en/stable/) documentation.
45+
which will generators additional outputs related to the Ariadne project. If you would like to use more computational resources you may increase the number of cores by adding, e.g. `-c4` to the call to get only 4 cores, or `-call` to use all cores. For more option please refer to the [snakemake](https://snakemake.readthedocs.io/en/stable/) documentation.
4046

4147
## Repo structure
4248

43-
* `config`: configuration files
44-
* `data/pypsa-de`: Germany specific data from the Ariadne project
45-
* `scripts`: contains the Python scripts for the workflow, the Germany specific code needed to run this repo is contained in `scripts/pypsa-de`
49+
* `config`: configuration files, most importantly `config.de.yaml` and `scenarios.manual.yaml`
50+
* `data/pypsa-de`: Germany specific data
51+
* `scripts`: contains the Python scripts for the workflow, the pypsa-de specific code needed to run this repo is contained in `scripts/pypsa-de`
4652
* `cutouts`: very large weather data cutouts supplied by atlite library (does not exist initially)
4753
* `data`: place for raw data (does not exist initially)
4854
* `resources`: place for intermediate/processing data for the workflow (does not exist initially)

0 commit comments

Comments
 (0)