Skip to content

Commit

Permalink
fix(empty transient data)
Browse files Browse the repository at this point in the history
  • Loading branch information
scottrp committed Apr 5, 2024
1 parent d2b6611 commit 53147d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions autotest/regression/test_mf6.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ def test_ts(function_tmpdir, example_data_path):
head_filerecord=[(f"{name}.hds",)],
saverecord={
0: [("HEAD", "ALL"), ("BUDGET", "ALL")],
1: [],
},
printrecord=[("HEAD", "ALL")],
)
Expand Down
3 changes: 2 additions & 1 deletion flopy/mf6/mfpackage.py
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,8 @@ def load(self, block_header, fd, strict=True):
empty_arr = []
for ds in self.datasets.values():
if isinstance(ds, mfdata.MFTransient):
ds.set_data(empty_arr)
transient_key = block_header.get_transient_key()
ds.set_data(empty_arr, transient_key)
self.loaded = True
self.is_valid()

Expand Down

0 comments on commit 53147d0

Please sign in to comment.