IAMconsortium / common-definitions

Repository for definitions and mappings in model comparison projects
Creative Commons Zero v1.0 Universal
10 stars 25 forks source link

description tag is not expanded in xlsx export #132

Closed orichters closed 1 month ago

orichters commented 1 month ago

description tag is not expanded in xlsx export

Example: Final Energy|Non-Energy Use|Chemicals|Gases EJ/yr Final energy consumption of {Secondary Fuel} by the {Non-Energy Sector with Source} for non-combustion processes

https://github.com/IAMconsortium/common-definitions/blob/258c943fdbc16f362865367dba68daba50bcac93/definitions/variable/energy/final-energy.yaml#L26-L30

danielhuppmann commented 1 month ago

@dc-almeida & @phackstock, can you please check whether this is an issue in nomenclature?

phackstock commented 1 month ago

I'll take a look, my hunch is that we currently don't support substitution of multiple different tags in the same variable.

orichters commented 1 month ago

For the variables it works even with multiple tags, but not for the description, even if there is only one single tag:

etc.

orichters commented 1 month ago

I think I got the problem. It is the use of a tag in the description that is not present in the variable name as well, see here: https://github.com/IAMconsortium/common-definitions/blob/258c943fdbc16f362865367dba68daba50bcac93/definitions/variable/energy/final-energy.yaml#L120-L125

phackstock commented 1 month ago

Thanks for checking @orichters, I think we have to indeed open a nomenclature issue for that one.

orichters commented 1 month ago

In the sense that these errors are identified in the tests?

phackstock commented 1 month ago

Ah never mind, the tag replacement logic of nomenclature is sound after all. What we could check for is that all tags used in a variable need to occur in the name of the variable.

phackstock commented 1 month ago

Closing this issue as the non-replacement of the tags is expected and intended. If we would replace tags within a definitions that are not part of the name, we'd get duplicates.