Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/2.3.0.dev' into 2.3.0.dev
Browse files Browse the repository at this point in the history
  • Loading branch information
romainsacchi committed Dec 21, 2024
2 parents 6cdd360 + df9b7eb commit 8579f2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions premise/external.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions premise/pathways.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 8579f2a

Please sign in to comment.