Skip to content

Commit 937c49a

Browse files
authored
Merge pull request #418 from iiasa/ssp-dev-materials
Improve MESSAGEix-Materials
2 parents 6ba51b0 + 199db4e commit 937c49a

File tree

95 files changed

+17840
-2010
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+17840
-2010
lines changed

doc/material/index.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,25 @@ They can be turned on and off individually under ``DATA_FUNCTIONS`` in :mod:`__i
5252
.. automodule:: message_ix_models.model.material.data_generic
5353
:members:
5454

55-
.. automodule:: message_ix_models.model.material.data_ammonia_new
55+
.. automodule:: message_ix_models.model.material.data_ammonia
5656
:members:
5757

5858
.. automodule:: message_ix_models.model.material.data_methanol
5959
:members:
6060

61+
.. automodule:: message_ix_models.model.material.demand
62+
:members:
63+
64+
.. automodule:: message_ix_models.model.material.data_util
65+
:members:
66+
67+
Post-processing and reporting
68+
-----------------------------
69+
6170
.. automodule:: message_ix_models.model.material.report
6271
:members:
6372

73+
6474
Build and solve the model from CLI
6575
==================================
6676

doc/material/v1.2.0.rst

Lines changed: 92 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Version 1.2.0 (Month X, 2025)
22
*****************************
33

4-
Preview of the upcoming MESSAGEix-Materials release
4+
Preview of the upcoming MESSAGEix-Materials release.
55

66
This upcoming release of MESSAGEix-Materials introduces significant enhancements to the current model.
77
It features improved calibration and updated parameterization, drawing on the latest statistics and findings from recent literature.
@@ -14,30 +14,30 @@ Iron & steel sector
1414
-------------------
1515

1616
Revisions & fixes
17-
~~~~~~
17+
~~~~~~~~~~~~~~~~~
1818
- Added missing relation entries for maximum steel recycling rates
1919
- Full calibration of the steel sector for 2020 and 2025, including:
2020

21-
- Historical production and capacity additions for all major steel production technologies
22-
- Historical steel demand
23-
- Update of techno-economic input data for several technologies to more recent or accurate literature
24-
- Removed water commodity flows due to incompatibility with new MESSAGEix-GLOBIOM-GAINS model structure
21+
- Historical production and capacity additions for all major steel production technologies.
22+
- Historical steel demand.
23+
- Update of techno-economic input data for several technologies to more recent or accurate literature.
24+
- Removed water commodity flows due to incompatibility with new MESSAGEix-GLOBIOM-GAINS model structure.
2525

2626
Extensions
2727
~~~~~~~~~~
2828

29-
- Explicit representation of India-specific DRI technology using rotary coal kilns
30-
- :func:`.gen_cokeoven_co2_cc` function added to generate coke oven CO2 emission factors
29+
- Explicit representation of India-specific DRI technology using rotary coal kilns.
30+
- :func:`.gen_cokeoven_co2_cc` function added to generate coke oven CO2 emission factors.
3131
- Added functionality to differentiate steel model parameterization along SSP narratives:
3232

33-
- :func:`.get_scrap_prep_cost` function added to generate scrap preparation costs
34-
- :func:`.gen_max_recycling_rel` function added to generate maximum recycling rates
35-
- :func:`.gen_grow_cap_up function` added to generate growth constraints for steel CCS capacity
36-
- Use of :doc:`/api/tools-costs` for iron/steel production technologies
37-
- New steel projections derived from relationship of macro-economic investment to per capita steel demand
38-
- Regionally differentiated scrap availability from steel finishing and manufacturing based on statistics
33+
- :func:`.get_scrap_prep_cost` function added to generate scrap preparation costs.
34+
- :func:`.gen_max_recycling_rel` function added to generate maximum recycling rates.
35+
- :func:`.gen_grow_cap_up` function added to generate growth constraints for steel CCS capacity.
36+
- Use of :doc:`/api/tools-costs` for iron/steel production technologies.
37+
- New steel projections derived from relationship of macro-economic investment to per capita steel demand.
38+
- Regionally differentiated scrap availability from steel finishing and manufacturing based on statistics.
3939

40-
Non metallic minerals sector
40+
Non-metallic minerals sector
4141
----------------------------
4242

4343
- Clinker input for cement production is now differentiated by region based on literature data.
@@ -46,32 +46,50 @@ Non metallic minerals sector
4646
- Growth constraints for clinker CCS capacity are differentiated by SSP.
4747
- The energy requirement for clinker CCS was adjusted based on recent literature.
4848

49-
Non ferrous metals sector
49+
Non-ferrous metals sector
5050
-------------------------
5151

52-
- Trade representation for alumina has been implemented
53-
- The aluminum has been fixed in 2025 independent of SSP setting
54-
- The 2020 aluminum demand was slightly revised in some regions
55-
- The energy intensity of alumina refining was revised and differentiated by region based on IAI data
56-
- The fuel use for alumina refining in 2020 was calibrated based on IAI data
57-
- The energy intensity of aluminum smelting was revised and differentiated by region based on IAI data
58-
- The historical smelting capacity was calibrated based on an accurate global capacity data set
59-
- The historical smelting and refining activity in 2020 was calibrated based on BGS statistics
60-
- The maximum recyclable aluminum scrap ratio is now differentiated by SSP
61-
- The heat requirement and cost for aluminum scrap preparation is now differentiated by SSP
52+
- Trade representation for alumina has been implemented.
53+
- The aluminum has been fixed in 2025 independent of SSP setting.
54+
- The 2020 aluminum demand was slightly revised in some regions.
55+
- The energy intensity of alumina refining was revised and differentiated by region based on IAI data.
56+
- The fuel use for alumina refining in 2020 was calibrated based on IAI data.
57+
- The energy intensity of aluminum smelting was revised and differentiated by region based on IAI data.
58+
- The historical smelting capacity was calibrated based on an accurate global capacity data set.
59+
- The historical smelting and refining activity in 2020 was calibrated based on BGS statistics.
60+
- The maximum recyclable aluminum scrap ratio is now differentiated by SSP.
61+
- The heat requirement and cost for aluminum scrap preparation is now differentiated by SSP.
62+
63+
Chemicals sector
64+
----------------
65+
66+
- Functionality added to differentiate chemicals demands by SSP.
67+
- :func:`.gen_ccs_bounds` function added to generate CCS bounds for ammonia production in 2020 and 2025.
68+
- :func:`.gen_meth_fs_downstream` function added to generate new technology for methanol downstream use.
69+
- :func:`.gen_plastics_emission_factors`, :func:`.gen_chemicals_co2_ind_factors` and :func:`.gen_ethanol_to_ethylene_emi_factor` added to generate CO2 emission factors for chemicals.
6270

6371
Power sector
6472
------------
6573

6674
Demand generator
6775
----------------
6876

69-
*To be merged from ssp-dev*
77+
- Added functionality to project material demands based SSP narrative.
78+
- Added quantile regression option for demand projections.
7079

7180
Other
7281
-----
7382

74-
*To be merged from ssp-dev*
83+
- New residual industry demand model based on historical energy intensity trends.
84+
85+
- Calibrated to IEA energy balances for 2020.
86+
- Fixed 2025 technology activity based on 2017-2022 trends.
87+
- Added SSP specific projections for other industry energy demand.
88+
89+
- Updated share constraint parametrization for low temperature heat technologies.
90+
- Added share constraint for coal use in residual industry based on 2020 IEA energy balances.
91+
- Added non-CO2 emission factors for residual industry technologies based on GAINS data.
92+
- Added furnaces to GAINS driver ``relation`` `IndThermDemLink`.
7593

7694
CLI changes
7795
===========
@@ -81,7 +99,36 @@ CLI changes
8199
Deprecations
82100
============
83101

84-
- Functionalities of :mod:`.model.material.report.reporting` was replaced by :mod:`.model.material.report.run_reporting`. *Will be removed in the next release.*
102+
Model calibration:
103+
104+
Removed:
105+
106+
- :py:`.modify_demand_and_hist_activity_debug`
107+
- :py:`.modify_baseyear_bounds`
108+
- :py:`.calc_hist_activity`
109+
- :py:`.add_new_ind_hist_act`
110+
- :py:`.calc_demand_shares`
111+
- :py:`.calc_resid_ind_demand`
112+
- :py:`.modify_industry_demand`
113+
- :py:`.calc_demand_shares`
114+
- :py:`.add_elec_lowerbound_2020`
115+
- :py:`.add_coal_lowerbound_2020`
116+
117+
- :py:`.add_ccs_technologies` renamed to :func:`.add_cement_ccs_co2_tr_relation`.
118+
119+
Reporting:
120+
121+
- Functionalities of :mod:`.model.material.report.reporting` replaced by :mod:`.model.material.report.run_reporting`.
122+
*Will be removed completely in the future release.*
123+
124+
MACRO calibration:
125+
126+
- :py:`.load_GDP_COVID` removed.
127+
- :py:`.add_macro_COVID` renamed to :func:`.add_macro_materials`.
128+
129+
Miscellaneous:
130+
131+
- :py:`.combine_df_dictionaries` replaced by :func:`.merge_data`.
85132

86133
New features
87134
============
@@ -91,14 +138,27 @@ New features
91138
- :file:`aluminum_techno_economic.xlsx`
92139
- :file:`Global_cement_MESSAGE.xlsx`
93140
- :file:`Global_steel_MESSAGE.xlsx`
141+
- :file:`fert_techno_economic.xlsx`
142+
- :file:`nh3_fertilizer_demand.xlsx`
143+
- :file:`cost_conv_nh3.xlsx`
94144

95145
The files are currently still available for reference, but will be removed in a future release.
146+
:func:`.read_sector_data` and :func:`.read_timeseries` and :func:`.read_rel` was adjusted to read from csv files.
96147

97148
- New post-processing module for the industry sector in :mod:`.model.material.report.run_reporting` providing:
98149

99-
- More generalized method of post-processing MESSAGEix-Materials results
100-
- Configuration handled through :mod:`.model.material.report.config` YAML files in :file:`material/model/material/reporting/`
101-
- Higher resolution of post-processed results
150+
- More generalized method of post-processing MESSAGEix-Materials results.
151+
- Configuration handled through :mod:`.model.material.report.config` YAML files in :file:`material/model/material/reporting/`.
152+
- Higher resolution of post-processed results.
153+
154+
- New module to generate share constraints in :mod:`.model.material.share_constraints`.
155+
- Automatized MACRO calibration input data generation with :func:`.update_macro_calib_file` including data input templates for all SSPs in :file:`data/material/macro/`.
156+
157+
.. note::
158+
The MACRO calibration workflow only supports MESSAGEix-GLOBIOM-Materials model with R12 regions.
159+
The implementation automates the Excel functions previously used to derive ``price_ref`` and ``cost_ref`` and is not supposed to be a longterm solution.
160+
Ultimately, the ``message_ix`` :py:`.add_macro` functionalities should be used once issue `#859 <https://github.com/iiasa/message_ix/issues/859>`_ is resolved.
161+
See also internal Slack discussion `here <https://iiasa-ece.slack.com/archives/CD0GBHHA4/p1713430336582769>`_.
102162

103163
Bug Fixes
104164
---------

doc/material/whatsnew.rst

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
What's new
2+
**********
3+
4+
Next release
5+
============
6+
7+
SSP 3.0 development
8+
-------------------
9+
10+
By topic:
11+
12+
.. contents::
13+
:local:
14+
:backlinks: none
15+
16+
17+
Non-model changes
18+
^^^^^^^^^^^^^^^^^
19+
20+
- the ``--datafile`` option for the the material-ix build command was removed since it is not used anymore.
21+
- a ``material-ix calibrate`` command has been added that can be used to run the MACRO calibration step in isolation.
22+
- values from model parameter data that have a year_act and year_vtg columns greater than the technology lifetime are dropped since they are inflating the model size unnecessarily.
23+
- a module :mod:`.model.material.share_constraints` for commodity share constraints was created, but is not fully used in the build yet.
24+
.. todo:: consider differentiating the constraints by SSP.
25+
26+
Demand
27+
""""""
28+
29+
- the demand commodity ``level`` of methanol has been changed from ``final_material`` to ``demand``.
30+
- an additional demand projection setting for aluminum, steel and cement has been introduced called "highest" which SSP5 scenarios are mapped to
31+
- the 2025 demands are fixed to the projected SSP2 values for each SSP.
32+
- Aluminum base year demand has been updated based on IAI MFA output for 2020
33+
- Cement base year demand has been updated based on GlobBulk Consulting data for 2020
34+
- Steel base year demand has been updated based on worldsteel association data for 2020
35+
36+
37+
Post processing
38+
"""""""""""""""
39+
40+
- the new industry reporter has been implemented :mod:`.model.material.report`, with mapping files in ``data/material/reporting``.
41+
42+
Model development
43+
^^^^^^^^^^^^^^^^^
44+
45+
.. _general-changes:
46+
47+
General
48+
"""""""
49+
50+
- the power sector module has been deactivated for the SSP builds.
51+
- coal_i ``technology`` is share constrained in each region based on 2020 IEA statistics.
52+
- the low temperature share constraint for other industry is updated to reflect explicit modelling of heavy industry.
53+
54+
.. todo:: compile low temperature literature and set up references.
55+
56+
- the .tools.cost module has been updated to run in "gdp" mode when called by the materials build.
57+
- the .tools.cost module is called twice if ``--update_costs`` option is :any:`True` in ``material-ix build`` command to be able to get the correct cost projections for the non-MESSAGEix-Materials industry technologies (e.g ``coal_i``, ``sp_el_I`` etc.)
58+
- the following utility functions were added/updated in utils.py.
59+
- for mapping country names with `ISO 3166-1 alpha-3 <https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3>`_ codes with `pycountry <https://pypi.org/project/pycountry/>`_.
60+
61+
.. todo:: integrate in :mod:`.util.pycountry`.
62+
63+
- adding a ``R12`` column with region values mapped based on a iso column of the same dataframe.
64+
- the MACRO calibration excel input file updater is now also updating the ``demand_ref`` tab based on the given scenario ``demand`` parameter values.
65+
- the MACRO calibration excel input file updater can be run in "extrapolation" mode or just take values from the scenario directly.
66+
67+
68+
Aluminum
69+
""""""""
70+
71+
- 2025 ``demand`` SSP2 fixing as mentioned under :ref:`general-changes` changes.
72+
- the aluminum build reads SSP differentiated input data by reading from :file:`data/materials/aluminum/<SSPX>/aluminum_techno_economic.xlsx`.
73+
- the historical capacity of smelters is calibrated until 2020 using the genisim dataset.
74+
- the historical activity of smelters is calibrated until 2020 using British Geological Survey data (Soderberg activity is calibrated assuming capacity shares computed from genisim dataset).
75+
- the historical activity of smelters is calibrated until 2020 using British Geological Survey data.
76+
- the historical activity of alumina refining is calibrated until 2020 using British Geological Survey data.
77+
- a trade model for alumina is introduced to be able to calibrate refining and smelting activity.
78+
- the process heat fuel consumption is calibrated using IAI data.
79+
- the regional alumina refining process heat intensities are calibrated using IAI data.
80+
81+
Ammonia
82+
"""""""
83+
84+
- 2025 ``demand`` SSP2 fixing as mentioned under :ref:`general-changes` changes.
85+
- a unit issue in the emission factor of ``biomass_NH3_ccs`` ``technology`` was fixed.
86+
87+
Cement
88+
""""""
89+
90+
- 2025 ``demand`` SSP2 fixing as mentioned under :ref:`general-changes` changes.
91+
- the cement build reads SSP differentiated input data by reading from :file:`data/materials/cement/<SSPX>/Global_cement_MESSAGE.xlsx`.
92+
- selected regional ``CEMENT`` values in :file:`residual_industry_2019.csv` were updated since they seemed wrong when comparing the data to the IEA cement report.
93+
.. todo:: TODO: paste link to IEA cement report here.
94+
95+
- the heat input for clinker CCS addons was lowered a lot.
96+
.. todo:: insert US NREL publication reference here.
97+
98+
Other industry
99+
""""""""""""""
100+
101+
- 2025 ``demand`` SSP2 fixing as mentioned under :ref:`general-changes` changes.
102+
- the demands for the other industry are generated based on IEA historical data of the non-explicitly modelled sectors.
103+
104+
.. note:: the new demand model still sits in a private repository.
105+
106+
- the sector furnaces were missing non CO2 emission factors of their original MESSAGE counterpart (e.g ``coal_i``). Thus, they were copied from the originals and scaled with the input coefficients.
107+
- the furnaces are now writing into the ``IndThermDemLink`` relation, that is required for the MESSAGE-GAINS linkage.
108+
109+
.. _methanol-changes:
110+
111+
Methanol
112+
""""""""
113+
114+
- the model structure was slightly updated to simplify and correct the carbon emission balance accounting.
115+
116+
- the negative emission coefficients that represent the carbon stored in long lived products, were moved from ``meth_t_d`` technology to a new technology ``meth_ind_fs``.
117+
118+
- the carbon balance of ``MTO_petro`` was not correct. The process emissions and the ``input``/``output`` parameters were updated based on new literature.
119+
120+
.. todo:: compile literature list and summarize in a paragraph.
121+
122+
Petrochemicals
123+
""""""""""""""
124+
125+
- together with the changes in :ref:`methanol-changes` the carbon accounting was improved:
126+
127+
- the negative emission coefficients that represent the carbon stored in long lived products, were moved from ``steam_cracker_petro`` ``technology`` to the ``production_HVC`` ``technology``.
128+
129+
- since carbon capture in plastics was moved upstream, ``ethanol_to_ethylene_petro`` ``technology`` needed a positive emission factor to represent the combusted chemicals part produced with ethylene feedstock from ethanol.
130+
131+
Steel
132+
"""""
133+
134+
- the steel build reads SSP differentiated input data by reading from :file:`data/materials/steel/<SSPX>/Global_steel_MESSAGE.xlsx`.
135+
- the maximum recycling relation was updated.
136+
- the minimum recycling relation was changed for SSP1.
137+
- the ``cokeoven_steel`` ``technology`` got its own bottom up CO2 emission accounting coefficient, to separate that from industrial emissions and move it to transformation emissions.
138+
- the cost changes done in the last PR (insert steel hydrogen PR link) were also transferred to the :mod:`tools.cost` module and custom reduction rates were assigned.

doc/whatsnew.rst

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

4-
.. Next release
5-
.. ============
4+
Next release
5+
============
6+
7+
- Improve and extend :doc:`/material/index` (:pull:`418`).
8+
See :doc:`version 1.2.0 </material/v1.2.0>` for details.
69

710
v2025.9.9
811
=========

0 commit comments

Comments
 (0)