Skip to content

Commit

Permalink
Update code to use newly combined first year and tech map CSVs
Browse files Browse the repository at this point in the history
  • Loading branch information
measrainsey committed Aug 28, 2024
1 parent 68a9f9b commit 9e4b775
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions message_ix_models/tools/costs/decay.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,18 @@ def get_technology_reduction_scenarios_data(
or very_high)
"""

energy_first_year_file = package_data_path("costs", "energy", "first_year.csv")
df_first_year = pd.read_csv(energy_first_year_file, skiprows=3)
energy_first_year_file = package_data_path("costs", "energy", "tech_map.csv")
df_first_year = pd.read_csv(energy_first_year_file, skiprows=4)[
["message_technology", "first_year_original"]
]

if module == "materials":
materials_first_year_file = package_data_path(
"costs", "materials", "first_year.csv"
"costs", "materials", "tech_map.csv"
)
materials_first_year = pd.read_csv(materials_first_year_file)
materials_first_year = pd.read_csv(materials_first_year_file)[
["message_technology", "first_year_original"]
]
df_first_year = pd.concat(
[df_first_year, materials_first_year], ignore_index=True
).drop_duplicates()
Expand Down

0 comments on commit 9e4b775

Please sign in to comment.