Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mfsfr2.check): negative segments for lakes no longer included in … #915

Merged
merged 1 commit into from
Jun 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions autotest/t009_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ def test_sfr():
/ sfr.reach_data.rchlen[reach_inds]
chk = sfr.check()
assert sfr.reach_data.slope.min() < 0.0001 and 'minimum slope' in chk.warnings
# negative segments for lakes shouldn't be included in segment numbering order check
assert 'segment numbering order' not in chk.warnings
sfr.reach_data.slope[0] = 1.1
chk.slope(maximum_slope=1.0)
assert 'maximum slope' in chk.warnings
Expand Down Expand Up @@ -581,7 +583,7 @@ def test_sfr_plot():


if __name__ == '__main__':
# test_sfr()
test_sfr()
# test_ds_6d_6e_disordered()
# test_disordered_reachdata_fields()
# test_sfr_renumbering()
Expand All @@ -590,6 +592,6 @@ def test_sfr_plot():
# test_transient_example()
# mtest_sfr_plot()
# test_assign_layers()
test_SfrFile()
#test_SfrFile()
# test_const()
pass
2 changes: 1 addition & 1 deletion flopy/modflow/mfsfr2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2163,7 +2163,7 @@ def numbering(self):
print(headertxt.strip())
# for per, segment_data in self.segment_data.items():

inds = (sd.outseg < sd.nseg) & (sd.outseg != 0)
inds = (sd.outseg < sd.nseg) & (sd.outseg > 0)

if len(txt) == 0 and np.any(inds):
decreases = np.array(sd[inds])[['nseg', 'outseg']]
Expand Down