Skip to content

Commit a76db4e

Browse files
authored
Merge pull request #378 from iiasa/enh/costs-enum
Merge costs-related changes from `ssp-dev`
2 parents dded458 + 9edaa19 commit a76db4e

27 files changed

+939
-382
lines changed

doc/api/tools-costs.rst

Lines changed: 39 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -36,31 +36,33 @@ Non-reference regions
3636
Modules and model variants
3737
==========================
3838

39-
Within the context of the tool, the term **module** (specified by :attr:`.Config.module`) is used to mean input data for particular *sets of technologies*.
40-
These correspond to subsets of all the technologies in MESSAGEix-GLOBIOM models—either the base model or model variants. [3]_
41-
Currently, :mod:`.tools.costs` supports two module :attr:`~.Config.module` settings:
42-
43-
"energy"
44-
Mostly electric power technologies, as well as a few other supply-side technologies.
45-
46-
This can be considered the "base" module, corresponding to the "base" version of MESSAGEix-GLOBIOM, as it contains the most technologies.
47-
48-
"materials"
49-
Technologies conceived as part of the materials and industry sectors.
50-
51-
"cooling"
52-
Cooling technologies for power plants.
39+
Within the context of the tool,
40+
the term **‘module’** is used to refer to input data for particular *sets of technologies*.
41+
These correspond to subsets of all the technologies in MESSAGEix-GLOBIOM models
42+
—either the base model or model variants.
43+
The tool supports all the modules enumerated by :class:`.costs.MODULE`;
44+
these are specified by setting :attr:`.Config.module` on a new or existing instance.
45+
See the documentation of :class:`.MODULE` for longer descriptions of the scope of each.
46+
47+
.. note::
48+
This usage of “module” differs from the meaning of a “Python module”.
49+
For instance, :mod:`message_ix_models.model.water` is a *Python module* for MESSAGEix-Nexus.
50+
If the setting :py:`.costs.Config.module = MODULE.water` existed,
51+
this *could*, but would *not necessarily*,
52+
refer to input data for projecting investment and fixed costs of water technologies
53+
that are defined in :mod:`message_ix_models.model.water`.
54+
The existence of any Python module does not imply that it is supported by :mod:`.tools.costs`.
5355

5456
Data and files for a particular module can refer to other modules.
55-
This allows for values or settings for "materials" and other technologies to be assumed to match the values and settings used for the referenced "energy"-module technologies.
56-
57-
.. [3] This usage of “module” differs from the meaning of a “Python module”.
58-
For instance, :mod:`message_ix_models.model.water` is a *Python module* for MESSAGEix-Nexus.
59-
If the setting :py:`.costs.Config.module = "water"` were added, this *might* refer to input data for projecting investment and fixed costs of water technologies that are defined in :mod:`message_ix_models.model.water`—but not necessarily.
57+
This allows to implement the assumption that values or settings for certain technologies in,
58+
for instance, :attr:`.MODULE.materials`,
59+
match the values and settings used for certain referenced :attr:`.MODULE.energy` technologies.
6060

6161
To add a new module, the following steps are required:
6262

63-
- In :file:`message_ix_models/data/costs/`, create another subdirectory with the name of the new module, for instance :file:`message_ix_models/data/costs/[module]/`.
63+
- Add a new member to the :class:`.MODULE` enumeration.
64+
The name of the member is the name of the module.
65+
- In :file:`message_ix_models/data/costs/`, create another subdirectory with same name, for instance :file:`message_ix_models/data/costs/[module]/`.
6466
- Add the following files to the new directory:
6567

6668
:file:`first_year_[module].csv`
@@ -84,16 +86,25 @@ To add a new module, the following steps are required:
8486
- "base_year_reference_region_cost": the base year cost for the technology in the reference region.
8587
- "fix_ratio": the ratio of fixed O&M costs to investment costs for the technology.
8688

87-
- Add the new module to the allowed values of :attr:`.Config.module`.
88-
8989
Please note that the following assumptions are made in technology costs mapping:
9090

91-
- If a technology is mapped to a technology in the "energy" module, then the cost reduction across scenarios is the same as the cost reduction of the mapped technology.
92-
- If a non-"energy" module (such as "materials" or "cooling") technology has :py:`reg_diff_source="energy"` and the "base_year_reference_region_cost" is not empty, then the "base_year_reference_region_cost" in :file:`tech_map_[module].csv` is used as the base year cost for the technology in the reference region.
93-
If the "base_year_reference_region_cost" is empty, then the cost reduction across scenarios is the same as the cost reduction of the mapped technology.
94-
- If using a non-"energy" module (such as "materials" or "cooling"), if a technology that is specified in :file:`tech_map_materials.csv` already exists in :file:`tech_map_energy.csv`, then the reference region cost is taken from :file:`tech_map_materials.csv`.
95-
- If a technology in a module is not mapped to any source of regional differentiation, then no cost reduction over the years is applied to the technology.
96-
- If a technology has a non-empty "base_year_reference_region_cost" but is not mapped to any source of regional differentiation, then assume no regional differentiation and use the reference region base year cost as the base year cost for all regions.
91+
- If a technology is mapped to a technology in the "energy" module,
92+
then the cost reduction across scenarios is the same as the cost reduction of the mapped technology.
93+
- If a non-"energy" module (such as "materials" or "cooling") technology has :py:`reg_diff_source="energy"`
94+
and the "base_year_reference_region_cost" is not empty,
95+
then the "base_year_reference_region_cost" in :file:`tech_map_[module].csv` is used
96+
as the base year cost for the technology in the reference region.
97+
If the "base_year_reference_region_cost" is empty,
98+
then the cost reduction across scenarios is the same as the cost reduction of the mapped technology.
99+
- If using a non-"energy" module (such as "materials" or "cooling"),
100+
and a technology that is specified in :file:`tech_map_materials.csv` already exists in :file:`tech_map_energy.csv`,
101+
then the reference region cost is taken from :file:`tech_map_materials.csv`.
102+
- If a technology in a module is not mapped to any source of regional differentiation,
103+
then no cost reduction over the years is applied to the technology.
104+
- If a technology has a non-empty "base_year_reference_region_cost"
105+
but is not mapped to any source of regional differentiation,
106+
then assume no regional differentiation
107+
and use the reference region base year cost as the base year cost for all regions.
97108

98109
Data sources
99110
============

doc/whatsnew.rst

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
What's new
22
**********
33

4-
.. Next release
5-
.. ============
4+
Next release
5+
============
6+
7+
- Improve :mod:`.tools.costs` for |ssp-scenariomip| (:pull:`378`).
8+
9+
- :attr:`Config.module <.tools.costs.Config.module>` is no longer a :class:`str`
10+
but a member of a new enumeration :class:`~.costs.MODULE`.
11+
- :py:`Config.final_year` is replaced by :attr:`.Config.final_model_year`
12+
and :attr:`.Config.final_projection_year`.
13+
- Add :attr:`.costs.MODULE.dac` and associated input data.
14+
- New submodule :mod:`.tools.costs.scenario` for TODO COMPLETE.
15+
- Update costs data.
16+
17+
- Add 23 technologies used in |ssp-scenariomip| to :ref:`technology-yaml` (:pull:`378`).
618

719
v2025.7.23
820
==========
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Cost reduction in 2100,,,,,
2+
# ,,,,,
3+
# Units: % ,,,,,
4+
message_technology,very_low,low,medium,high,very_high
5+
dac_lt,0.1,0.3,0.5,0.7,0.9
6+
dac_hte,0.1,0.3,0.5,0.7,0.9
7+
dac_htg,0.1,0.3,0.5,0.7,0.9
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
message_technology,SSP1,SSP2,SSP3,SSP4,SSP5,LED
2+
dac_lt,low,medium,medium,high,high,low
3+
dac_hte,low,medium,medium,high,high,low
4+
dac_htg,low,medium,medium,high,high,low
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
message_technology,reg_diff_source,reg_diff_technology,base_year_reference_region_cost,fix_ratio,first_year_original
2+
dac_lt,energy,igcc_ccs,4000,,2030
3+
dac_hte,energy,igcc_ccs,5000,,2030
4+
dac_htg,energy,igcc_ccs,5500,,2030
Lines changed: 116 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,116 @@
1-
# Cost reduction in 2100,,,,,
2-
# ,,,,,
3-
# Units: % ,,,,,
4-
#,,,,,
5-
# Data is copied from Sheet1 in https://github.com/iiasa/message_data/blob/dev/data/model/investment_cost/SSP_technology_learning.xlsx,,,,,
6-
# There are some manually changed assumptions to the original GEA data in the spreadsheet (can be seen in the spreadsheet as marked in yellow),,,,,
7-
# The initial copied data can be found in gea_reduction_rates.csv,,,,,
8-
# This file renames the learning rates from GEAL to low and GEAM to medium and GEAH to high,,,,,
9-
message_technology,very_low,low,medium,high,very_high
10-
bio_istig,0,0.1,0.3,0.4,0.5
11-
bio_istig_ccs,0,0.1,0.3,0.4,0.6
12-
bio_ppl,0,0.1,0.2,0.3,0.4
13-
bio_ppl_co2scr,0,0,0,0.3,0.4
14-
biomass_i,0,0,0,0,0
15-
c_ppl_co2scr,0,0,0,0.3,0.4
16-
coal_adv,0,0.1,0.3,0.5,0.7
17-
coal_adv_ccs,0,0.1,0.3,0.5,0.7
18-
coal_i,0,0,0,0,0
19-
coal_ppl,0,0,0.2,0.5,0.7
20-
coal_ppl_u,0,0,0,0,0
21-
csp_sm1_ppl,0.15,0.3,0.3,0.5,0.7
22-
csp_sm3_ppl,0.15,0.3,0.3,0.5,0.7
23-
elec_i,0,0,0,0,0
24-
eth_bio,0,0.27,0.27,0.4,0.55
25-
eth_bio_ccs,0,0.27,0.27,0.4,0.55
26-
eth_i,0,0,0,0,0
27-
foil_i,0,0,0,0,0
28-
g_ppl_co2scr,0,0,0,0.3,0.4
29-
gas_cc,0.1,0.2,0.29,0.38,0.5
30-
gas_cc_ccs,0.1,0.2,0.29,0.5,0.7
31-
gas_ct,0.1,0.2,0.29,0.38,0.5
32-
gas_i,0,0,0,0,0
33-
gas_ppl,0.1,0.2,0.29,0.38,0.5
34-
geo_hpl,0.1,0.15,0.18,0.25,0.35
35-
geo_ppl,0,0.1,0.18,0.25,0.35
36-
h2_bio,0,0.25,0.4,0.5,0.7
37-
h2_bio_ccs,0,0.25,0.4,0.5,0.7
38-
h2_coal,0,0.25,0.4,0.4,0.5
39-
h2_coal_ccs,0,0.25,0.4,0.4,0.5
40-
h2_elec,0,0,0.1,0.2,0.3
41-
h2_i,0,0,0,0,0
42-
h2_smr,0,0.25,0.4,0.5,0.7
43-
h2_smr_ccs,0,0.25,0.4,0.5,0.7
44-
heat_i,0,0,0,0,0
45-
hp_el_i,0.1,0.2,0.5,0.5,0.6
46-
hp_gas_i,0.1,0.2,0.4,0.4,0.5
47-
hydro_hc,0,0,0,0,0
48-
hydro_lc,0,0,0,0,0
49-
igcc,0,0.1,0.3,0.5,0.7
50-
igcc_ccs,0,0.1,0.3,0.5,0.7
51-
liq_bio,0.15,0.27,0.27,0.4,0.55
52-
liq_bio_ccs,0.15,0.27,0.27,0.4,0.55
53-
loil_i,0,0,0,0,0
54-
meth_coal,0,0.05,0.1,0.15,0.2
55-
meth_coal_ccs,0,0.05,0.1,0.15,0.2
56-
meth_i,0,0,0,0,0
57-
meth_ng,0,0.05,0.1,0.15,0.2
58-
meth_ng_ccs,0,0.05,0.1,0.15,0.2
59-
nuc_hc,0,0,0.15,0.3,0.45
60-
nuc_lc,0,0,0,0,0
61-
solar_i,0.1,0.2,0.6,0.9,0.95
62-
solar_pv_I,0.15,0.3,0.7,0.9,0.95
63-
solar_pv_RC,0.15,0.3,0.7,0.9,0.95
64-
solar_res_hist_2005,0.15,0.3,0.7,0.9,0.95
65-
solar_res_hist_2010,0.15,0.3,0.7,0.9,0.95
66-
solar_res_hist_2015,0.15,0.3,0.7,0.9,0.95
67-
solar_res_hist_2020,0.15,0.3,0.7,0.9,0.95
68-
solar_res1,0.15,0.3,0.7,0.9,0.95
69-
solar_res2,0.15,0.3,0.7,0.9,0.95
70-
solar_res3,0.15,0.3,0.7,0.9,0.95
71-
solar_res4,0.15,0.3,0.7,0.9,0.95
72-
solar_res5,0.15,0.3,0.7,0.9,0.95
73-
solar_res6,0.15,0.3,0.7,0.9,0.95
74-
solar_res7,0.15,0.3,0.7,0.9,0.95
75-
solar_res8,0.15,0.3,0.7,0.9,0.95
76-
solar_th_ppl,0.15,0.3,0.3,0.5,0.7
77-
stor_ppl,0.15,0.3,0.7,0.9,0.95
78-
syn_liq,0,0.05,0.1,0.15,0.2
79-
syn_liq_ccs,0,0.05,0.1,0.15,0.2
80-
wind_ref_hist_2005,0.15,0.3,0.53,0.65,0.75
81-
wind_ref_hist_2010,0.15,0.3,0.53,0.65,0.75
82-
wind_ref_hist_2015,0.15,0.3,0.53,0.65,0.75
83-
wind_ref_hist_2020,0.15,0.3,0.53,0.65,0.75
84-
wind_ref1,0.15,0.3,0.53,0.65,0.75
85-
wind_ref2,0.15,0.3,0.53,0.65,0.75
86-
wind_ref3,0.15,0.3,0.53,0.65,0.75
87-
wind_ref4,0.15,0.3,0.53,0.65,0.75
88-
wind_ref5,0.15,0.3,0.53,0.65,0.75
89-
wind_res_hist_2005,0.15,0.3,0.53,0.65,0.75
90-
wind_res_hist_2010,0.15,0.3,0.53,0.65,0.75
91-
wind_res_hist_2015,0.15,0.3,0.53,0.65,0.75
92-
wind_res_hist_2020,0.15,0.3,0.53,0.65,0.75
93-
wind_res1,0.15,0.3,0.53,0.65,0.75
94-
wind_res2,0.15,0.3,0.53,0.65,0.75
95-
wind_res3,0.15,0.3,0.53,0.65,0.75
96-
wind_res4,0.15,0.3,0.53,0.65,0.75
1+
# Cost reduction in 2100,,,,,,
2+
# ,,,,,,
3+
# Units: % ,,,,,,
4+
#,,,,,,
5+
# Data is copied from Sheet1 in https://github.com/iiasa/message_data/blob/dev/data/model/investment_cost/SSP_technology_learning.xlsx,,,,,,
6+
# There are some manually changed assumptions to the original GEA data in the spreadsheet (can be seen in the spreadsheet as marked in yellow),,,,,,
7+
# The initial copied data can be found in gea_reduction_rates.csv,,,,,,
8+
# This file renames the learning rates from GEAL to low and GEAM to medium and GEAH to high,,,,,,
9+
message_technology,very_low,low,low_medium,medium,high,very_high
10+
bio_istig,0,0.1,0.3,0.3,0.4,0.5
11+
bio_istig_ccs,0,0.1,0.3,0.3,0.4,0.6
12+
bio_ppl,0,0.1,0.2,0.2,0.3,0.4
13+
bio_ppl_co2scr,0,0,0,0,0.3,0.4
14+
biomass_i,0,0,0,0,0,0
15+
c_ppl_co2scr,0,0,0.1,0.2,0.3,0.4
16+
coal_adv,0,0.1,0.3,0.3,0.5,0.7
17+
coal_adv_ccs,0,0.1,0.3,0.3,0.5,0.7
18+
coal_i,0,0,0,0,0,0
19+
coal_ppl,0,0,0.2,0.2,0.5,0.7
20+
coal_ppl_u,0,0,0,0,0,0
21+
csp_sm1_ppl,0.15,0.3,0.3,0.3,0.5,0.7
22+
csp_sm3_ppl,0.15,0.3,0.3,0.3,0.5,0.7
23+
elec_i,0,0,0,0,0,0
24+
eth_bio,0,0.1,0.27,0.27,0.4,0.55
25+
eth_bio_ccs,0,0.1,0.27,0.27,0.4,0.55
26+
eth_i,0,0,0,0,0,0
27+
foil_i,0,0,0,0,0,0
28+
g_ppl_co2scr,0,0,0.1,0.2,0.3,0.4
29+
gas_cc,0.1,0.2,0.29,0.29,0.38,0.5
30+
gas_cc_ccs,0.1,0.2,0.29,0.29,0.5,0.7
31+
gas_ct,0.1,0.2,0.29,0.29,0.38,0.5
32+
gas_i,0,0,0,0,0,0
33+
gas_ppl,0.1,0.2,0.29,0.29,0.38,0.5
34+
geo_hpl,0.1,0.15,0.18,0.18,0.25,0.35
35+
geo_ppl,0,0.1,0.18,0.18,0.25,0.35
36+
h2_bio,0,0.1,0.25,0.4,0.5,0.7
37+
h2_bio_ccs,0,0.1,0.25,0.4,0.5,0.7
38+
h2_coal,0,0.25,0.4,0.4,0.4,0.5
39+
h2_coal_ccs,0,0.25,0.4,0.4,0.4,0.5
40+
h2_elec,0,0.1,0.25,0.5,0.7,0.8
41+
h2_i,0,0,0,0,0,0
42+
h2_smr,0,0.25,0.4,0.4,0.5,0.7
43+
h2_smr_ccs,0,0.25,0.4,0.4,0.5,0.7
44+
heat_i,0,0,0,0,0,0
45+
hp_el_i,0.1,0.2,0.5,0.5,0.5,0.6
46+
hp_gas_i,0.1,0.2,0.4,0.4,0.4,0.5
47+
hydro_hc,0,0,0,0,0,0
48+
hydro_lc,0,0,0,0,0,0
49+
igcc,0,0.1,0.3,0.3,0.5,0.7
50+
igcc_ccs,0,0.1,0.3,0.3,0.5,0.7
51+
liq_bio,0,0.1,0.27,0.27,0.4,0.55
52+
liq_bio_ccs,0,0.1,0.27,0.27,0.4,0.55
53+
loil_i,0,0,0,0,0,0
54+
meth_coal,0,0.05,0.1,0.1,0.15,0.2
55+
meth_coal_ccs,0,0.05,0.1,0.1,0.15,0.2
56+
meth_i,0,0,0,0,0,0
57+
meth_ng,0,0.05,0.1,0.1,0.15,0.2
58+
meth_ng_ccs,0,0.05,0.1,0.1,0.15,0.2
59+
nuc_hc,0,0,0.15,0.2,0.3,0.45
60+
nuc_lc,0,0,0,0,0,0
61+
solar_i,0.1,0.2,0.6,0.6,0.9,0.95
62+
solar_pv_I,0.15,0.3,0.7,0.7,0.9,0.95
63+
solar_pv_RC,0.15,0.3,0.7,0.7,0.9,0.95
64+
solar_res_hist_2000,0.15,0.3,0.5,0.7,0.9,0.95
65+
solar_res_hist_2005,0.15,0.3,0.5,0.7,0.9,0.95
66+
solar_res_hist_2010,0.15,0.3,0.5,0.7,0.9,0.95
67+
solar_res_hist_2015,0.15,0.3,0.5,0.7,0.9,0.95
68+
solar_res_hist_2020,0.15,0.3,0.5,0.7,0.9,0.95
69+
solar_res_hist_2025,0.15,0.3,0.5,0.7,0.9,0.95
70+
solar_res1,0.15,0.3,0.5,0.7,0.9,0.95
71+
solar_res2,0.15,0.3,0.5,0.7,0.9,0.95
72+
solar_res3,0.15,0.3,0.5,0.7,0.9,0.95
73+
solar_res4,0.15,0.3,0.5,0.7,0.9,0.95
74+
solar_res5,0.15,0.3,0.5,0.7,0.9,0.95
75+
solar_res6,0.15,0.3,0.5,0.7,0.9,0.95
76+
solar_res7,0.15,0.3,0.5,0.7,0.9,0.95
77+
solar_res8,0.15,0.3,0.5,0.7,0.9,0.95
78+
solar_res_rt_hist_2000,0.15,0.3,0.5,0.7,0.9,0.95
79+
solar_res_rt_hist_2005,0.15,0.3,0.5,0.7,0.9,0.95
80+
solar_res_rt_hist_2010,0.15,0.3,0.5,0.7,0.9,0.95
81+
solar_res_rt_hist_2015,0.15,0.3,0.5,0.7,0.9,0.95
82+
solar_res_rt_hist_2020,0.15,0.3,0.5,0.7,0.9,0.95
83+
solar_res_rt_hist_2025,0.15,0.3,0.5,0.7,0.9,0.95
84+
solar_res_RT1,0.15,0.3,0.5,0.7,0.9,0.95
85+
solar_res_RT2,0.15,0.3,0.5,0.7,0.9,0.95
86+
solar_res_RT3,0.15,0.3,0.5,0.7,0.9,0.95
87+
solar_res_RT4,0.15,0.3,0.5,0.7,0.9,0.95
88+
solar_res_RT5,0.15,0.3,0.5,0.7,0.9,0.95
89+
solar_res_RT6,0.15,0.3,0.5,0.7,0.9,0.95
90+
solar_res_RT7,0.15,0.3,0.5,0.7,0.9,0.95
91+
solar_res_RT8,0.15,0.3,0.5,0.7,0.9,0.95
92+
solar_th_ppl,0.15,0.3,0.3,0.3,0.5,0.7
93+
stor_ppl,0.15,0.3,0.5,0.7,0.9,0.95
94+
syn_liq,0,0.05,0.1,0.1,0.15,0.2
95+
syn_liq_ccs,0,0.05,0.1,0.1,0.15,0.2
96+
wind_ref_hist_2000,0.15,0.3,0.5,0.53,0.65,0.75
97+
wind_ref_hist_2005,0.15,0.3,0.5,0.53,0.65,0.75
98+
wind_ref_hist_2010,0.15,0.3,0.5,0.53,0.65,0.75
99+
wind_ref_hist_2015,0.15,0.3,0.5,0.53,0.65,0.75
100+
wind_ref_hist_2020,0.15,0.3,0.5,0.53,0.65,0.75
101+
wind_ref_hist_2025,0.15,0.3,0.5,0.53,0.65,0.75
102+
wind_ref1,0.15,0.3,0.5,0.53,0.65,0.75
103+
wind_ref2,0.15,0.3,0.5,0.53,0.65,0.75
104+
wind_ref3,0.15,0.3,0.5,0.53,0.65,0.75
105+
wind_ref4,0.15,0.3,0.5,0.53,0.65,0.75
106+
wind_ref5,0.15,0.3,0.5,0.53,0.65,0.75
107+
wind_res_hist_2000,0.15,0.3,0.5,0.53,0.65,0.75
108+
wind_res_hist_2005,0.15,0.3,0.5,0.53,0.65,0.75
109+
wind_res_hist_2010,0.15,0.3,0.5,0.53,0.65,0.75
110+
wind_res_hist_2015,0.15,0.3,0.5,0.53,0.65,0.75
111+
wind_res_hist_2020,0.15,0.3,0.5,0.53,0.65,0.75
112+
wind_res_hist_2025,0.15,0.3,0.5,0.53,0.65,0.75
113+
wind_res1,0.15,0.3,0.5,0.53,0.65,0.75
114+
wind_res2,0.15,0.3,0.5,0.53,0.65,0.75
115+
wind_res3,0.15,0.3,0.5,0.53,0.65,0.75
116+
wind_res4,0.15,0.3,0.5,0.53,0.65,0.75

0 commit comments

Comments
 (0)