Skip to content

Commit

Permalink
Apply suggestions from @glatterf42
Browse files Browse the repository at this point in the history
Co-authored-by: Fridolin Glatter <[email protected]>
  • Loading branch information
macflo8 and glatterf42 authored Oct 14, 2024
1 parent 7e20ecb commit 820160e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions doc/material/v1.1.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ There are also a few of changes in the command line interface.

Model changes
~~~~~~~~~~~~~

**Iron & steel sector**
This release introduces the following low-emission options:

Expand Down
4 changes: 2 additions & 2 deletions message_ix_models/model/material/data_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from .util import read_config


def read_data_generic(scenario) -> (pd.DataFrame, pd.DataFrame):
def read_data_generic(scenario: Scenario) -> (pd.DataFrame, pd.DataFrame):
"""Read and clean data from :file:`generic_furnace_boiler_techno_economic.xlsx`."""

# Read the file
Expand All @@ -40,7 +40,7 @@ def read_data_generic(scenario) -> (pd.DataFrame, pd.DataFrame):
return data_generic, data_generic_ts


def gen_data_generic(scenario, dry_run=False) -> dict[str, pd.DataFrame]:
def gen_data_generic(scenario: Scenario, dry_run: bool = False) -> dict[str, pd.DataFrame]:
# Load configuration

config = read_config()["material"]["generic"]
Expand Down
7 changes: 2 additions & 5 deletions message_ix_models/model/material/data_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2243,11 +2243,8 @@ def calculate_ini_new_cap(

SCALER = 0.005

if material == "cement":
CLINKER_RATIO = 0.72
df_demand["value"] *= CLINKER_RATIO * SCALER
else:
df_demand["value"] *= SCALER
CLINKER_RATIO = 0.72 if material == "cement" else 1
df_demand["value"] *= CLINKER_RATIO * SCALER

df_demand = df_demand.rename(columns={"node": "node_loc", "year": "year_vtg"})
df_demand["technology"] = technology
Expand Down

0 comments on commit 820160e

Please sign in to comment.