Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate MESSAGEix-Materials updates #188

Merged
merged 776 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
776 commits
Select commit Hold shift + click to select a range
79d8617
Update historical activity of chn
macflo8 Dec 19, 2022
f0d4269
Fix mtbe loil share
macflo8 Dec 19, 2022
45c4792
Fix util import
macflo8 Dec 19, 2022
c0ae269
Fix methanol trade file name
macflo8 Dec 19, 2022
1bbef90
Update emissions factor of chemicals
macflo8 Dec 19, 2022
c32f710
Add explanations to generic_furnaces data
GamzeUnlu95 Oct 11, 2022
8573073
Change hvc demand (add income elasticity)
GamzeUnlu95 Dec 6, 2022
05818d5
Add dummy fuel inputs to steel sector to the co2 emission relation 'c…
Jihoon Dec 7, 2022
11fdf07
Add non-co2 emission accounting
GamzeUnlu95 Dec 8, 2022
6dcb522
Fix co2_emission relation
GamzeUnlu95 Dec 9, 2022
d03ae54
Add 2020 scrap calibration for steel
GamzeUnlu95 Dec 15, 2022
09814c7
Change demand connections
GamzeUnlu95 Dec 16, 2022
ec70aab
Manual merge of furnace input file
macflo8 Dec 20, 2022
6a8f3e5
Fix small bug
macflo8 Dec 20, 2022
775ac8a
Add residual ammonia demand
GamzeUnlu95 Dec 20, 2022
965f05e
Fix small issues (nh3 reporting, petro demand)
GamzeUnlu95 Dec 20, 2022
2d4a573
Fix generic furnace data after rebase
GamzeUnlu95 Dec 22, 2022
e83592e
Fix all the data files after rebase
GamzeUnlu95 Dec 22, 2022
22309c0
Fix missing things after the rebase
GamzeUnlu95 Dec 22, 2022
fa940c2
Update files lost in rebase
GamzeUnlu95 Dec 23, 2022
ad25bb4
Fix issues after rebase
GamzeUnlu95 Dec 23, 2022
301075b
Adjust demand carve out
GamzeUnlu95 Dec 23, 2022
ef683d8
Update clinker cement ratio
GamzeUnlu95 Dec 23, 2022
e53e087
Adjust ammonia demand
GamzeUnlu95 Jan 16, 2023
06b418b
Update tables.py
GamzeUnlu95 Jan 18, 2023
d94c5a8
Update material report-2 command
GamzeUnlu95 Jan 18, 2023
920a78d
Add missing cement technologies
GamzeUnlu95 Jan 24, 2023
9f7547f
Add methanol reporting changes - not tested yet
GamzeUnlu95 Jan 25, 2023
edf6628
Add feedstock mode for methanol production
macflo8 Jan 24, 2023
4629ab7
Fix meth_t_d efficiency
macflo8 Jan 24, 2023
8453ba1
Fix methanol historical activities
macflo8 Jan 24, 2023
74585cd
Update meth_trade_techno_economic.xlsx
GamzeUnlu95 Jan 25, 2023
31e5eda
Update reporting based on new methanol setup
GamzeUnlu95 Jan 25, 2023
671396c
Remove methanol end use tecs from technology set
macflo8 Feb 23, 2023
48ee18a
Fix the bugs in furnace excel file
GamzeUnlu95 Feb 24, 2023
c386523
Fix the ammonia technology emission factors
GamzeUnlu95 Feb 24, 2023
076581d
Remove methanol fuel technologies
GamzeUnlu95 Feb 24, 2023
a4e9477
Update data_methanol.py
GamzeUnlu95 Feb 24, 2023
03783c7
Convert power sector r script to python
GamzeUnlu95 Mar 24, 2023
4200b31
Remove loil_trp dependency
macflo8 Mar 28, 2023
3ba2828
Add warning for macro calibration
GamzeUnlu95 Apr 11, 2023
9f86c13
Remove duplicated relation values
macflo8 Apr 12, 2023
1e4acd4
Add limestone_dummy_supply to emissions accounting
GamzeUnlu95 Apr 24, 2023
b2fad8c
Remove unnecessary printing
GamzeUnlu95 Apr 24, 2023
29d5969
Update reporting for embodied emissions
GamzeUnlu95 Apr 24, 2023
b4065bc
Clean up deprecated methanol code and add inline comments
macflo8 Feb 23, 2023
26c5d9f
Fix typos, line breaks, imports
macflo8 Feb 23, 2023
982837a
Add coal_nh3 base year bound and fix emission factors
macflo8 Feb 23, 2023
d86e08d
Add ethane mode constraint, correct steam_cracker technical data
macflo8 Feb 23, 2023
574126d
Add dictionary merge util func
macflo8 Feb 23, 2023
5ca9e8a
Change default sturm input file
macflo8 Feb 23, 2023
3f2bcde
Add ethanol mtbe alternative, update costs with loc-factor
macflo8 Feb 23, 2023
5e9163b
Add fuel/feedstock modes for all methanol tecs
macflo8 Feb 23, 2023
5d6cc75
Add mto base year upper bound
macflo8 Feb 23, 2023
d2b2eae
Add bounds to biomass/coal petro furnaces
macflo8 Feb 23, 2023
6ac53d2
Shorten import statements
macflo8 Feb 23, 2023
fbf8e01
Fix furnace emission factors
macflo8 Feb 23, 2023
d8d5728
Add sc ethane minimum share for mea and nam
macflo8 Mar 9, 2023
a69fb6f
Add profiling option to run_reporting()
macflo8 Mar 9, 2023
eb10d79
Adjust petro furnaces and sc
macflo8 Mar 9, 2023
c84d875
Refine excel formulas
macflo8 Mar 13, 2023
f988720
Add methanol feedstock trade
macflo8 Mar 28, 2023
c781067
Add meth exp relation to harmonize 2020
macflo8 Mar 28, 2023
b67acde
Remove unnecessary meth_coal additions & fix hist new cap and fix_cost
macflo8 Mar 28, 2023
feaf77f
Fix meth_ng historical_activity with new modes
macflo8 Mar 28, 2023
f49c7fa
Update to meti statistics
macflo8 Mar 28, 2023
2fa9159
Allow year columns to be nan
macflo8 Mar 28, 2023
a118deb
Harmonize base year trade with bounds
macflo8 Mar 28, 2023
50277f9
Remove end-use technologies dependencies
macflo8 Mar 28, 2023
a5bcc25
Refactor nh3 relations read-in
macflo8 Apr 4, 2023
bb520fb
Add regional cost convergence for nh3 production
macflo8 Apr 4, 2023
3be1ce5
Fix trade_petro var_cost region
macflo8 Apr 4, 2023
f2bc2c6
Add trade bound for nh3 and fertilizer
macflo8 Apr 4, 2023
fc55e79
Add ini_act_up for mto and ethanol-ethylene in all regions
macflo8 Apr 13, 2023
9ab7076
Fix meth_h2 addon constraint
macflo8 Apr 13, 2023
366385d
Add scenario version flag for solve command
macflo8 Apr 14, 2023
72873c2
Fix ini_act_up parameter of ethanol/ethylene and mto for regions with…
macflo8 Apr 14, 2023
a821ea8
Small style and typo correction
macflo8 Apr 25, 2023
e136fa9
Add fs/fuel modes for h2_elec
macflo8 Apr 25, 2023
358b37a
Add missing meth_h2 input files
macflo8 Apr 26, 2023
6903253
Add missing steam cracker historic input data
macflo8 Apr 26, 2023
33e6685
Add missing steam cracker historic input data2
macflo8 Apr 26, 2023
283ac2c
Fix the excel and csv files
GamzeUnlu95 May 2, 2023
2cbc8cd
Update income elasticity demand model
macflo8 Feb 23, 2023
d3a2cea
Update methanol_sensitivity_pars.xlsx
GamzeUnlu95 May 2, 2023
774560a
Implement small fixes
GamzeUnlu95 May 2, 2023
b6d0213
Cement update to allign emissions
GamzeUnlu95 May 3, 2023
7a31785
Add note about gas_processing_petro
GamzeUnlu95 May 3, 2023
231b975
Enable addition of timeseries data for input/output
GamzeUnlu95 May 9, 2023
c0301a3
Update steel sector
GamzeUnlu95 May 9, 2023
2e64884
Add changes to reflect pandas 2.0 upgrade
Jihoon May 17, 2023
179e914
Update aluminum industry
GamzeUnlu95 May 31, 2023
b00e1ad
Add the missing refinery oil furnace input
GamzeUnlu95 Jun 1, 2023
564135c
Remove unnecessary relation_activity entries
GamzeUnlu95 Jun 1, 2023
6e3fcc0
Update steam_cracker emisssion factors with new input value
macflo8 May 9, 2023
f525ab4
Add new meth tecs to meth_exp_limit relation
GamzeUnlu95 Jun 1, 2023
e36ed0c
Read nh3/hvc income elasticity from external file
macflo8 Feb 23, 2023
4bbfb1c
Shift model year to 2025 for 2 degree scenario
GamzeUnlu95 Jun 13, 2023
8482849
Change co2_cc to co2_feedstocks
GamzeUnlu95 Jun 15, 2023
0bbc326
Update petrochemicals_techno_economic.xlsx
GamzeUnlu95 Jun 15, 2023
276e577
Organize data structure
GamzeUnlu95 Jun 20, 2023
d2717ac
Add trade balance for light_oil and methanol using balance_equality
GamzeUnlu95 Jun 21, 2023
9d51776
Update diffusion constraints for petro and ammonia
GamzeUnlu95 Jun 21, 2023
0cef84c
Calibrate cement 2020 fuel use
GamzeUnlu95 Jul 13, 2023
22e87e1
Add balance_equality for cement end_of_life
GamzeUnlu95 Jul 18, 2023
7309cf7
Use concise methanol input files
GamzeUnlu95 Jul 25, 2023
d2ac9ab
Move cost convergence input data to separate file
macflo8 Jul 28, 2023
db2397f
Remove and add methanol technologies
GamzeUnlu95 Jul 31, 2023
4386aee
Remove meth_trade_balance and loil_trade_balance
GamzeUnlu95 Jul 31, 2023
4607a4f
Fix syntax issue
GamzeUnlu95 Aug 1, 2023
b61d56a
Update data_util.py
GamzeUnlu95 Aug 1, 2023
2bb89e3
Relocate reporting files
GamzeUnlu95 Aug 14, 2023
1956412
Resolve import issues with get_local_path()
macflo8 Nov 21, 2023
b70328e
Ensure preliminary compatibility with new ssp2 base model
macflo8 Nov 26, 2023
74df7f9
Add missing vintages for mto fix_cost
macflo8 Nov 26, 2023
b88e302
Add cli command for ssp cost updates
macflo8 Nov 28, 2023
b15a399
Modify r script for debugging
macflo8 Nov 28, 2023
8451feb
Add cli command for ssp supply cost runs
macflo8 Nov 29, 2023
c070d23
Add refactoring of r code for demand projections
macflo8 Nov 29, 2023
e979616
Add 2°c build cli command
macflo8 Nov 30, 2023
642c4fb
Undo tracking of some files
macflo8 Nov 30, 2023
094b33e
Undo tracking of some files 2
macflo8 Nov 30, 2023
7739382
Undo tracking of some files 3
macflo8 Nov 30, 2023
55cccdb
Add carbon price run command to cli
macflo8 Nov 30, 2023
6b0587c
Remove unused click option from materials command
macflo8 Nov 30, 2023
20bdfa8
Add yaml file for alu base demand
macflo8 Dec 1, 2023
55aaaf5
Fix var name in cli command
macflo8 Dec 1, 2023
5cc4cad
Add flag to run mitigation cli command with several budgets
macflo8 Dec 4, 2023
1eee970
Add 650f price scenario for cprice run command
macflo8 Dec 5, 2023
ef3f30d
Remove deprecated function argument
macflo8 Dec 5, 2023
f68a6b2
Remove deprecated files
macflo8 Dec 5, 2023
8aa4872
Finalize materials demand refactoring
macflo8 Dec 5, 2023
3a8903d
Fix cprice scenario naming
macflo8 Dec 6, 2023
a5d97bb
Add all refactored code regarding demand projections
macflo8 Jan 22, 2024
45068cb
Add compatibility with ssp_dev scenarios
macflo8 Jan 22, 2024
2584dd4
Comment out unused rpy2 dependencies
macflo8 Jan 22, 2024
0220a7f
Add water tecs input file for ssp_dev compatibility
macflo8 Jan 22, 2024
2f9b98a
Adjust pandas operations to resolve futurewarnings
macflo8 Jan 26, 2024
753b4b7
Add exceptions for ssp_dev scenarios to enable compatibility
macflo8 Jan 26, 2024
150552e
Rename power sector data dir
macflo8 Jan 26, 2024
9a5143e
Add missing petro demand file and fix code typo
macflo8 Jan 26, 2024
c29d79c
Add missed exception for ssp_dev compatibility
macflo8 Jan 26, 2024
6cb805d
Integrate new industry demand calibration in materials build
macflo8 Jan 26, 2024
97740b1
Reformat files with black
macflo8 Jan 26, 2024
07650c9
Add gdp_ppp compatiblity for material demand projection calculation
macflo8 Feb 20, 2024
75d47ed
Add gdp_ppp compatiblity for material demand projection calculation -…
macflo8 Feb 26, 2024
32209f3
Fix warnings and errors in materials reporting
macflo8 Feb 27, 2024
34dedf1
Update create_bare function
macflo8 Feb 27, 2024
7038b3e
Add materials cost tool util function and ssp gdp/pop update util fun…
macflo8 Feb 27, 2024
62a2e23
Add missing emission factor sets and remove feedstock sets for ssp_de…
macflo8 Feb 27, 2024
85ba435
Implement cost update tool and ssp gdp/pop update in materials build
macflo8 Feb 27, 2024
74d8777
Add industry feedstock related sets to remove section in set.yaml
macflo8 Feb 27, 2024
a2fd997
Add todo in methanol module
macflo8 Feb 27, 2024
bfed63e
Update buildings module
macflo8 Feb 27, 2024
1438cfd
Fix wrong refinery capacity calculation
macflo8 Feb 27, 2024
3305ae9
Add excel input as trackable csv's
macflo8 Mar 4, 2024
c3e61b0
Remove freshwater_supply from fertilizer set requirements for ssp_dev…
macflo8 Mar 4, 2024
e811b0c
Add excel_to_csv feature for version control
macflo8 Mar 4, 2024
712c791
Rename water supply parameters in ammonia build for water module comp…
macflo8 Mar 4, 2024
6985462
Rename water supply parameters in steel build for water module compat…
macflo8 Mar 4, 2024
2d993f0
Remove deprecated function argument in demand module
macflo8 Mar 4, 2024
36ad5ec
Check gdp ppp availability in materials build
macflo8 Mar 4, 2024
6961e64
Add co2 reporting fixes from methanol branch
macflo8 Mar 4, 2024
ad00f92
Update data_buildings.py
macflo8 Mar 4, 2024
a374d0a
Transfer fixes from methanol branch
macflo8 Mar 5, 2024
65caae5
Deactivate manual engage updates for ssp_dev builds
macflo8 Mar 5, 2024
a642a5e
Fix wrong meth_coal_ccs new capacity constraint for r12_weu
macflo8 Mar 5, 2024
01db3d7
Move buildings-materials input file from "deprecated" folder
macflo8 Mar 7, 2024
0ad5e96
Modify emission accounting in materials build for ssp_dev compatibility
macflo8 Mar 11, 2024
5f3929e
Clean up buildings material module and add new input files
macflo8 Mar 20, 2024
9ee9842
Use alias for long name of module
macflo8 Mar 20, 2024
7cae07f
Add yaml files for materials technologies and commodities
macflo8 Mar 21, 2024
97cf499
Add industry tec groups to yaml
macflo8 Mar 21, 2024
95939e8
Update industry structure yamls
macflo8 Mar 22, 2024
22f4427
Add if clause for exogenous gdp update for ssp_dev versions
macflo8 Mar 22, 2024
f6c2b46
Add ssp option to materials demand projection module
macflo8 Mar 28, 2024
61fdca8
Use "ssp" mix-models common cli parameter for materials ssp builds
macflo8 Apr 3, 2024
4f73f35
Make petrochemical elasticity ssp dependent
macflo8 Apr 3, 2024
4fdd449
Revert hvc parametrization
macflo8 Apr 9, 2024
7552406
Fix typo in print statement
macflo8 Apr 9, 2024
fd16b91
Generalize demand calculation for all petrochemicals
macflo8 Apr 10, 2024
c61e842
Fix some differences between old and new methanol module and apply black
macflo8 Apr 10, 2024
473f090
Apply black to ammonia module
macflo8 Apr 10, 2024
f0e069d
Add base year demand input files for petrochemicals
macflo8 Apr 10, 2024
33562a2
A
macflo8 Apr 22, 2024
4152932
Add ssp dependent demand elasticities to methanol module
macflo8 Apr 22, 2024
040fc54
Update te-tool dependency
macflo8 Apr 22, 2024
61a99cf
Add gdp_ppp compatiblity to material demand projections
macflo8 Apr 22, 2024
9d9fa6c
Merge branch 'main' into migrate-materials_2024-W17
macflo8 May 23, 2024
efd1bec
Addition of data files and sets
GamzeUnlu95 Sep 15, 2020
9e460ad
Resolve conflict 2
macflo8 Apr 22, 2024
a859eef
Resolve rebase conflict
macflo8 Apr 22, 2024
636916b
Test run with china model
Jihoon Oct 12, 2020
572c64c
Updated data with cement
Jihoon Oct 19, 2020
508b09f
Data updated
GamzeUnlu95 Oct 22, 2020
2b5d219
Data update
GamzeUnlu95 Oct 23, 2020
948f5cb
Add sets for petrochemical sector
GamzeUnlu95 Oct 29, 2020
806c01b
Changes to integrate petro_chemicals
GamzeUnlu95 Nov 11, 2020
2eb478e
Updated buildings data
Jihoon Jan 25, 2021
46577e5
Add initial scripts and data for buildings work
Jihoon Jan 21, 2021
8a312c5
Resolve rebasing conflict with buildings file
macflo8 May 23, 2024
402d8e4
Resolve rebase conflict 3
macflo8 Apr 22, 2024
874fb4f
Small correction of description
volker-krey Mar 22, 2021
440d227
Update data
GamzeUnlu95 May 21, 2021
c570322
Fix data files
GamzeUnlu95 May 27, 2021
09bd802
Update region names in the data files for r12
GamzeUnlu95 Jun 8, 2021
87998bc
Update the region names to r12
GamzeUnlu95 Jun 9, 2021
f057b73
Remove unnecessary vintage years
GamzeUnlu95 Mar 1, 2022
f641b5c
Update n-fertilizer_techno-economic_new.xlsx
GamzeUnlu95 Mar 3, 2022
5c71658
Fix ccs units
GamzeUnlu95 Mar 30, 2022
47389ad
Update data to match base year statistics
GamzeUnlu95 Apr 25, 2022
a6577c6
Resolve conflict with input filea
macflo8 May 10, 2024
7ddb914
Remove deprecated input files and modules
macflo8 Apr 23, 2024
fcf7a6b
Modify imports and adjust data handling
macflo8 Apr 23, 2024
68910ca
Register material-ix as subcommand in CLI
macflo8 Apr 23, 2024
94f4e43
Fix typo in parameter string
macflo8 Apr 23, 2024
49ba610
Remove duplicated function definition
macflo8 Apr 24, 2024
cc9be29
Remove unused technology from set.yaml
macflo8 Apr 24, 2024
a5001c9
Remove deprecated files from rebase
macflo8 May 10, 2024
9cb260c
Delete duplicated codes in set.yaml
macflo8 May 10, 2024
ec87103
Apply ruff reformatting
macflo8 May 10, 2024
86a29ca
Add docstrings and type hints for materials util functions
macflo8 May 10, 2024
47db910
Change data input directory to message-ix-models
macflo8 May 10, 2024
3cd63f5
Resolve code quality warnings
macflo8 May 13, 2024
4580fb6
Apply black to materials modules
macflo8 May 13, 2024
a480bc2
Resolve remaining code quality issues
macflo8 May 13, 2024
b4886bd
Resolve code quality issues in materials reporting
macflo8 May 13, 2024
b1352f6
Resolve code quality issues in material demand module
macflo8 May 13, 2024
0654db4
Remove ntfy in materials commands
macflo8 May 13, 2024
02b905e
Comment unused variable in reporting
macflo8 May 13, 2024
ddfa1f3
Delete unused materials submodule
macflo8 May 13, 2024
6c48963
Refactor materials data module functions
macflo8 May 15, 2024
6a2ab7b
Add missing import for materials build
macflo8 May 16, 2024
7d0845a
Fix wrong data paths
macflo8 May 16, 2024
3b2e3cd
Apply formatting to data_util
macflo8 May 16, 2024
277c2f5
Add missing parameter in docstring in bare.py
macflo8 May 16, 2024
d12642b
Add comment to FIXME mnemonic
macflo8 May 16, 2024
e88d836
Migrate functions required by materials reporting from m_data
glatterf42 May 17, 2024
d39c074
Mark forgotten personal reference as FIXME
glatterf42 May 17, 2024
5f8e890
Format and tidy up reporting notebook
glatterf42 May 17, 2024
0b49e53
Adapt final imports from message_data
glatterf42 May 17, 2024
4150176
Migrate more required functions from m_data
glatterf42 May 17, 2024
ef842df
Reduce complexity of methanol module
macflo8 May 21, 2024
19d04fb
Apply ruff format to data_util
macflo8 May 21, 2024
cb3031f
Apply ruff formatting with ruff 0.4.4
macflo8 May 21, 2024
2e26923
Move doc file and update
macflo8 May 21, 2024
39d494f
Reformat materials demand module after rebase
macflo8 May 23, 2024
63ec181
Delete unused data files from data/material
macflo8 May 23, 2024
cc2e59f
Add #188, #189 to doc/whatsnew
macflo8 May 23, 2024
f214ed0
Merge pull request #189 from iiasa/migrate-materials_2024-W17-tidy
macflo8 May 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
191 changes: 191 additions & 0 deletions doc/material/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
MESSAGEix-Materials
********************

Description
===========

This module adds material stock and flow accounting in MESSAGEix-GLOBIOM. The implementation currently includes four key energy/emission-intensive
material industries: Iron&Steel, Aluminum, Cement, and Chemicals.

.. contents::
:local:

Code reference
==============

.. automodule:: message_ix_models.model.material
:members:

.. automodule:: message_ix_models.data.material
:members:

Data preparation
----------------

These scripts are used to prepare and read the data into the model. They can be turned on and off individually under `DATA_FUNCTIONS` in `__init__.py`.
For example, the buildings script (`data_buildings.py`) is only used when the buildings model outputs are given explicitly without linking the
CHILLED/STURM model through a soft link.

.. automodule:: message_ix_models.model.material.data_aluminum
:members:

.. automodule:: message_ix_models.model.material.data_steel
:members:

.. automodule:: message_ix_models.model.material.data_cement
:members:

.. automodule:: message_ix_models.model.material.data_petro
:members:

.. automodule:: message_ix_models.model.material.data_power_sector
:members:

.. automodule:: message_ix_models.model.material.data_buildings
:members:

.. automodule:: message_ix_models.model.material.data_generic
:members:

.. automodule:: message_ix_models.model.material.data_ammonia_new
:members:

.. automodule:: message_ix_models.model.material.data_methanol_new
:members:

Build and Solve the model from CLI
==================================

Note: To include material stocks from power sector message_ix should be the following version from source:
https://github.com/iiasa/message_ix/tree/material_stock

Use ``mix-models materials-ix build`` to add the material implementation on top of existing standard global (R12) scenarios, also giving the base scenario and indicating the relevant data location, e.g.::

$ mix-models \
--url="ixmp://ixmp_dev/MESSAGEix-GLOBIOM 1.1-R12/baseline_DEFAULT#21" \
--local-data "./data" material-ix build --tag test

The output scenario name will be baseline_DEFAULT_test. An additional tag `--tag` can be used to add an additional suffix to the new scenario name.
The mode option `--mode` has two different inputs 'by_url' (by default) or 'by_copy'. The first one uses the provided url to add the materials implementation on top of the scenario from the url.
This is the default option. The latter is used to create a 2 degree mitigation scenario with materials by copying carbon prices to the scenario that is specified by `--scenario_name`.

$ mix-models material-ix build --tag test --mode by_copy --scenario_name baseline_DEFAULT_test.

This command line only builds the scenario but does not solve it. To solve the scenario, use ``mix-models materials-ix solve``, giving the scenario name, e.g.::

$ mix-models material-ix solve --scenario_name baseline_DEFAULT_test --add_calibration False --add_macro False

The solve command has the `--add_calibration` option to add MACRO calibration to a baseline scenario. `--add_macro` option solves the scenario with MACRO.
Both options are False by defualt. To first calibrate the scenario and then solve that scenario with MACRO both options should be set to True.

Reporting
=========

The reporting generates specific variables related to materials, mainly Production and Final Energy.
The resulting reporting file is generated under message_ix_models\\data\\material\\reporting_output
with the name “New_Reporting_MESSAGEix-Materials_scenario_name.xlsx”. More detailed
variables related to the whole energy system and emissions are not inlcuded in
this reporting.

Reporting is executed by the following command:

$ mix-models --url="ixmp://ixmp_dev/MESSAGEix-Materials/scenario_name" --local-data "./data" material-ix report

To remove any existing timeseries in the scenario the following command can be used:
$ mix-models --url="ixmp://ixmp_dev/MESSAGEix-Materials/scenario_name" material-ix report --remove_ts True

Data, metadata, and configuration
=================================

Binary/raw data files
---------------------

The code relies on the following input files, stored in :file:`data/material/`:

:file:`CEMENT.BvR2010.xlsx`
Historical cement demand data

:file:`STEEL_database_2012.xlsx`
Historical steel demand data

:file:`Global_steel_cement_MESSAGE.xlsx`
Techno-economic parametrization data for steel and cement sector combined (R12)

:file:`demand_aluminum.xlsx`
Historical aluminum demand data

:file:`demand_aluminum.xlsx`
Historical aluminum demand data

:file:`aluminum_techno_economic.xlsx`
Techno-economic parametrization data for aluminum sector

:file:`generic_furnace_boiler_techno_economic.xlsx`
Techno-economic parametrization data for generic furnace technologies

:file:`iamc_db ENGAGE baseline GDP PPP.xlsx`
SSP GDP projection used for material demand projections

:file:`MESSAGEix-Materials_final_energy_industry.xlsx`
Final energy values to calibrate base year values for industries

:file:`residual_industry_2019.xlsx`
Final energy values to calculate the residual industry demand.

:file:`nh3_fertilizer_demand.xlsx`
Nitrogen fertilizer demand

:file:`fert_techno_economic.xlsx`
Techno-economic parameters for NH3 production technologies

:file:`cost_conv_nh3.xlsx`
Cost convergance parameters for NH3 produciton technologies

:file:`methanol demand.xlsx`
Methanol demand

:file:`methanol_sensitivity_pars.xlsx`
Methanol sensitivity parameters

:file:`methanol_techno_economic.xlsx`
Techno-economic parameters for methanol production technologies

:file:`petrochemicals_techno_economic.xls`
Techno-economic parameters for refinery and high value chemicals production technologies

:file:`steam_cracking_hist_act.csv`
Steam cracker historical activities

:file:`steam_cracking_hist_new_cap.csv`
Steam cracker historical capacities

:file:`NTNU_LCA_coefficients.xlsx`
Material intensity (and other) coefficients for power plants based on lifecycle assessment (LCA) data from the THEMIS database, compiled in the `ADVANCE project <http://www.fp7-advance.eu/?q=content/environmental-impacts-module>`_.

:file:`MESSAGE_global_model_technologies.xlsx`
Technology list of global MESSAGEix-GLOBIOM model with mapping to LCA technology dataset.

:file:`LCA_region_mapping.xlsx`
Region mapping of global 11-regional MESSAGEix-GLOBIOM model to regions of THEMIS LCA dataset.

:file:`LCA_commodity_mapping.xlsx`
Commodity mapping (for materials) of global 11-regional MESSAGEix-GLOBIOM model to commodities of THEMIS LCA dataset.

:file:`SSP_UE_dyn_input.xlsx`
Calibration of end-use energy demands

:file:`material/set.yaml`
----------------------------

.. literalinclude:: ../../../data/material/set.yaml
:language: yaml

R code and dependencies
=======================

:file:`init_modularized.R`
This code performs regression analysis to generate the steel, cement and aluminum material demands based on historical GDP per capita data.
The regression function is later used in python data code of the relevant material to predict the future demand based on GDP and population
projections. This code is linked to Python workflow via the Python package `rpy2`. Depending on the local R installation(s), the environment
variables `R_HOME` and `R_USER` may need to be set for the installation to work (see `stackoverflow <https://stackoverflow.com/questions/12698877/how-to-setup-environment-variable-r-user-to-use-rpy2-in-python>`_).
Additional dependencies include the R packages `dplyr`, `tidyr`, `readxl` and `imputeTS` that need to be installed in the R environment.
1 change: 1 addition & 0 deletions doc/whatsnew.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ What's new
Next release
============

- Add :doc:`/material/index` (:pull:`188`, :pull:`189`).
Changes to :doc:`/api/tools-costs`
----------------------------------
- Fix jumps in cost projections for technologies with first technology year that's after than the first model year (:pull:`186`).
Expand Down
1 change: 1 addition & 0 deletions message_ix_models/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ def _log_threads(k: int, n: int):
"message_ix_models.model.water.cli",
"message_ix_models.project.ssp",
"message_ix_models.report.cli",
"message_ix_models.model.material",
"message_ix_models.testing.cli",
"message_ix_models.util.pooch",
]
Expand Down
2 changes: 2 additions & 0 deletions message_ix_models/data/material/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.csv filter=lfs diff=lfs merge=lfs -text
*.xlsx filter=lfs diff=lfs merge=lfs -text
Git LFS file not shown
3 changes: 3 additions & 0 deletions message_ix_models/data/material/aluminum/demand_aluminum.xlsx
Git LFS file not shown
36 changes: 36 additions & 0 deletions message_ix_models/data/material/aluminum/demand_aluminum.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
- R12_AFR:
year: 2020
value: 3.00000
- R12_RCPA:
year: 2020
value: 2.00000
- R12_EEU:
year: 2020
value: 6.00000
- R12_FSU:
year: 2020
value: 5.00000
- R12_LAM:
year: 2020
value: 2.50000
- R12_MEA:
year: 2020
value: 2.00000
- R12_NAM:
year: 2020
value: 13.60000
- R12_PAO:
year: 2020
value: 3.00000
- R12_PAS:
year: 2020
value: 4.80000
- R12_SAS:
year: 2020
value: 4.80000
- R12_WEU:
year: 2020
value: 6.00000
- R12_CHN:
year: 2020
value: 26.00000
3 changes: 3 additions & 0 deletions message_ix_models/data/material/ammonia/cost_conv_nh3.xlsx
Git LFS file not shown
36 changes: 36 additions & 0 deletions message_ix_models/data/material/ammonia/demand_NH3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
- R12_AFR:
year: 2020
value: 2.5000
- R12_RCPA:
year: 2020
value: 2.5
- R12_EEU:
year: 2020
value: 4
- R12_FSU:
year: 2020
value: 7
- R12_LAM:
year: 2020
value: 2.5
- R12_MEA:
year: 2020
value: 2.5
- R12_NAM:
year: 2020
value: 7
- R12_PAO:
year: 2020
value: 2.5
- R12_PAS:
year: 2020
value: 2.5
- R12_SAS:
year: 2020
value: 7
- R12_WEU:
year: 2020
value: 5.6
- R12_CHN:
year: 2020
value: 18
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Loading