diff --git a/message_ix_models/report/__init__.py b/message_ix_models/report/__init__.py index 1af57e7d9d..0e5ddb264d 100644 --- a/message_ix_models/report/__init__.py +++ b/message_ix_models/report/__init__.py @@ -369,6 +369,9 @@ def prepare_reporter( ) rep.configure(model=deepcopy(context.model)) + # Add a placeholder task to concatenate IAMC-structured data + rep.add("all::iamc", "concat") + # Apply callbacks for other modules which define additional reporting computations for callback in chain(CALLBACKS, context.report.iter_callbacks()): callback(rep, context) diff --git a/message_ix_models/report/compat.py b/message_ix_models/report/compat.py index 9e0d198b1b..8690a5e030 100644 --- a/message_ix_models/report/compat.py +++ b/message_ix_models/report/compat.py @@ -416,6 +416,10 @@ def full(name: str) -> Key: info = dict(variable="transport emissions", base=k1.drop("h", "m", "yv"), var=[var]) iamc(rep, info) + # Append to the "all::iamc" task + # TODO Use a helper function for this + rep.graph["all::iamc"] += ("transport emissions::iamc",) + # TODO use store_ts() to store on scenario log.info(f"Added {len(rep.graph) - N} keys")