To get started with MESSAGEix, the following tutorials are provided as Jupyter notebooks, which combine code, sample output, and explanatory text.
A static, non-interactive version of each notebook can be viewed online using the links below. In order to execute the tutorial code or make modifications, read the Preparation section, next.
Getting tutorial files¶
If you installed MESSAGEix from source, all notebooks are in the
If you installed MESSAGEix using Anaconda, download the notebooks using the
messageix-dl utility. In a command prompt:
$ messageix-dl --local_path /path/to/tutorials
nb_conda package is required. It should be installed by default with
Anaconda. If it was not, install it:
$ conda install nb_conda
- Open “Jupyter Notebooks” from Anaconda’s “Home” tab (or directly if you have the option).
- Choose and open a tutorial notebook.
- Each notebook requires a kernel that executes code interactively. Check that the kernel matches your conda environment, and if necessary change kernels with the menu, e.g. Kernel → Change Kernel → Python [conda root].
From the command line¶
Navigate to the tutorial folder. For instance, if
messageix-dlwas used above:
$ cd /path/to/tutorials
Start the Jupyter notebook:
$ jupyter notebook
This tutorial demonstrates how to model a very simple energy system, and then uses it to illustrate a range of framework features.
- Build the baseline model.
- Introduce emissions and a bound on the emissions.
- Limit emissions using a tax instead of a bound.
- Represent both coal and wind electricity, using a “firm capacity” formulation: each generation technology can supply some firm capacity, but the variable, renewable technology (wind) supplies less than coal.
- Represent coal and wind electricity using a different, “flexibility requirement” formulation, wherein wind requires and coal supplies flexibility.
Austrian energy system¶
This tutorial demonstrates a stylized representation of a national electricity sector model, with several fossil and renewable power plant types.