Overview

Monetary values in output tables — such as expenditures on fuel, investments, and O&M costs — are expressed in constant (real) dollars to allow meaningful comparisons across years. Two variables control which dollar year is used for these outputs:

Variable

Database Path

Purpose

CDTime

SInput/CDTime

The calendar year displayed in output table headers (e.g., "Millions 2017 CAD/Yr"). This is the human-readable label.

CDYear

SInput/CDYear

The array index into the Inflation table corresponding to CDTime. Used internally to deflate all nominal dollar values to constant dollars. This value is calculated automatically from CDTime.


Both variables are set in SData.jl and written to the database during model initialization. Output modules, including Expenditures.jl, read these values from the database at run time — you do not need to edit any output files.

How the Constant Dollar Conversion Works

Each monetary output value is adjusted from nominal dollars (the year in which the cost was incurred) to constant dollars (the base year you specify) using the Inflation index array. The formula applied in every output table calculation is:

Value (constant $) = Value (nominal $) / Inflation[area, year] * Inflation[area, CDYear]


CDYear is the array index that selects the correct inflation factor for the chosen base year. CDTime is the same year expressed as a calendar year, used only for labeling table headers. Because CDYear is derived directly from CDTime (see below), users only ever need to change CDTime.

How to Change the Constant Dollar Year

Step 1 — Open SData.jl

Locate and open the file SData.jl in your text editor or Julia development environment. All edits are made within the SData_Inputs function in this file.

Step 2 — Find the CDTime Assignment

Search for the following block near the middle of the SData_Inputs function:

CDTime = 2017

CDYear = CDTime-ITime+1

WriteDisk(db,"SInput/CDTime",CDTime)

WriteDisk(db,"SInput/CDYear",CDYear)


Step 3 — Change CDTime to the Desired Year

Replace 2017 on the CDTime line with the four-digit calendar year you want to use as the constant dollar base year. For example, to use 2020 dollars:

CDTime = 2020

CDYear = CDTime-ITime+1

WriteDisk(db,"SInput/CDTime",CDTime)

WriteDisk(db,"SInput/CDYear",CDYear)


Do not modify the CDYear line. CDYear is calculated automatically from CDTime and ITime (the model's internal start-year index imported from EnergyModel), and is then written to the database alongside CDTime.

Step 4 — Save the File and Re-run Model Initialization

Save SData.jl. Then run model initialization so the updated CDTime and CDYear values are written to the database (SInput/CDTime and SInput/CDYear). Output modules read these values from the database at run time, so the change will be reflected automatically in all output tables the next time they are generated — no changes to Expenditures.jl or any other output file are required.


Important Constraints

Keep the following in mind when selecting a constant dollar year:

  • The year must fall within the range of years covered by the model's Inflation array. Choosing a year outside this range will cause an index error at run time.
  • The year must be a valid calendar year represented in the model's Year set. Years that fall before the historical data period or beyond the projection horizon are not valid.
  • The same base year applies to all monetary output tables simultaneously — there is no mechanism to use different base years for different tables.
  • After changing CDTime and re-running initialization, any previously generated output files will reflect the old base year. Regenerate all output tables to ensure consistency.



🛈

The default constant dollar year is currently 2017. This is the value set in the distributed version of SData.jl and matches common national accounts reference years. If you are comparing results to external data sources, verify that those sources use the same base year before changing this setting.

Effect on Output Tables

Once the updated values are written to the database and output tables are regenerated, two visible changes will occur:

  • Table headers will display the new base year. For example, a column header that previously read "Secondary Energy Expenditures (Millions 2017 CAD/Yr)" will instead read "Secondary Energy Expenditures (Millions 2020 CAD/Yr)" if CDTime is changed to 2020.
  • All monetary values in the tables will be re-expressed in the new base year's dollars. Values for years before the base year will be inflated upward; values for years after the base year will be deflated downward relative to the previous output.


Quick Reference

Item

Detail

File to edit

SData.jl

Function to edit within

SData_Inputs

Line to change

CDTime = 2017  â†’  CDTime = <desired year>

Lines to leave unchanged

CDYear = CDTime-ITime+1  (calculated automatically)

Files NOT to edit

Output script files, such as Expenditures.jl

Required after editing

Re-run model initialization to write values to database

Required after initialization

Regenerate all output tables