Add load from start_year using a different AEO data year
As new AEO data is released, there is a growing gap between the first year
with current EMM regions and the first year of data available from the newest
AEO data. Fix this by getting data from the year after start_year.
@@ -219,6 +219,26 @@ def calc_growth_factors(
for ipm_region in keep_regions
}
+ # Check to make sure start_year is in the list of data years. If not, use data from
+ # the year after start_year
+ if start_year not in list(load_growth_dict.values())[0].index:
+ data_year = start_year + 1
+ for r in load_growth_dict.keys():
+ start_scenario = growth_scenario
+ if "REF" in start_scenario:
+ start_scenario = f"REF{data_year}"
+
+ start_load = (
+ get_aeo_load(
+ region=region_map[r],
+ aeo_year=data_year,
+ scenario_series=start_scenario,
+ )
+ .set_index("year")
+ .loc[start_year, "demand"]
+ )
+ load_growth_dict[r].loc[start_year, "demand"] = start_load
+
load_growth_start_map = {
ipm_region: _df.loc[start_year, "demand"]
for ipm_region, _df in load_growth_dict.items()
