diff --git a/premise/external.py b/premise/external.py index 8d08da92..fdf92b91 100644 --- a/premise/external.py +++ b/premise/external.py @@ -435,11 +435,12 @@ def __init__( external_scenario_regions = {} for datapackage_number, datapackage in enumerate(self.datapackages): - external_scenario_regions[datapackage_number] = self.external_scenarios_data[datapackage_number]["regions"] + external_scenario_regions[datapackage_number] = ( + self.external_scenarios_data[datapackage_number]["regions"] + ) self.configurations = configurations or [] - for d, data in self.external_scenarios_data.items(): ds_names = get_recursively(self.configurations[d], "name") self.regionalize_inventories(ds_names, external_scenario_regions[d], data) diff --git a/premise/pathways.py b/premise/pathways.py index 140be83d..b5b3b728 100644 --- a/premise/pathways.py +++ b/premise/pathways.py @@ -302,14 +302,14 @@ def add_scenario_data(self): data = xr.concat( [ data, - external["production volume"].interp( - year=scenario["year"] - ), + external["production volume"].interp(year=scenario["year"]), ], dim="variables", ) extra_units.update(external["production volume"].attrs["unit"]) - scenario_name += f" - {scenario['external scenarios'][ext]['scenario']}" + scenario_name += ( + f" - {scenario['external scenarios'][ext]['scenario']}" + ) # add a scenario dimension data = data.expand_dims("scenario")