Skip to content

Commit 332e503

Browse files
committed
Add general report key "all::iamc"
1 parent 84bf30f commit 332e503

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

message_ix_models/report/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,9 @@ def prepare_reporter(
325325
)
326326
rep.configure(model=deepcopy(context.model))
327327

328+
# Add a placeholder task to concatenate IAMC-structured data
329+
rep.add("all::iamc", "concat")
330+
328331
# Apply callbacks for other modules which define additional reporting computations
329332
for callback in context.report.callback:
330333
callback(rep, context)

message_ix_models/report/compat.py

+4
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,10 @@ def full(name: str) -> Key:
426426
info = dict(variable="transport emissions", base=k1.drop("h", "m", "yv"), var=[var])
427427
iamc(rep, info)
428428

429+
# Append to the "all::iamc" task
430+
# TODO Use a helper function for this
431+
rep.graph["all::iamc"] += ("transport emissions::iamc",)
432+
429433
# TODO use store_ts() to store on scenario
430434

431435
log.info(f"Added {len(rep.graph) - N} keys")

0 commit comments

Comments
 (0)