Getting started
This page is a quick guide to get you started with the Energibruksmodell (EBM) model. The model is designed to calculate energy use in the norwegian building stock. The model is developed by the Norwegian Water Resources and Energy Directorate (NVE).
Requirements
EBM requires Python 3.11 or newer. Python is available from python.org.
Additional requirements like pandas, pandera and openpyxl will be installed along side EBM
Quick Start Guide
Please, open your preferred terminal application and follow the instructions below.
Installation
Install ebm using pip
python -m pip install ebm
What version of ebm are we running?
Once installed, you need to setup input files with all the parameters required to run EBM. But before we do that, let’s
check if ebm is working properly. Open a terminal (powershell) and type:
ebm --version
The output should look something like this:
expected output
PS C:\Users\user> ebm --version
ebm 0.99.2
PS C:\Users\user>
The output shows what version of ebm you are running. Don’t worry if the version number you get is a bit off from the one in the example.
Note
These instructions are made for 1.0.1, but should work for later versions as well.
Create an input directory
Before running the model you need to create a directory with the necessary input files. The recommended way of creating the input directory is to use ebm:
ebm --create-input
expected output
PS C:\Users\user\Documents> python -m ebm --create-input
0:00:01.25 - Using data from "input"
0:00:01.26 - Copy input from C:\Users\user\pyc\Energibruksmodell\ebm\data
0:00:01.26 - Creating directory input
0:00:01.28 - Creating missing file input\building_code_parameters.csv
0:00:01.30 - Creating missing file input\s_curve.csv
0:00:01.33 - Creating missing file input\population_forecast.csv
0:00:01.35 - Creating missing file input\new_buildings_residential.csv
0:00:01.38 - Creating missing file input\area_new_residential_buildings.csv
0:00:01.42 - Creating missing file input\area.csv
0:00:01.45 - Creating missing file input\energy_need_behaviour_factor.csv
0:00:01.48 - Creating missing file input\energy_need_original_condition.csv
0:00:01.51 - Creating missing file input\improvement_building_upgrade.csv
0:00:01.54 - Creating missing file input\energy_need_improvements.csv
0:00:01.57 - Creating missing file input\holiday_home_energy_consumption.csv
0:00:01.60 - Creating missing file input\holiday_home_stock.csv
0:00:01.62 - Creating missing file input\area_per_person.csv
0:00:01.65 - Creating missing file input\heating_system_initial_shares.csv
0:00:01.68 - Creating missing file input\heating_system_efficiencies.csv
0:00:01.71 - Creating missing file input\heating_system_forecast.csv
0:00:01.71 - Finished creating input files in input
The command creates a new directory named input, containing copies of all input files. By default, this directory is
created in the current working directory. To specify a different location, use the --input=<directory name> option.
If the directory already exists, only missing files will be copied. Existing files will not be overwritten.
You can use ls to get a list of all the files in the input directory:
ls input
expected output
PS C:\Users\user\Documents> ls input
Directory: C:\Users\user\Documents\input
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 30.09.2025 12:10 2475 area.csv
-a---- 30.09.2025 12:10 114 area_new_residential_buildings.csv
-a---- 30.09.2025 12:10 192 area_per_person.csv
-a---- 30.09.2025 12:10 238 building_code_parameters.csv
-a---- 30.09.2025 12:10 305 energy_need_behaviour_factor.csv
-a---- 30.09.2025 12:10 462 energy_need_improvements.csv
-a---- 30.09.2025 12:10 23191 energy_need_original_condition.csv
-a---- 30.09.2025 12:10 1340 heating_system_efficiencies.csv
-a---- 30.09.2025 12:10 1847 heating_system_forecast.csv
-a---- 30.09.2025 12:10 67093 heating_system_initial_shares.csv
-a---- 30.09.2025 12:10 446 holiday_home_energy_consumption.csv
-a---- 30.09.2025 12:10 652 holiday_home_stock.csv
-a---- 30.09.2025 12:10 475 improvement_building_upgrade.csv
-a---- 30.09.2025 12:10 1807 new_buildings_residential.csv
-a---- 30.09.2025 12:10 959 population_forecast.csv
-a---- 30.09.2025 12:10 1854 s_curve.csv
If your shell does not have the ls command, you might have better luck with dir.
Run the model
You are now ready to run the model. Use the bare command EBM with no options:
ebm
expected output
PS C:\Users\user\Documents> python -m ebm
0:00:01.44 - Using data from "input"
0:00:04.58 - Wrote output\area.xlsx
0:00:04.97 - Wrote output\heating_system_share.xlsx
0:00:05.34 - Wrote output\heat_prod_hp.xlsx
0:00:09.32 - Wrote output\energy_use.xlsx
0:00:17.10 - Wrote output\energy_purpose.xlsx
0:00:18.39 - Wrote output\demolition_construction.xlsx
By default the scenario is read from input, and the results are written to the subdirectory output in the
current working directory.
You can get a directory listing that shows all the result files created by issuing the command:
ls output
The resulting output should look something like:
expected output
Directory: C:\Users\user\Documents\output
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 18.09.2025 12:27 98844 area.xlsx
-a---- 18.09.2025 12:27 119998 demolition_construction.xlsx
-a---- 18.09.2025 12:27 647028 energy_purpose.xlsx
-a---- 18.09.2025 12:27 526083 energy_use.xlsx
-a---- 18.09.2025 12:27 32244 heating_system_share.xlsx
-a---- 18.09.2025 12:27 7349 heat_prod_hp.xlsx
-a---- 13.02.2025 11:18 50 README.md
The files can be opened using your favourite spreadsheet application. I.E. Microsoft Excel or LibreOffice Calc.
Tip
If you want to open the results automatically as they become available, you can use the --open option.
ebm --open
See also
- Result files
An overview of the contents of all the output files.
- Additional arguments
Shows all the commands available for
EBM.- User case
gives a run-down on how you can change the input files to better suit your needs.
Last Updated on 2025-11-06.
Version: 1.0.1.