Skip to content

Add virtualship animate CLI Command for Cruise Visualization #170

@iuryt

Description

@iuryt

Description

This idea originated from discussions around the VirtualShip website redesign (#168 ), where we considered embedding an animation to visually demonstrate how a virtual cruise works. We’d like to evolve that concept into a CLI feature within the core VirtualShip package to support both pre-run planning and post-run analysis.


Proposed CLI Modes

I propose two modes of operation for the animate feature:

1. Preview Mode (pre-run)

virtualship --preview animate
  • Uses only the cruise schedule and mission plan
  • Shows planned ship path, station locations, and deployment points (e.g., drifter drops)
  • Useful for validating cruise plans before simulation

2. Results Mode (post-run)

virtualship animate
  • Uses data from a completed run (e.g., particle trajectories, collected profiles)
  • Animates actual trajectories and observed deployments
  • Useful for presenting outcomes and full cruise visualizations

Why This Feature?

  • Helps users verify and refine cruise plans before running simulations
  • Supports teaching workflows and presentations
  • Bridges planning and analysis phases visually

Implementation Ideas

  • Make static plots for hour or so of the region of interest and the position of the instruments
  • animate it with ffmpeg
  • Add an inset globe map with the location of the region of interest
  • Maybe "remove" from the plot "old" deployments by a defined time (e.g. 12 h)? This might help to reduce the clutter.
  • Maybe show a tail for drifter trajectories?
  • Maybe an interactive HTML visualization (e.g., with Leaflet, Plotly, or Bokeh)
  • Instrument icons could be used to represent different types of deployments (e.g., CTD, XBT, Argo, drifters), making the animation easier to interpret at a glance.
  • What would be the default basemap? We could plot the bathymetry or
  • It would be nice to have that in a way people could call the function in their own code and add elements as needed.
  • How should we deal with instruments that sink and drift, like Argo floats? I thought we could change the color depending on whether the instrument is profiling or drifting.
  • How do we organize outputs within the VirtualShip run directory structure?
  • Would users benefit from being able to toggle visibility of certain instruments in the animation? This could be something for a future implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions