From 5988950a9f242059a4042d68e94f0243cb07c0eb Mon Sep 17 00:00:00 2001
From: Karl-Hermann Wieners <karl-hermann.wieners@mpimet.mpg.de>
Date: Wed, 18 May 2022 20:39:58 +0200
Subject: [PATCH] mkexp: fix handling of namelist section variables

---
 mkexp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mkexp b/mkexp
index 09cc1c3..c464621 100755
--- a/mkexp
+++ b/mkexp
@@ -550,7 +550,8 @@ for subjob, subconfig in jobs_config.items():
         del subconfig
 
         # Extend all namelists
-        for namelist, groups in job_config['namelists'].items():
+        for namelist in job_config['namelists'].sections:
+            groups = job_config['namelists'][namelist]
             extended_groups = set()
             for group in groups.sections:
                 extend(group, groups, extended_groups)
-- 
GitLab