Skip to content

Commit ba5d535

Browse files
mjrenowpbonelli
mjreno
authored andcommitted
xattree update
1 parent 46076aa commit ba5d535

File tree

2 files changed

+37
-15
lines changed

2 files changed

+37
-15
lines changed

flopy4/mf6/interface/flopy3.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,11 @@ 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 (
199+
self._data.attrs[a] is not None
200+
and a in self._spec
201+
and self._spec[a].type is not None
202+
):
199203
d_fp3 = Flopy3Data(
200204
data=self._data.attrs[a],
201205
spec=self._spec[a],
@@ -208,7 +212,11 @@ def __init__(
208212
self._dlist.append(d_fp3)
209213

210214
for v in self._data.data_vars:
211-
if self._data.data_vars[v] is not None:
215+
if (
216+
self._data.data_vars[v] is not None
217+
and v in self._spec.flat
218+
and self._spec.flat[v].type is not None
219+
):
212220
d_fp3 = Flopy3Data(
213221
data=self._data.data_vars[v],
214222
spec=self._spec[v],

pixi.lock

Lines changed: 27 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)