Skip to content

Commit

Permalink
Make sure surface water test does not fail for empty stages
Browse files Browse the repository at this point in the history
  • Loading branch information
rubencalje committed Jul 5, 2024
1 parent a9cce55 commit 39c83a5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions nlmod/gwf/surface_water.py
Original file line number Diff line number Diff line change
Expand Up @@ -1044,10 +1044,11 @@ def gdf_to_seasonal_pkg(
# the value to scale is also represented with a time series
# So we switch the conductance (column 2) and the multiplier (column 3/4)
spd = np.array(spd, dtype=object)
if pkg == "RIV":
spd[:, [2, 4]] = spd[:, [4, 2]]
else:
spd[:, [2, 3]] = spd[:, [3, 2]]
if len(spd) > 0:
if pkg == "RIV":
spd[:, [2, 4]] = spd[:, [4, 2]]
else:
spd[:, [2, 3]] = spd[:, [3, 2]]
spd = spd.tolist()

if boundname_column is None:
Expand Down

0 comments on commit 39c83a5

Please sign in to comment.