Parcels version
Parcels v4
Description
When running a Parcels simulation with an output frequency (outputdt) on the order of milliseconds, the time variable written to the output file does not preserve the millisecond precision. Instead, time values appear to be truncated/rounded to the nearest second.
As a result, multiple consecutive output records for the same trajectory (Particle_ID) end up sharing an identical time value, even though they correspond to distinct simulation steps. This creates duplicate (trajectory, time) pairs in the output dataset, which breaks downstream analysis that assumes each (Particle_ID, time) pair is unique (e.g., indexing, grouping, or merging on time).
Code sample
output_file = parcels.ParticleFile(resultDir+"output-quickstart.parquet", outputdt=timedelta(seconds=0.4), mode="w") #
Parcels version
Parcels v4
Description
When running a Parcels simulation with an output frequency (
outputdt) on the order of milliseconds, the time variable written to the output file does not preserve the millisecond precision. Instead, time values appear to be truncated/rounded to the nearest second.As a result, multiple consecutive output records for the same trajectory (
Particle_ID) end up sharing an identical time value, even though they correspond to distinct simulation steps. This creates duplicate (trajectory, time) pairs in the output dataset, which breaks downstream analysis that assumes each (Particle_ID,time) pair is unique (e.g., indexing, grouping, or merging on time).Code sample