Skip to content

Commit a65376b

Browse files
Fixing a bug where animations don't include the first snapshot of a particleFile
Fixing a bug where the first frame of an animation is not included in the animation. This may also be why sometimes it appears that particles are not written at initial time (#458); they are written but simply not added to animation.
1 parent 0136cb0 commit a65376b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

parcels/scripts/plottrajectoriesfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def plotTrajectoriesFile(filename, mode='2d', tracerfile=None, tracerfield='P',
100100
else:
101101
scat = ax.scatter(lon[b], lat[b], s=20, color='k')
102102
ttl = ax.set_title('Particles' + titlestr + ' at time ' + str(plottimes[0]))
103-
frames = np.arange(1, len(plottimes))
103+
frames = np.arange(0, len(plottimes))
104104

105105
def animate(t):
106106
b = time == plottimes[t]

0 commit comments

Comments
 (0)