-
Michaja Pehl authored
- R packages are packages (that are loaded with the library() function) - REMIND is optimising scenarios, and not simulating anything - as this is intended for people newly coming to REMIND, we don't want to start out teaching them the wrong terms
Michaja Pehl authored- R packages are packages (that are loaded with the library() function) - REMIND is optimising scenarios, and not simulating anything - as this is intended for people newly coming to REMIND, we don't want to start out teaching them the wrong terms
Changing inputs in MAgPIE model
Miško Stevanović (stevanovic@pik-potsdam.de), Lavinia Baumstark (baumstark@pik-potsdam.de)
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
cfg$regionmapping
(default setting: regionmapping <- "config/regionmappingH12.csv"). Based on the regional resolution and the input data revision
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, 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:
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:
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 package (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 package madrat provides the general wrapper functions and helpful tools. For further information read the vignettes part of the R-packages.