Skip to content

Commit a4f6c25

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

File tree

2 files changed

+33
-15
lines changed

2 files changed

+33
-15
lines changed

flopy4/mf6/interface/flopy3.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff 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],

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)