From 319d13e177be8b3167a85700fc3fa18c35813ca9 Mon Sep 17 00:00:00 2001 From: Measrainsey Meng Date: Tue, 17 Dec 2024 09:31:19 +0100 Subject: [PATCH 1/2] Add dac module to function type hints --- message_ix_models/tools/costs/decay.py | 6 +++--- message_ix_models/tools/costs/regional_differentiation.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/message_ix_models/tools/costs/decay.py b/message_ix_models/tools/costs/decay.py index a28fcb034..8917b6434 100644 --- a/message_ix_models/tools/costs/decay.py +++ b/message_ix_models/tools/costs/decay.py @@ -11,7 +11,7 @@ def _get_module_scenarios_reduction( - module: Literal["energy", "materials", "cooling"], + module: Literal["energy", "materials", "cooling", "dac"], energy_map_df: pd.DataFrame, tech_map_df: pd.DataFrame, ) -> pd.DataFrame: @@ -160,7 +160,7 @@ def _get_module_scenarios_reduction( def _get_module_cost_reduction( - module: Literal["energy", "materials", "cooling"], + module: Literal["energy", "materials", "cooling", "dac"], energy_map_df: pd.DataFrame, tech_map_df: pd.DataFrame, ) -> pd.DataFrame: @@ -294,7 +294,7 @@ def _get_module_cost_reduction( # create function to get technology reduction scenarios data def get_technology_reduction_scenarios_data( - first_year: int, module: Literal["energy", "materials", "cooling"] + first_year: int, module: Literal["energy", "materials", "cooling", "dac"] ) -> pd.DataFrame: # Get full list of technologies from mapping tech_map = energy_map = get_raw_technology_mapping("energy") diff --git a/message_ix_models/tools/costs/regional_differentiation.py b/message_ix_models/tools/costs/regional_differentiation.py index 8957475d9..aec47d0e4 100644 --- a/message_ix_models/tools/costs/regional_differentiation.py +++ b/message_ix_models/tools/costs/regional_differentiation.py @@ -172,7 +172,7 @@ def get_intratec_data() -> pd.DataFrame: def get_raw_technology_mapping( - module: Literal["energy", "materials", "cooling"], + module: Literal["energy", "materials", "cooling", "dac"], ) -> pd.DataFrame: """Retrieve a technology mapping for `module`. @@ -235,7 +235,7 @@ def subset_module_map(raw_map): def adjust_technology_mapping( - module: Literal["energy", "materials", "cooling"], + module: Literal["energy", "materials", "cooling", "dac"], ) -> pd.DataFrame: """Adjust technology mapping based on sources and assumptions. From 91bb4ea1d51434130bd85126015b82fd1b575b93 Mon Sep 17 00:00:00 2001 From: Measrainsey Meng Date: Tue, 17 Dec 2024 09:31:50 +0100 Subject: [PATCH 2/2] Move `dac` cost reduction assumptions to module folder Currently the DAC technologies' cost reduction and reduction scenarios assumptions are added to the `energy` module's CSV files. With #255, there is now the functionality to add module-specific cost assumptions. So I am moving the DAC technologies' cost reduction categories and reduction scenarios to its own module directory. --- message_ix_models/data/costs/dac/cost_reduction.csv | 7 +++++++ message_ix_models/data/costs/dac/scenarios_reduction.csv | 4 ++++ message_ix_models/data/costs/energy/cost_reduction.csv | 5 +---- .../data/costs/energy/scenarios_reduction.csv | 3 --- 4 files changed, 12 insertions(+), 7 deletions(-) create mode 100755 message_ix_models/data/costs/dac/cost_reduction.csv create mode 100755 message_ix_models/data/costs/dac/scenarios_reduction.csv diff --git a/message_ix_models/data/costs/dac/cost_reduction.csv b/message_ix_models/data/costs/dac/cost_reduction.csv new file mode 100755 index 000000000..969b04eb2 --- /dev/null +++ b/message_ix_models/data/costs/dac/cost_reduction.csv @@ -0,0 +1,7 @@ +# Cost reduction in 2100,,,,, +# ,,,,, +# Units: % ,,,,, +message_technology,very_low,low,medium,high,very_high +dac_lt,0.1,0.3,0.5,0.7,0.9 +dac_hte,0.1,0.3,0.5,0.7,0.9 +dac_htg,0.1,0.3,0.5,0.7,0.9 \ No newline at end of file diff --git a/message_ix_models/data/costs/dac/scenarios_reduction.csv b/message_ix_models/data/costs/dac/scenarios_reduction.csv new file mode 100755 index 000000000..045b2a133 --- /dev/null +++ b/message_ix_models/data/costs/dac/scenarios_reduction.csv @@ -0,0 +1,4 @@ +message_technology,SSP1,SSP2,SSP3,SSP4,SSP5,LED +dac_lt,low,medium,medium,high,high,low +dac_hte,low,medium,medium,high,high,low +dac_htg,low,medium,medium,high,high,low \ No newline at end of file diff --git a/message_ix_models/data/costs/energy/cost_reduction.csv b/message_ix_models/data/costs/energy/cost_reduction.csv index 2ed01b6b7..25387b11e 100755 --- a/message_ix_models/data/costs/energy/cost_reduction.csv +++ b/message_ix_models/data/costs/energy/cost_reduction.csv @@ -96,7 +96,4 @@ wind_res_hist_2020,0.15,0.3,0.53,0.53,0.65,0.75 wind_res1,0.15,0.3,0.53,0.53,0.65,0.75 wind_res2,0.15,0.3,0.53,0.53,0.65,0.75 wind_res3,0.15,0.3,0.53,0.53,0.65,0.75 -wind_res4,0.15,0.3,0.53,0.53,0.65,0.75 -dac_lt,0.1,0.3,0.5,0.7,0.9 -dac_hte,0.1,0.3,0.5,0.7,0.9 -dac_htg,0.1,0.3,0.5,0.7,0.9 +wind_res4,0.15,0.3,0.53,0.53,0.65,0.75 \ No newline at end of file diff --git a/message_ix_models/data/costs/energy/scenarios_reduction.csv b/message_ix_models/data/costs/energy/scenarios_reduction.csv index dcacdeeff..d9a964f83 100755 --- a/message_ix_models/data/costs/energy/scenarios_reduction.csv +++ b/message_ix_models/data/costs/energy/scenarios_reduction.csv @@ -89,6 +89,3 @@ wind_res1,high,medium,low,high,medium,very_high wind_res2,high,medium,low,high,medium,very_high wind_res3,high,medium,low,high,medium,very_high wind_res4,high,medium,low,high,medium,very_high -dac_lt,low,medium,medium,high,high,low -dac_hte,low,medium,medium,high,high,low -dac_htg,low,medium,medium,high,high,low