Skip to content

Commit

Permalink
Improvin advice on how to call pfile.write_latest_locations()
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvansebille committed Jul 31, 2024
1 parent f9a950a commit 227c0a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/examples/tutorial_kernelloop.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@
"### 3. The last time is not written to file\n",
"Because the location at the start of the loop is written at the end of the Kernel loop, the last `particle.time` of the particle is not written to file. This is similar behaviour to e.g. `np.arange(start, stop)`, which also doesn't include the `stop` value itself. \n",
"\n",
"If you do want to write the last time to file, you can increase the `runtime` or `endtime` by `dt` (although this may cause a TimeExtrapolationError if your run was to the end of the available hydrodynamic data), or you can call `pfile.write_latest_locations(pset, time=endtime)`. Note that in the latter case, the particle locations (longitude, latitude and depth) will be updated, but other variables will _not_ be updated as the Kernels are not run again."
"If you do want to write the last time to file, you can increase the `runtime` or `endtime` by `dt` (although this may cause a TimeExtrapolationError if your run was to the end of the available hydrodynamic data), or you can call `pfile.write_latest_locations(pset, time=pset[0].time_nextloop)`. Note that in the latter case, the particle locations (longitude, latitude and depth) will be updated, but other variables will _not_ be updated as the Kernels are not run again."
]
},
{
Expand Down

0 comments on commit 227c0a2

Please sign in to comment.