From ab23a8fd36a147c226c2401054c6af2739fe023d Mon Sep 17 00:00:00 2001 From: Daniel Huppmann Date: Mon, 19 Feb 2024 13:00:34 +0100 Subject: [PATCH] Add workpackage-meta-indicator to workflow (#3) --- 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