Skip to content

Commit 563e1f5

Browse files
committed
fix: iterate only over groups that exist in the datatree
1 parent 9abaab9 commit 563e1f5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/eopf_geozarr/conversion/geozarr.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ def setup_datatree_metadata_geozarr_spec_compliant(
121121
grid_mapping_var_name = "spatial_ref"
122122

123123
for key in groups:
124+
if key not in dt:
125+
continue
124126
if not dt[key].data_vars:
125127
continue
126128

0 commit comments

Comments
 (0)