You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: parcels/particleset.py
+52-48Lines changed: 52 additions & 48 deletions
Original file line number
Diff line number
Diff line change
@@ -709,9 +709,10 @@ def set_variable_write_status(self, var, write_status):
709
709
710
710
defexecute(
711
711
self,
712
-
endtime: timedelta|datetime,
713
-
dt: np.float64|np.float32|timedelta,
714
712
pyfunc=AdvectionRK4,
713
+
endtime: timedelta|datetime|None=None,
714
+
runtime=None,
715
+
dt: np.float64|np.float32|timedelta|None=None,
715
716
output_file=None,
716
717
verbose_progress=True,
717
718
):
@@ -726,9 +727,13 @@ def execute(
726
727
Kernel function to execute. This can be the name of a
727
728
defined Python function or a :class:`parcels.kernel.Kernel` object.
728
729
Kernels can be concatenated using the + operator (Default value = AdvectionRK4)
729
-
endtime (datetime.datetime or np.timedelta64): :
730
-
End time for the timestepping loop. If a timedelta is provided, it is interpreted as the total simulation time.
731
-
If a datetime is provided, it is interpreted as the end time of the simulation.
730
+
endtime (datetime or timedelta): :
731
+
End time for the timestepping loop. If a timedelta is provided, it is interpreted as the total simulation time. In this case,
732
+
the absolute end time is the start of the fieldset's time interval plus the timedelta.
733
+
If a datetime is provided, it is interpreted as the absolute end time of the simulation.
734
+
runtime (timedelta):
735
+
The duration of the simuulation execution. Must be a timedelta object and is required to be set when the `fieldset.time_interval` is not defined.
736
+
If the `fieldset.time_interval` is defined and the runtime is provided, the end time will be the start of the fieldset's time interval plus the runtime.
732
737
dt (timedelta):
733
738
Timestep interval (in seconds) to be passed to the kernel.
0 commit comments