diff --git a/xarray/conventions.py b/xarray/conventions.py index 94c7cff8f98..e4e71a481e8 100644 --- a/xarray/conventions.py +++ b/xarray/conventions.py @@ -487,6 +487,8 @@ def stackable(dim: Hashable) -> bool: and len(var_names) > 1 ): # map the keys to list of strings + # "A: b c d E: f g" returns + # {"A": ["b", "c", "d"], "E": ["f", "g"]} roles_and_names = defaultdict(list) key = None for vname in var_names: