Added variable mappings for old projects.#338
Added variable mappings for old projects.#338PhilippVerpoort wants to merge 1 commit intoIAMconsortium:mainfrom
Conversation
Added variable mappings in the industry and transport sectors for emissions, final energy, energy service, and production for projects navigate, ngfs5, and shape.
danielhuppmann
left a comment
There was a problem hiding this comment.
Thanks @PhilippVerpoort for starting the PR.
First, it is not really necessary to repeat the mapping to legacy projects if the variable names are identical: in practice, I first run the mapping for engage, then navigate, then shape, then ngfs5. Better to avoid too much duplication/repetition in these files.
Second, I'm not sure how to implement your comments like
#Only when
Sector== "Industry|Iron and Steel"
How would that be checked in practice?
Third, it may be helpful to separate this into several PRs by topic or by complexity (like variables that are obvious vs. requiring discussion) so to make the discussion more manageable and bring in sector-teams if needed.
OK, understood.
This was just a suggestion. It would require some additional logic. I don't know much about the inner workings of common-definitions and how tags are handled, so I was hoping that you could advise if/how to do this. There were two options presented to resolve this problem:
- Emissions|CO2|Energy|Demand|Industry|{Non-Energy Sector}:
description: Emissions of carbon dioxide (CO2) from energy demand in the {Non-Energy Sector}
unit: Mt CO2/yr
tier: 2
+ - Emissions|CO2|Energy|Demand|Industry|Iron and Steel:
+ navigate: Emissions|CO2|Energy|Demand|Industry|Steel
+ shape: Emissions|CO2|Energy|Demand|Industry|Steel
+ ngfs5: Emissions|CO2|Energy|Demand|Industry|SteelUltimately, you will have to advise which way to go.
OK, I can open multiple PRs once we have agreed on the general procedure. |
This does not work, because it would create duplicate variables, which are not allowed (because it would create all kind of other problems). There are two options: either implement the mapping via tags for all elements of the tags (this would create "too many" mapping to legacy variable, which didn't actually exist in the previous projects), or you can create one or multiple separate yaml-files with rename-mappings in the |
|
@danielhuppmann , regarding the two options you mentioned, I didn't understand the first one, but I think I understood the second one. Please could you take a look at #348 and let me know if (a) this is what you meant and if (b) it works correctly when transferring the scenarios? Thanks! |
|
Some of the variable-renaming had already been implemented directly in the scripts to transfer scenarios from legacy projects to the Scenario Compass database. PRs #368 & #369 moved those ad-hoc renaming-mappings to common-definitions. Also, for SHAPE, I used the Responses to some of the items above:
|
Some variables from old projects (NAVIGATE, SHAPE, NGFS Phase 5) are currently not mapped correctly onto the common-definitions variables.
This affects variables in the industry and transport sectors for emissions, final energy, energy service, and production.
For some variables, the current notation does not work, because the tag is different between source and the target (e.g.
Iron and Steelin common-definitions andSteelin another project).Here is a list of points to consider:
Production|Steelfrom SHAPE is not mapped toProduction|Iron and Steel|Steel. This should now be fixed by:- Production|Iron and Steel|{Iron Commodity}: description: Production of {Iron Commodity} unit: Mt/yr tier: 2 navigate: Production|Iron and Steel|{Iron Commodity}|Volume engage: Production|Iron and Steel|{Iron Commodity}|Volume ngfs5: Production|{Iron Commodity} + shape: Production|{Iron Commodity}Production|Non-Metallic Minerals|Cement|Volumefrom SHAPE is in fact mapped toProduction|Non-Metallic Minerals|Cement, even though it is not defined. Is this addition necessary?- Production|Non-Metallic Minerals|{Non-Metallic Minerals Commodity}: description: Production of {Non-Metallic Minerals Commodity} unit: Mt/yr tier: 2 navigate: Production|Non-Metallic Minerals|{Non-Metallic Minerals Commodity}|Volume engage: Production|Non-Metallic Minerals|{Non-Metallic Minerals Commodity}|Volume ngfs5: Production|{Non-Metallic Minerals Commodity} + # Is this needed? The variable seems to be already imported successfully. + shape: Production|Non-Metallic Minerals|{Non-Metallic Minerals Commodity}|VolumeEmissions|CO2|Energy|Demand|Industry|Steelfrom NAVIGATE, SHAPE, and NGFS Phase 5 seems to not be mapped toEmissions|CO2|Energy|Demand|Industry|Iron and Steelor anything else. This should now be fixed by:- Emissions|CO2|Energy|Demand|Industry|{Non-Energy Sector}: description: Emissions of carbon dioxide (CO2) from energy demand in the {Non-Energy Sector} unit: Mt CO2/yr tier: 2 # Only if `Non-Energy Sector` == "Iron and Steel" + navigate: Emissions|CO2|Energy|Demand|Industry|Steel + ngfs5: Emissions|CO2|Energy|Demand|Industry|Steel + shape: Emissions|CO2|Energy|Demand|Industry|SteelNote that:
Emissions|CO2|Industrial Processes|Iron and Steeldoes not seem to be copied over from NAVIGATE. It does for SHAPE, even though this is not defined. MoreoverEmissions|Kyoto Gases|Steelfrom NGFS Phase 5 does not seem to be mapped to anything. Possible way to deal with this:- Emissions|{Level-3 Species}|Industrial Processes|{Non-Energy Sector}: description: Emissions of {Level-3 Species} from industrial processes (IPCC categories 1A2, 1A5, 2A, 2B, 2C, 2E) in the {Non-Energy Sector} unit: "{Level-3 Species}" tier: 2 + navigate: Emissions|{Level-3 Species}|Industrial Processes|{Non-Energy Sector} + # Only if `Non-Energy Sector` == "Iron and Steel" + ngfs5: Emissions|{Level-3 Species}|Steel + shape: Emissions|{Level-3 Species}|Industrial Processes|{Non-Energy Sector}Note that:
Emissions|Kyoto Gases|Steelare referring to. Is thisEmissions|Kyoto Gases|Energy|Demand|Industry|Iron and SteelorEmissions|Kyoto Gases|Industrial Processes|Iron and Steel?Emissions|CO2|Industrial Processes|Non-Metallic Minerals|Cementfrom NAVIGATE does not seem to be mapped ontoEmissions|CO2|Industrial Processes|Cement. This should now be fixed by:- Emissions|{Level-3 Species}|Industrial Processes|{Industrial-Process Sector}: description: Emissions of {Level-3 Species} from industrial processes (IPCC categories 1A2, 1A5, 2A, 2B, 2C, 2E) in the {Industrial-Process Sector} unit: "{Level-3 Species}" tier: 2 + # Only when `Industrial-Process Sector` == "Cement" + navigate: Emissions|{Level-3 Species}|Industrial Processes|Non-Metallic Minerals|CementFinal Energy|Industry|Steelfrom NGFS Phase 5 does not get mapped ontoFinal Energy|Industry|Iron and Steel. This should now be fixed by:- Final Energy|{Sector}: description: Final energy consumption by the {Sector} unit: EJ/yr tier: 1 + # Only when `Sector` == "Industry|Iron and Steel" + ngfs_phase_5: Final Energy|Industry|SteelNote that:
Final Energy|Industry|Steel|Solids|Fossilfrom NGFS Phase 5 does not get mapped ontoFinal Energy|Industry|Iron and Steel|Solids|Coal. This should now be fixed by:- Final Energy|{Sector}: description: Final energy consumption by the {Sector} unit: EJ/yr tier: 1 + # Only when `Sector` == "Industry|Iron and Steel" and `Secondary Fuel Level 2` == "Solids|Coal" + ngfs_phase_5: Final Energy|Industry|Steel|Solids|FossilNote that:
Energy Service|Transportation|Passenger|Road|LDVfrom NAVIGATE, SHAPE, and NGFS Phase 5 does not get mapped ontoEnergy Service|Transportation|Passenger|Road|Light-Duty Vehicle. This should now be fixed by:- Energy Service|Transportation|Passenger|Road|Light-Duty Vehicle: description: Energy service demand for passenger transport on roads in light duty vehicles unit: billion pkm/yr tier: 2 - navigate: Energy Service|Transportation|Road|LDV + navigate: Energy Service|Transportation|Passenger|Road|LDV + ngfs5: Energy Service|Transportation|Passenger|Road|LDV + shape: Energy Service|Transportation|Passenger|Road|LDVEnergy Service|Transportation|Passenger|Aviationor similar does not seem to exist at all in common definitions. To map this variable from NGFS Phase 5 and alsoEnergy Service|Bunkers|Passenger|International Aviationfrom NAVIGATE, I have added this:Note that:
Energy Service|Transportation|...orEnergy Service|Bunkers|....