You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: doc/api/data-sources.rst
+8-7
Original file line number
Diff line number
Diff line change
@@ -63,16 +63,16 @@ The data:
63
63
64
64
The approach to handling proprietary data is the same as in :mod:`.project.advance` and :mod:`.project.ssp`:
65
65
66
-
- Copies of the data are stored in the (private) :mod:`message_data` repository using Git LFS.
66
+
- Copies of the data are stored in the (private) `message-static-data` repository using Git LFS.
67
67
This respository is accessible only to users who have a license for the data.
68
68
- :mod:`message_ix_models` contains only a ‘fuzzed’ version of the data (same structure, random values) for testing purposes.
69
69
- Non-IIASA users must obtain their own license to access and use the data; obtain the data themselves; and place it on the system where they use :mod:`message_ix_models`.
70
70
71
71
The module :mod:`message_ix_models.tools.iea.web` attempts to detect and support both the providers/formats described below.
72
72
The code supports using data from any of the above locations and formats, in multiple ways:
73
73
74
-
- Use :func:`.tools.iea.web.load_data` to load data as :class:`pandas.DataFrame` and apply further pandas processing.
75
-
- Use :class:`.IEA_EWEB` via :func:`.tools.exo_data.prepare_computer` to use the data in :mod:`genno` structured calculations.
74
+
- Use :class:`.IEA_EWEB` via :func:`.exo_data.prepare_computer` to use the data in :mod:`genno` structured calculations.
75
+
- Use :func:`.iea.web.load_data` to load data as :class:`pandas.DataFrame` and apply further processing using pandas.
76
76
77
77
The **documentation** for the `2023 edition <https://iea.blob.core.windows.net/assets/0acb1453-1221-421b-9131-632ce71a4c1a/WORLDBAL_Documentation.pdf>`__ of the IEA source/format is publicly available.
78
78
@@ -82,8 +82,8 @@ Structure
82
82
The data have the following conceptual dimensions, each enumerated by a different list of codes:
83
83
84
84
- ``FLOW``, ``PRODUCT``: for both of these, the lists of codes appearing in the data are the same from 2021 and 2023 inclusive.
85
-
- ``COUNTRY``: The data provided by IEA directly contain codes that are all caps, abbreviated country names, for instance "DOMINICANR".
86
-
The data provided by the OECD contain ISO 3166-1 alpha-3 codes, for instance "DOM".
85
+
- ``COUNTRY``: The data provided by IEA directly contain codes that are all caps, abbreviated country names, for instance 'DOMINICANR'.
86
+
The data provided by the OECD contain ISO 3166-1 alpha-3 codes, for instance 'DOM'.
87
87
In both cases, there are additional labels denoting country groupings; these are defined in the documentation linked above.
88
88
89
89
Changes visible in these lists include:
@@ -98,8 +98,9 @@ The data have the following conceptual dimensions, each enumerated by a differen
- MEASURE: unit of measurement, either "TJ" or "ktoe".
101
+
See the :py:`transform=...` source keyword argument and :meth:`.IEA_EWEB.transform` for different methods of handling this dimension.
102
+
- ``TIME``: always a year.
103
+
- ``UNIT_MEASURE`` (not labeled): unit of measurement, either 'TJ' or 'ktoe'.
103
104
104
105
:mod:`message_ix_models` is packaged with SDMX structure data (stored in :file:`message_ix_models/data/sdmx/`) comprising code lists extracted from the raw data for the COUNTRY, FLOW, and PRODUCT dimensions.
105
106
These can be used with other package utilities, for instance:
Copy file name to clipboardexpand all lines: doc/project/ssp.rst
+17
Original file line number
Diff line number
Diff line change
@@ -54,3 +54,20 @@ Transport
54
54
:members:
55
55
56
56
Use :program:`mix-models ssp transport --help in.xlsx out.xlsx` to invoke :func:`.main`.
57
+
Data are read from PATH_IN, in :file:`.xlsx` or :file:`.csv` format.
58
+
If :file:`.xlsx`, the data are first temporarily converted to :file:`.csv`.
59
+
Data are written to PATH_OUT; if not given, this defaults to the same path and suffix as PATH_IN, with "_out" added to the stem.
60
+
61
+
For example:
62
+
63
+
.. code-block:: shell
64
+
65
+
mix-models ssp transport --method=B \
66
+
SSP_SSP2_v2.1_baseline.xlsx
67
+
68
+
…produces a file :file:`SSP_SSP2_v2.1_baseline_out.xlsx` in the same directory.
69
+
70
+
As of 2025-01-25:
71
+
72
+
- Method 'B' (that is, :func:`.prepare_method_B`; see its documentation) is the preferred method.
73
+
- The code is tested on :file:`.xlsx` files in the (internal) directories under `SharePoint > ECE > Documents > SharedSocioeconomicPathways2023 > Scenario_Vetting <https://iiasahub.sharepoint.com/sites/eceprog/Shared%20Documents/Forms/AllItems.aspx?csf=1&web=1&e=APKv0Z&CID=23fa0a51%2Dc303%2D4381%2D8c6d%2D143305cbc5a1&FolderCTID=0x012000AA9481BF7BE9264E85B14105F7F082FF&id=%2Fsites%2Feceprog%2FShared%20Documents%2FSharedSocioEconomicPathways2023%2FScenario%5FVetting&viewid=956acd8a%2De1e7%2D4ae9%2Dab1b%2D0506911bae11>`_, for example :file:`v2.1_Internal_version_Dec13_2024/Reporting_output/SSP_SSP2_v2.1_baseline.xlsx`.
Copy file name to clipboardexpand all lines: doc/transport/index.rst
+1-1
Original file line number
Diff line number
Diff line change
@@ -142,7 +142,7 @@ Run the entire workflow
142
142
The options result in the following behaviour:
143
143
144
144
- :program:`--platform=ixmp-dev`: store MESSAGEix-Transport scenarios on the :mod:`ixmp` platform named "ixmp-dev".
145
-
- :program:`--base=auto`: identify the base scenario URLs using :func:`.base_scenario_url` / the file :file:`base-scenario-url.json`, according to other config settings.
145
+
- :program:`--base=auto`: identify the base scenario URLs using :func:`.base_scenario_url` / the file :ref:`CL_TRANSPORT_SCENARIO`, according to other config settings.
146
146
- :program:`--model-extra="ci nightly"`: append the string " ci nightly" to the model name of any created Scenario.
147
147
This avoids accidentally producing new versions of ‘production’ (model name, scenario name) combinations.
148
148
- :program:`--from=""`: start from the very first step in the workflow—load the identified base scenario—and perform all subsequent workflow steps, up to and including…
Copy file name to clipboardexpand all lines: doc/transport/input.rst
+49-4
Original file line number
Diff line number
Diff line change
@@ -20,8 +20,8 @@ This value is retrieved from the :attr:`.model.Config.regions` setting on a :cla
20
20
21
21
.. _transport-config:
22
22
23
-
Configuration
24
-
=============
23
+
Configuration and model structure
24
+
=================================
25
25
26
26
General (:file:`config.yaml`, required)
27
27
---------------------------------------
@@ -50,13 +50,45 @@ This file gives code lists for other MESSAGE concepts/sets/dimensions.
50
50
51
51
→ View :source:`message_ix_models/data/transport/set.yaml` on GitHub
52
52
53
+
.. _CL_TRANSPORT_SCENARIO:
54
+
55
+
Code list ``CL_TRANSPORT_SCENARIO``
56
+
-----------------------------------
57
+
58
+
This code list, stored in the file :file:`message_ix_models/data/sdmx/IIASA_ECE_CL_TRANSPORT_SCENARIO(1.0.0).xml`, contains an SDMX code list for distinct MESSAGEix-Transport scenarios.
59
+
The codes have IDs like ``LED-SSP1`` that give a short identifier used in :mod:`.transport.workflow` and elsewhere, and names that give a complete, human-readable description.
60
+
Every code has all of following annotations:
61
+
62
+
``SSP-URN``
63
+
Complete URN of a code in ``ICONICS:SSP(2024)`` or another code list for the SSP used for sociodemographic input data and to control other settings in :mod:`.transport.build`.
64
+
65
+
Example annotation text: ``'urn:sdmx:org.sdmx.infomodel.codelist.Code=ICONICS:SSP(2024).1'``
66
+
67
+
``is-LED-Scenario``
68
+
Example annotation text: ``True``
69
+
70
+
:func:`repr` of Python :any:`True` or :any:`False`, the former indicating that "Low Energy Demand (LED)" settings should be used.
71
+
See also :attr:`Config.project <.transport.config.Config.project>`.
72
+
73
+
``EDITS-activity-id``
74
+
Example annotation text: ``'HA'``
75
+
76
+
For :doc:`/project/edits`, the identity of an ITF PASTA scenario providing exogenous transport activity.
77
+
78
+
``base-scenario-URL``
79
+
Example annotation text: ``'ixmp://ixmp-dev/SSP_SSP1_v1.1/baseline_DEFAULT_step_13'``
80
+
81
+
URL of a base scenario used to build the corresponding MESSAGEix-Transport scenario.
82
+
83
+
53
84
.. _transport-data-files:
54
85
55
86
Input data files
56
87
================
57
88
58
89
:data:`.transport.files.FILES` gives a list of all data files.
59
-
Through :func:`.transport.build.main` (ultimately, :func:`.transport.build.add_exogenous_data`), each of these files is connected to a :class:`genno.Computer` used for model-building, and its contents appear at the key given in the list below.
90
+
Through :func:`.transport.build.main` (ultimately, :func:`.transport.build.add_exogenous_data`), each of these files is connected to a :class:`genno.Computer` used for model-building.
91
+
Its content are available at the corresponding key, which is used as an input for further model-building computations.
60
92
61
93
.. admonition:: Example
62
94
@@ -67,9 +99,22 @@ Through :func:`.transport.build.main` (ultimately, :func:`.transport.build.add_e
67
99
Not all files are currently or always used in model-building computations.
68
100
Some submodules of :mod:`~.model.transport` use additional data files via other mechanisms.
69
101
Most of the files have a header comment including a precise description of the quantity, source of the data, and units of measurement.
70
-
In some cases extended information is below (where a header comment would be too long).
102
+
In some cases—where a header comment would be too long—extended information is below.
71
103
The :program:`git` history of files, or the GitHub "blame" view can also be used to inspect the edit history of each file, line by line.
0 commit comments