opendrift icon indicating copy to clipboard operation
opendrift copied to clipboard

How to plot the selected time step?

Open msorockin opened this issue 8 months ago • 4 comments

The plot function plots the last time step. How can any selected step be plotted?

msorockin avatar Mar 17 '25 19:03 msorockin

Can you explain in more detail what you are trying to do? E.g. what plotting method you are calling.

knutfrode avatar Mar 17 '25 19:03 knutfrode

I've done some modeling of oil spill. o = OpenOil(...) ... And now I'm plotting the position of the Lagrangian particles using o.plot(...) This function plots the particles at the final moment in time. How to plot the particles at any other time step?

msorockin avatar Mar 17 '25 19:03 msorockin

This is not possible with that plot method.

To do this you can use e.g. TrajAn: https://opendrift.github.io/trajan/ Or you can make an animation and extract a specific frame.

knutfrode avatar Mar 17 '25 19:03 knutfrode

Thank you very much for the reply Knut! And for the information about TrajAn. What's missing is that OpenDrift doesn't have the ability to draw intermediate time steps. Extracting intermediate steps from the animation is not so convenient. Sometimes I need to do zooms, etc.

msorockin avatar Mar 17 '25 19:03 msorockin