The remind2
library contains the routines to generate
the reporting of the output of the REMIND model and is the successor of
the deprecated remind
package since REMIND version 3.0. Its
main function is to create the output of REMIND as a table in
IAM-compatible format, the so-called mif-file
, from the
fulldata.gdx
of a run. The resulting mif-file
is typically called REMIND_generic_NameOfYourRun.mif
and
can be found in the output folder of a run.
This REMIND reporting based on a GDX-file can be created with the
function convGDX2MIF()
The calculation of the REMIND variables as reported in the
mif-file
is separated into different functions per variable
category. For example, SE|...
variables (i.e. Secondary
Energy) are calculated in reportSE.R, Emi|...
variables
(i.e. Emissions) in reportEmi.R etc. If you only want to check the
calculation of a specific group of REMIND variables, you can call those
functions directly:
When developing the remind2 library, please test your changes on a
recent fulldata.gdx
file from REMIND by running the
convGDX2MIF()
function. Make sure the
fulldata.gdx
file is suitable for testing the change you
did. For example, check that the relevant GAMS variables and parameters
are available and non-zero in the GDX you are testing. Different REMIND
runs come with different module realization and switches where certain
sets, parameters or variables are not existing such that your change may
not be tested by an unsuitable GDX. Moreover, when adapting or adding
variables with “+” notation, please run a summation check on a suitable
GDX by running the checkIntegrity()
found here
on your reporting output:
If your change involves reading in a parameter, variable or set from the GDX-file that is not yet merged to the main REMIND repository or that is not declared in the default runs of REMIND, please use conditional statements that check whether these parameters exist. Otherwise, the reporting will break for other users with other GDX files.
There are a couple of naming conventions for variables in the REMIND mif-file:
Variable Type|...|Sector1|Sector2|…|Energy Carrier Output|Energy Carrier Origin
(Example: FE|Industry|Liquids|Biomass
contains liquid fuel
used as final energy in industry that is produced from biomass)test-convGDX2mif.R
when
building the library (for the naming convention of variables with “+”,
see below)|w/ Bunkers|
,
|before taxes|
or |gross|
should be placed at
the highest relevant aggregation level (examples:
Emi|CO2|Gross|Energy|Supply|+|Liquids
,
FE|w/ Bunkers|+|Transport
)Internal|...
Several variable types are structured in a variable tree using “+” notation their name. This means that it is checked that a group of variables sums up to an aggregate variable. All variables with a “+” should sum up to the super-variable corresponding to the part of the name before the “+”. For example:
FE = FE|+|Electricity + FE|+|Heat + FE|+|Hydrogen + FE|+|Solids ...
However, multiple stages of summations should only feature one “+” at
the lowest level of aggregation and not multiple “+” levels (so
Emi|CO2|Energy|+|Demand
instead of
Emi|CO2|+|Energy|+|Demand
). If there are multiple different
variable groups that belong to one super variable, additional pluses are
added to distinguish them for the other variable groups. For
example:
FE = FE|+|Electricity + FE|+|Heat + FE|+|Hydrogen + FE|+|Solids ...
FE = FE|++|Buildings + FE|++|Industry + FE|++|Transport ...
You can check out the different summation groups of variables with
“+” by running the function extractVariableGroups()
from
the mip-package.
The argument to the function is a vector of variable names. For
example:
The REMIND reporting will provide you with two different mif-files. The standard mif-file will come with “+” notation, while a second mif-file “without_plus” is generated where pluses were deleted to ease further processing.
Note that the definitions of REMIND variables as generated by the
remind2
library may not correspond to the definition of
equally or similarly named variables in standardized model
intercomparison projects. For mappings of REMIND variables to variable
templates from model intercomparison projects, please see the pik-piam
library piamInterfaces.