File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ def __init__(
195195 for a in self ._data .attrs :
196196 if a == "host" :
197197 continue
198- if self ._data .attrs [a ] is not None and self ._spec [a ].type is not None :
198+ if self ._data .attrs [a ] is not None and a in self . _spec and self ._spec [a ].type is not None :
199199 d_fp3 = Flopy3Data (
200200 data = self ._data .attrs [a ],
201201 spec = self ._spec [a ],
@@ -208,7 +208,11 @@ def __init__(
208208 self ._dlist .append (d_fp3 )
209209
210210 for v in self ._data .data_vars :
211- if self ._data .data_vars [v ] is not None :
211+ if (
212+ self ._data .data_vars [v ] is not None
213+ and v in self ._spec .flat
214+ and self ._spec .flat [v ].type is not None
215+ ):
212216 d_fp3 = Flopy3Data (
213217 data = self ._data .data_vars [v ],
214218 spec = self ._spec [v ],
You can’t perform that action at this time.
0 commit comments