Skip to content

Commit fe172a5

Browse files
committed
Take 1-based indexing into account for MODFLOW periods
1 parent 72b4842 commit fe172a5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

imod/mf6/sto.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,10 @@ def open(
6565
for field, data in griddata.items():
6666
content[field] = xr.DataArray(data, coords, dims)
6767
periods = content.pop("periods")
68+
time_index = np.fromiter(periods.keys(), dtype=int) - 1
6869
content["transient"] = xr.DataArray(
6970
list(periods.values()),
70-
coords={"time": globaltimes[list(periods.keys())]},
71+
coords={"time": globaltimes[time_index]},
7172
dims=("time",),
7273
)
7374

0 commit comments

Comments
 (0)