Author: Ian David Elder
Project: CANOE Model
This tool takes annual energy demand projections from the Canada's Energy Future (CEF) model and converts them into Temoa-compatible annual demands for the CANOE model.
For documentation: Visit here
- Data Ingestion: Reads CEF demand data from CSV files.
- Data Transformation: Maps CEF regions, sectors, and commodities to CANOE model definitions.
- Database Output: Populates a Temoa-compatible SQLite database with the processed demand data.
- Electricity Distributions: Option to apply Demand Specific Distributions (DSD) for electricity.
- Python 3.x
pandasPyYAML
-
Clone the repository:
git clone <repository-url> cd canoe-cef
-
Install the required Python packages:
pip install -r requirements.txt
Configuration is managed via files in the input_files/ directory, primarily params.yaml.
params.yaml: Main configuration settings (scenario selection, database paths, etc.).regions.csv: Mapping of CEF regions to model regions.commodities.csv: Mapping of CEF variables/fuels to model commodities.sectors.csv: Mapping of CEF sectors to model sectors.end-use-demand-2023.csv: The source data from Canada's Energy Future.
To run the conversion process and populate the database:
python .Or run the module directly:
python __main__.pyThis will:
- Initialize the SQLite database (or clear it if configured to do so).
- Read the CEF input data.
- Filter and aggregate data based on the configuration.
- Write the
Technology,Commodity,Demand, andEfficiencytables to the SQLite database.
- Canada's Energy Future (CEF): https://www.cer-rec.gc.ca/en/data-analysis/canada-energy-future/
When updating for a new year:
- Download the new end-use demand data from the CER website.
- Replace the
end-use-demand-XXXX.csvininput_files/. - Update
params.yamland mapping CSVs if scenario names or dimensions have changed.