From b27fccdee589c772e6e66160f27d60a8dd485645 Mon Sep 17 00:00:00 2001 From: jdhughes-usgs Date: Fri, 26 Jun 2020 17:05:44 -0400 Subject: [PATCH] fix(Modpath7Sim): fix TimePointInterval calculation for TimePointOption 3 (#927) Closes #730 --- flopy/modpath/mp7sim.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/flopy/modpath/mp7sim.py b/flopy/modpath/mp7sim.py index 14862f44af..6038dc8126 100644 --- a/flopy/modpath/mp7sim.py +++ b/flopy/modpath/mp7sim.py @@ -178,7 +178,7 @@ class Modpath7Sim(Package): stoptime : float User-specified value of tracking time at which to stop a particle tracking simulation. Stop time is only used if the stop time option - is 'specified'. If stoptime is None amd the stop time option is + is 'specified'. If stoptime is None and the stop time option is 'specified' particles will be terminated at the end of the last time step if 'forward' tracking or the beginning of the first time step if 'backward' tracking (default is None). @@ -442,6 +442,10 @@ def __init__(self, model, mpnamefilename=None, listingfilename=None, stoptime = self.parent.time_end else: stoptime = 0. + # set stoptime to the end of the simulation if it still None. + else: + stoptime = self.parent.time_end + self.stoptime = stoptime # timepointdata @@ -471,7 +475,7 @@ def __init__(self, model, mpnamefilename=None, listingfilename=None, timepointoption = 1 else: timepointoption = 1 - timepointdata = [100, self.parent.time_end / 100.] + timepointdata = [100, self.stoptime / 100.] timepointdata[1] = np.array([timepointdata[1]]) self.timepointoption = timepointoption self.timepointdata = timepointdata