Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Changing inputs in MAgPIE model
================
Miško Stevanović (<stevanovic@pik-potsdam.de>), Lavinia Baumstark (<baumstark@pik-potsdam.de>)
- [Introduction](#introduction)
- [Lokal Input Data](#lokal_input_data)
Introduction
===============
The input data for REMIND is prepared by a set of pre-processing routines that take the data from original sources (e.g. IEA, GTAP, PWT...), execute additional calculations and convert it to the required REMIND parameter format.
The input files are setup in the config file `config/default.cfg`. The regional resolution of the run is set in the by
``` bash
cfg$regionmapping
```
(default setting: regionmapping <- "config/regionmappingH12.csv"). Based on the regional resolution and the input data revision
``` bash
cfg$revision
```
the name of the needed input data is constructed. It is checked whether those input data are already available. If not they are automatically downloaded from `/p/projects/rd3mod/inputdata/output/` and distributed.
The prepared input data is a compressed tar archive file "`.tgz`", which can be opened with software such as [7-Zip](https://www.7-zip.org/), or in terminal by `tar` and `untar` commands.
Lokal Input Data
==================
If you like to get the input data on your local machine you need to copy your ssh key (`/home/[your_cluster_user_name]/.ssh/id_dsa`) to your computer and adjust your local **.Rprofile** by adding the following line:
``` r
options(remind_repos=list("scp://cluster.pik-potsdam.de/p/projects/rd3mod/inputdata/output"=list(username="[your_cluster_user_name]",ssh_private_keyfile="[path_to_your_local_copy_of_your_key]")))
```
If your key is password-protected you have to remove this by using an empty passphrase:
``` cmd
ssh-keygen -p
-> path to id_dsa
-> empty passphrase
```
It is recommended to first copy the existing key (e.g. id_dsa into id_dsa-local) and remove the passphrase of this copy and copy it to your machine.
If you plan to run REMIND not with the default regional resolution you have to take care that REMIND starts from a gdx with the correct regional resolution. Either you can use one from an older run with the corresponding regional resolution or you can construct a new gdx with the correct regional resolution from a gdx in a different regional resolution by using the function gdx_rename from the library(gdx) (e.g. gdx_rename("input.gdx",set_name="all_regi",c(REF="RUS",CAZ="ROW",...,MEA="MEA",USA="USA"))).
Adding New Input Data
======================
The input data for REMIND are generated by using the R-libraries *moinput* and *madrat* (https://github.com/pik-piam/madrat). While *moinput* contains all calculations tailored to REMIND-input-data, the library *madrat* provides the general wrapper functions and helpful tools. For further information read the vignettes part of the R-packages.