diff --git a/autotest/t049_test.py b/autotest/t049_test.py index 8cc01948db..12ee2e2454 100644 --- a/autotest/t049_test.py +++ b/autotest/t049_test.py @@ -78,9 +78,9 @@ def test_modpath(): success, buff = mp.run_model(silent=False) except: success = False - assert success, ( - "forward modpath model run did not terminate successfully" - ) + assert ( + success + ), "forward modpath model run did not terminate successfully" mpnam = "freybergmpp" mpp = flopy.modpath.Modpath6( @@ -106,9 +106,9 @@ def test_modpath(): success, buff = mpp.run_model(silent=False) except: success = False - assert success, ( - "backward modpath model run did not terminate successfully" - ) + assert ( + success + ), "backward modpath model run did not terminate successfully" # load modpath output files if run: diff --git a/flopy/mf6/utils/lakpak_utils.py b/flopy/mf6/utils/lakpak_utils.py index 6424c09382..5d4d16c265 100644 --- a/flopy/mf6/utils/lakpak_utils.py +++ b/flopy/mf6/utils/lakpak_utils.py @@ -211,44 +211,48 @@ def __structured_lake_connections( # back face if i > 0: ci = (k, i - 1, j) + cit = (k + 1, i - 1, j) if np.ma.is_masked(lake_map[ci]) and idomain[ci] > 0: cellids.append(ci) claktypes.append("horizontal") - belevs.append(elevations[k + 1, i, j]) - televs.append(elevations[k, i, j]) + belevs.append(elevations[cit]) + televs.append(elevations[ci]) connlens.append(0.5 * dy[i - 1]) connwidths.append(dx[j]) # left face if j > 0: ci = (k, i, j - 1) + cit = (k + 1, i, j - 1) if np.ma.is_masked(lake_map[ci]) and idomain[ci] > 0: cellids.append(ci) claktypes.append("horizontal") - belevs.append(elevations[k + 1, i, j]) - televs.append(elevations[k, i, j]) + belevs.append(elevations[cit]) + televs.append(elevations[ci]) connlens.append(0.5 * dx[j - 1]) connwidths.append(dy[i]) # right face if j < ncol - 1: ci = (k, i, j + 1) + cit = (k + 1, i, j + 1) if np.ma.is_masked(lake_map[ci]) and idomain[ci] > 0: cellids.append(ci) claktypes.append("horizontal") - belevs.append(elevations[k + 1, i, j]) - televs.append(elevations[k, i, j]) + belevs.append(elevations[cit]) + televs.append(elevations[ci]) connlens.append(0.5 * dx[j + 1]) connwidths.append(dy[i]) # front face if i < nrow - 1: ci = (k, i + 1, j) + cit = (k + 1, i + 1, j) if np.ma.is_masked(lake_map[ci]) and idomain[ci] > 0: cellids.append(ci) claktypes.append("horizontal") - belevs.append(elevations[k + 1, i, j]) - televs.append(elevations[k, i, j]) + belevs.append(elevations[cit]) + televs.append(elevations[ci]) connlens.append(0.5 * dy[i + 1]) connwidths.append(dx[j])