Skip to content

Commit

Permalink
* update MfSimulationList runtime function
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhughes-usgs committed Nov 14, 2023
1 parent 4136149 commit e89a41d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions flopy/mf6/utils/mfsimlistfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def get_runtime(
self, units: str = "seconds", simulation_timer: str = "elapsed"
) -> float:
"""
Get the elapsed runtime of the model from the list file.
Get model runtimes from the simulation list file.
Parameters
----------
Expand Down Expand Up @@ -100,7 +100,7 @@ def get_runtime(
if simulation_timer == "elapsed":
seekpoint = self._seek_to_string(TIMERS_DICT[simulation_timer])
self.f.seek(seekpoint)
line = self.f.readline()
line = self.f.readline().strip()
if line == "":
return np.nan

Expand All @@ -114,7 +114,7 @@ def get_runtime(
times_sec = np.sum(times * time2sec)
else:
seekpoint = self._seek_to_string(TIMERS_DICT[simulation_timer])
line = self.f.readline()
line = self.f.readline().strip()
if line == "":
return np.nan
times_sec = float(line.split()[3])
Expand All @@ -128,7 +128,7 @@ def get_runtime(

def get_outer_iterations(self) -> int:
"""
Get the total outer iterations from the list file.
Get the total outer iterations from the simulation list file.
Parameters
----------
Expand Down Expand Up @@ -157,7 +157,7 @@ def get_outer_iterations(self) -> int:

def get_total_iterations(self) -> int:
"""
Get the total number of iterations from the list file.
Get the total number of iterations from the simulation list file.
Parameters
----------
Expand Down Expand Up @@ -279,7 +279,7 @@ def _seek_to_string(self, s):

def _rewind_file(self):
"""
Rewind the mfsim.lst file
Rewind the simulation list file
Returns
-------
Expand Down

0 comments on commit e89a41d

Please sign in to comment.