From c61ec88be6fdab57052d42bffe0b95fc5412d117 Mon Sep 17 00:00:00 2001 From: Daniel Huppmann Date: Mon, 19 Feb 2024 12:48:59 +0100 Subject: [PATCH] Add workpackage-meta-indicator to workflow --- workflow.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/workflow.py b/workflow.py index 3106b90..2e65188 100644 --- a/workflow.py +++ b/workflow.py @@ -16,4 +16,13 @@ def main(df: pyam.IamDataFrame) -> pyam.IamDataFrame: processor = RegionProcessor.from_directory(path=here / "mappings", dsd=dsd) df = process(df, dsd, processor=processor) + # assign meta indicator for scenario "work package" category + for model, scenario in df.index: + if "DIAG" in scenario: + df.meta.loc[(model, scenario), "Work package"] = "Diagnostic" + elif scenario.startswith("WP"): + df.meta.loc[(model, scenario), "Work package"] = ( + "Work Package " + scenario[2:4] + ) + return df