pypsa-eur/doc/installation.rst
2019-08-07 10:56:23 +02:00

3.9 KiB

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> </head>

Installation

TODO: install via bash installation script

Note

The steps are demonstrated as shell commands, where the path before the % sign denotes the directory in which the commands following the % should be entered.

Clone the Repository

Clone the PyPSA-Eur repository using git

System Message: WARNING/2 (<stdin>, line 18)

Cannot analyze code. Pygments package not found.

.. code:: bash

    /some/other/path % cd /some/path/without/spaces

    /some/path/without/spaces % git clone https://github.com/PyPSA/pypsa-eur.git

Note

The path to the directory into which the git repository is cloned, must not have any spaces.

Install Python Dependencies

TODO: conda link

The python package requirements are curated in the conda environment.yaml file. The environment can be installed and activated using

System Message: WARNING/2 (<stdin>, line 38)

Cannot analyze code. Pygments package not found.

.. code:: bash

    .../pypsa-eur % conda env create -f environment.yaml

    .../pypsa-eur % conda activate pypsa-eur

Note

Note that activation is local to the currently open shell! After opening a new terminal window, one needs to reissue the second command!

Download Data Dependencies

Not all data dependencies are shipped with the git repository, since git is not suited for handling large changing files. Instead we provide separate data bundles:

  1. Data Bundle: pypsa-eur-data-bundle.tar.xz contains common GIS datasets like NUTS3 shapes, EEZ shapes, CORINE Landcover, Natura 2000 and also electricity specific summary statistics like historic per country yearly totals of hydro generation, GDP and POP on NUTS3 levels and per-country load time-series. It should be extracted in the data sub-directory, such that all files of the bundle are stored in the data/bundle subdirectory)

System Message: WARNING/2 (<stdin>, line 58)

Cannot analyze code. Pygments package not found.

.. code:: bash

    .../pypsa-eur/data % curl -OL "https://vfs.fias.science/d/0a0ca1e2fb/files/?dl=1&p=/pypsa-eur-data-bundle.tar.xz"

    .../pypsa-eur/data % tar xJf pypsa-eur-data-bundle.tar.xz


  1. Cutouts: pypsa-eur-cutouts.tar.xz are spatiotemporal subsets of the European weather data from the ECMWF ERA5 reanalysis dataset and the CMSAF SARAH-2 solar surface radiation dataset for the year 2013. They have been prepared by and are for use with the atlite tool. You can either generate them yourself using the build_cutouts rule or extract them directly into the pypsa-eur directory. Extracting the bundle is recommended, since procuring the source weather data files for atlite is not properly documented at the moment:

System Message: WARNING/2 (<stdin>, line 67)

Cannot analyze code. Pygments package not found.

.. code:: bash

    .../pypsa-eur % curl -OL "https://vfs.fias.science/d/0a0ca1e2fb/files/?dl=1&p=/pypsa-eur-cutouts.tar.xz"

    .../pypsa-eur % tar xJf pypsa-eur-cutouts.tar.xz

  1. Natura: Optionally, you can download a rasterized version of the NATURA dataset natura.tiff and put it into the resources sub-directory. If you don't, it will be generated automatically, which is a time-consuming process.

System Message: WARNING/2 (<stdin>, line 75)

Cannot analyze code. Pygments package not found.

.. code:: bash

    .../pypsa-eur % curl -L "https://vfs.fias.science/d/0a0ca1e2fb/files/?p=/natura.tiff&dl=1" -o "resources/natura.tiff"


  1. Remove Archives: Optionally, if you want to save disk space, you can delete data/pypsa-eur-data-bundle.tar.xz and pypsa-eur-cutouts.tar.xz once extracting the bundles is complete. E.g.

System Message: WARNING/2 (<stdin>, line 82)

Cannot analyze code. Pygments package not found.

.. code:: bash

    .../pypsa-eur % rm -rf data/pypsa-eur-data-bundle.tar.xz pypsa-eur-cutouts.tar.xz
</html>