Added variable mappings for old projects.
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 Steel in common-definitions and Steel in 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}|Volume
-
Emissions|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|Steel
Note that:
- The issue with the tag mismatch needs to be resolved.
- There might be a small mismatch between the sector definitions of the projects (the Steel sector is part of but not equal to the Iron and Steel sector).
-
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:
- The issue with the tag mismatch needs to be resolved for NGFS Phase 5.
- It isn't entirely clear what emissions
Emissions|Kyoto Gases|Steelare referring to. Is thisEmissions|Kyoto Gases|Energy|Demand|Industry|Iron and SteelorEmissions|Kyoto Gases|Industrial Processes|Iron and Steel? - It's not clear if the additions for NAVIGATE and SHAPE are needed, given that the copying seems to work for SHAPE.
-
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|Cement
-
Final 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|Steel
Note that:
- The issue with the tag mismatch needs to be resolved.
-
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|Fossil
Note that:
- The issue with the tag mismatch needs to be resolved.
-
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|LDV
-
Energy 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:
+ - Energy Service|Transportation|Passenger|Aviation:
+ description: Energy service demand for passenger transport on through aviation
+ unit: billion pkm/yr
+ tier: 2
+ navigate: Energy Service|Bunkers|Passenger|International Aviation
+ ngfs5: Energy Service|Transportation|Passenger|Aviation
Note that:
- It is unclear if the convention should be
Energy Service|Transportation|...orEnergy Service|Bunkers|.... - It is unclear if/how the split between domestic and international aviation should be carried through.
- Same as 9. from above but for freight:
+ - Energy Service|Transportation|Freight|International Aviation:
+ description: Energy service demand for freight transport through international aviation
+ unit: billion tkm/yr
+ tier: 2
+ navigate: Energy Service|Bunkers|Freight|International Aviation
+ - Energy Service|Transportation|Freight|International Shipping:
+ description: Energy service demand for freight transport through international shipping
+ unit: billion tkm/yr
+ tier: 2
+ navigate: Energy Service|Bunkers|Freight|International Shipping
+ ngfs5: Energy Service|Transportation|Freight|International Shipping
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.
OK, understood.
Second, I'm not sure how to implement your comments like [...]
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:
- I suggested above to implement additional logic. I don't know how that could be made to work though.
- Yiyi suggested via email to have multiple entries for the same variable (once with a tag, and once without). However, I don't know (and Yiyi neither seemed to know) if this will work or create problems, e.g. in the form of duplications. It could also be that one entry will override the other. An example:
- 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|Steel
Ultimately, you will have to advise which way to go.
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, I can open multiple PRs once we have agreed on the general procedure.
Yiyi suggested via email to have multiple entries for the same variable (once with a tag, and once without)
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 legacy folder (see https://github.com/IAMconsortium/common-definitions/tree/main/legacy), which can then be imported and applied during the scenario-transfer or analysis.
@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 NAVIGATE legacy mapping, so it's not necessary to repeat too many legacy-mapping attributes - added this to the Readme of this repo.
Responses to some of the items above:
-
Production|Steelfrom SHAPE - there was duplicate reporting in SHAPE, so this variable can be removed. -
Production|Non-Metallic Minerals|Cement|Volumefrom SHAPE - mapping identical to NAVIGATE, so not necessary -
Emissions|CO2|Energy|Demand|Industry|Steel- moved from the ad-hoc transfer scripts to common-definitions via the PRs -
Emissions|CO2|Industrial Processes|Iron and Steeldoes not seem to be copied over from NAVIGATE - the data does exist in the Scenario Compass database