Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
romainsacchi committed Dec 10, 2023
2 parents 22f69c5 + a76bb8f commit db89d0e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
8 changes: 7 additions & 1 deletion premise/fuels.py
Original file line number Diff line number Diff line change
Expand Up @@ -2310,7 +2310,13 @@ def generate_fuel_markets(self):
d_fuels = self.get_fuel_mapping()

vars_map = {
"petrol, low-sulfur": ["petrol", "ethanol", "methanol", "gasoline", "bioethanol"],
"petrol, low-sulfur": [
"petrol",
"ethanol",
"methanol",
"gasoline",
"bioethanol",
],
"diesel, low-sulfur": ["diesel", "biodiesel"],
"natural gas": ["natural gas", "biomethane"],
"hydrogen": ["hydrogen"],
Expand Down
14 changes: 9 additions & 5 deletions premise/steel.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,16 @@ def create_steel_markets(self):
steel_markets = {
loc: dataset
for loc, dataset in steel_markets.items()
if (self.iam_data.production_volumes.sel(
region=loc, variables=["steel - primary", "steel - secondary"]
if (
self.iam_data.production_volumes.sel(
region=loc,
variables=["steel - primary", "steel - secondary"],
)
.interp(year=self.year)
.sum(dim="variables")
> 0
or loc == "World"
)
.interp(year=self.year)
.sum(dim="variables")
> 0 or loc == "World")
}
else:
for loc, dataset in steel_markets.items():
Expand Down

0 comments on commit db89d0e

Please sign in to comment.