diff --git a/run_summary.py b/run_summary.py index 77a1280..79c5c83 100755 --- a/run_summary.py +++ b/run_summary.py @@ -42,6 +42,8 @@ import warnings warnings.simplefilter('ignore', np.RankWarning) +yaml.add_representer(OrderedDict, lambda dumper, data: dumper.represent_mapping('tag:yaml.org,2002:map', data.items())) + def num(s): """ @@ -458,7 +460,7 @@ def parse_nml(paths): for fname in fnames: if os.path.isfile(fname): # no accessom2.nml for non-YATM run parsed_items[fname.split(path)[1].strip('/')] \ - = f90nml.read(fname) + = f90nml.read(fname).todict() return parsed_items