Skip to content

Commit

Permalink
fix(Modpath7Sim): fix TimePointInterval calculation for TimePointOpti…
Browse files Browse the repository at this point in the history
…on 3 (#927)

Closes #730
  • Loading branch information
jdhughes-usgs committed Jun 26, 2020
1 parent a0baca8 commit b27fccd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions flopy/modpath/mp7sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b27fccd

Please sign in to comment.