All instructions are from the root of the repository, i.e. the folder containing this README.md
file.
This code has only been tested on macos and linux. Equivalent commands may work on windows, but I cannot guarantee it.
You will need to install conda as some of the packages are harder to install with pip.
conda env create -f environment.yml
conda activate sim2real
This will allow you to import the sim2real
package from anywhere on your system, and allows you to run files within the sim2real package via IPython or Jupyter.
pip install -e .
Note, this downloads the current data from the DWD website, which has changed in the past. This might lead to unexpected downstream behaviour as the set of stations, dates, and the data itself changes. If you want to use the data from the paper, please contact the authors.
python sim2real/preprocessing/dwd.py
This is not automated yet, but you can download the relevant data from the ERA5 website here.
The following screenshots show the settings you should use to download the data:
Alternatively, if you have the cdsapi
package installed and configured, you can use the following python code to download the data:
You should then move the downloaded 1.grib
file to the path specified in sim2real/config.py
under the raw_era5
path. By default, this is the folder created by
mkdir -p data/raw/ERA_5_Germany
Then move 1.grib
to data/raw/ERA_5_Germany/1.grib
, or adjust raw_era5
in sim2real/config.py
to point to the correct location.
Finally, process the file by running
python sim2real/preprocessing/era5.py
This is also not automated yet. Please go to the opendem SRTM data download and download the SRTM "Digital Terrain Model of Germany".
This should download a file called srtm_germany_dtm.zip
, which you should unzip into srtm_germany_dtm.tif
. This tif file should be moved to the path specified in sim2real/config.py
under the raw_srtm
key. By default this is
mkdir -p data/raw/SRTM_DEM
Finally, process the file by running
python sim2real/preprocessing/srtm_dem.py