Skip to content

Handle quantities with 2+ n/y dims in IAMCConversion #454

@khaeru

Description

@khaeru

@junukitashepard found a limitation of this code:

# Add standard renames
info.setdefault("rename", {})
for dim, target in (
("n", "region"),
("nl", "region"),
("y", "year"),
("ya", "year"),
("yv", "year"),
):
info["rename"].setdefault(dim, target)

The particular application was conversion of out:nd-nl-t-ya-c to 2 different quantities:

  1. For "Gross Exports":
    • The nl (i.e. the exporting node/region) dimension should be mapped to the IAMC region dimension
    • The nd (the importing region) dimension should be collapsed into the labels for the IAMC variable dimension.
  2. For "Gross Imports", it's the reverse:
    • The nd dimension should be mapped to the IAMC region dimension.
    • The nl dimension should be collapsed into the labels for the IAMC variable dimension.

The way the code currently sets the default existence and contents of the "rename" setting does not allow to do (2).

We identified a workaround, but to resolve on main:

Metadata

Metadata

Assignees

No one assigned

    Labels

    reportgenno-based reporting and post-solve processing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions