In message_data.model.transport, we have a submodule .key that does nothing more than define a list of genno.Key. This makes it easier to prepare reporting calculations.
By analogy, add message_ix.report.key with full-dimensionality keys for every set, parameter, and variable available in a message_ix.Scenario via message_ix.Reporter. So for instance instead of this:
from message_ix import Reporter, Scenario
scen, mp = Scenario.from_url("…")
rep = Reporter.from_scenario(scen)
####
from genno import Key
# Operate on full-dimensionality `input` summed on `time`, `time_origin`
k = Key("input", "nl t yv ya m no c l h ho".split())
rep.add("check", "my_operator", k / ("h", "ho"), ...)
In
message_data.model.transport
, we have a submodule.key
that does nothing more than define a list ofgenno.Key
. This makes it easier to prepare reporting calculations.By analogy, add
message_ix.report.key
with full-dimensionality keys for every set, parameter, and variable available in amessage_ix.Scenario
viamessage_ix.Reporter
. So for instance instead of this:…a user could do this:
This essentially saves having to look up, retype, or use
rep.full_key()
to get the full dimensionality.