Detailed Built-In Plots Demonstration

PTM allows access to OpenDrift’s built-in plotting capabilities with the use of an input dictionary. You can browse the types of plots from OpenDrift in their gallery; this page demonstrates how to access a variety of those plots through PTM.

The available plot types are:

  • spaghetti

  • property

  • oil

  • animation

  • animation profile

To create a type of plot, the listed words must be in the plot dictionary key and it will work by word-matching. Each plot key must also be distinct. A basic version of each available plot (except “property”, which requires an input property to plot) will be plotted for “all”, including depth and mean depth property plots. Some examples will be demonstrated here, as well as how to get the plot whether using PTM as a Python package or through the CLI.

Examples will be shown with code run at the bottom of this page. First we show options.

To make two or more plots or animations of the same type for the same simulation, input multiple plot dictionaries. Just be sure that each plot key is distinct.

A plot or animation option that uses a nondefault variable must also have access to that variable in the output file, which you accomplish by requesting it as an export_variable. By default, all possible variables are exported, but if you input a preferred list of variables to export, be sure it includes any you want to plot.

If you hit an exception due to missing the reader, you probably need to run your requested plot or animation at the same time as the simulation in order to have access to the variable requested.

Spaghetti

Basic plot

This example plots the particle tracks. Input:

plots={'spaghetti': {}}

To run this with the CLI, the plots section would be

plots="{'spaghetti': {}}"

Options

You can choose the filetype by including "filetype": "jpg" or other filetypes that matplotlib can handle in the “spaghetti” plot dictionary. The default is png.

You can also color the lines with a parameter from the simulations, for example, “z” to plot the depth. You can plot any variables that are in the export variables. Get more information about export variables in Export Variables. This is input as "linecolor": "z" and you can add a colormap if you want with “cmap”.

You can control other parameters for the plot too, see OpenDrift options here.

Multiple plots

To make two or more spaghetti plots for the same simulation, input multiple plot dictionaries. Just be sure that each plot key includes the word “spaghetti” and isn’t the same as any other plot key value.

Input:

import cmocean.cm as cmo

...

..., plots={'spaghetti': {},
        'spaghetti2': {'linecolor': 'z', 'cmap': 'cmo.deep'}}, ...

For CLI use

plots="{'spaghetti': {}, 'spaghetti2': {'linecolor': 'z', 'cmap': 'cmo.deep'}}"

Animation

Basic

You can run a basic particle animation with

plots={'animation': {}}

To run this with the CLI, the plots section would be

plots="{'animation': {}}"

Options

You can choose the filetype with "filetype": "mp4" in the input plot dictionary. The default is “mp4”.

You can change the background of the animation and colormap, along with the frames per second, such as, 'animation': {'background': 'sea_surface_height', 'filetype': '.mp4', 'fps': 2, 'cmap': 'cmo.deep_r'.

Other variables to use for background include

  • sea_floor_depth_below_sea_level

  • land_binary_mask

  • zeta

  • sea_surface_height

Other options for animations include:

  • bgalpha=1

  • markersize=’mass_oil’

  • markersize_scaling=80

Other options available from OpenDrift are found here.

Oil Budget

Basic

You can make a basic oil budget plot with

plots={'oil': {}}

To run this with the CLI, the plots section would be

plots="{'oil': {}}"

Options

Options are:

  • show_wind_and_current=True

  • show_watercontent_and_viscosity=True

Animation Profile

This shows an animation from the side, with depth on the y-axis.

Basic

You can make a profile animation with

plots={'animation_profile': {}}

To run this with the CLI, the plots section would be

plots="{'animation_profile': {}}"

Options

Useful options include:

  • markersize='mass_oil'

  • markersize_scaling=80

  • color='z'

  • alpha=.5

Property Plot

This plots a single property over time, either for every track or the average over all the tracks.

Basic

You can make a property plot with the following — you must input a “prop” to plot!

plots={'property': {'variable': 'z'}}

To run this with the CLI, the plots section would be

plots="{'property': {'variable': 'z'}}"

Options

  • 'mean': True

Demonstration

You can mix and match the plot and animation options above.

Demo for “all” option

import particle_tracking_manager as ptm
import xroms
import xarray as xr
import cmocean.cm as cmo
import pandas as pd

m = ptm.OpenDriftModel(lon=-90, lat=28.7, number=10, duration="3h",
                       do3D=True, use_static_masks=True,
                       ocean_model="TXLA",
                       ocean_model_local=False,
                       start_time="2009-11-19T12:00",
                       plots={'all': {},})
m.run_all()
/home/docs/checkouts/readthedocs.org/user_builds/particle-tracking-manager/conda/stable/lib/python3.13/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
  from .autonotebook import tqdm as notebook_tqdm
2026-04-09 20:17:44 INFO    root.config_logging.setup_logger:54: Particle tracking manager simulation.
2026-04-09 20:17:44 INFO    root.config_logging.setup_logger:55: Log filename: output-results_2026-04-09T201744Z.log
2026-04-09 20:17:44 INFO    root.config_the_manager.timedir:348: Running model forward in time.
2026-04-09 20:17:44 INFO    root.config_the_manager.timedir:348: Running model forward in time.
Downloading file 'ROMS_example_full_grid.nc' from 'https://github.com/xoceanmodel/xroms/raw/main/xroms/data/ROMS_example_full_grid.nc' to '/home/docs/.cache/xroms'.
2026-04-09 20:17:46 INFO    root.config_ocean_model.register_on_the_fly:230: Registered new ocean model or altered existing ocean model in the registry.
20:17:49 INFO    opendrift:568: OpenDriftSimulation initialised (version 1.14.9)
2026-04-09 20:17:49 WARNING opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:187: Vstretching not found, using 1
2026-04-09 20:17:49 WARNING opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:187: Vstretching not found, using 1
20:17:49 WARNING opendrift.readers.reader_ROMS_native:187: Vstretching not found, using 1
2026-04-09 20:17:49 WARNING opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:310: Duplicate variables for ocean_s_coordinate_g1, selecting s_rho, and discarding s_w
2026-04-09 20:17:49 WARNING opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:310: Duplicate variables for ocean_s_coordinate_g1, selecting s_rho, and discarding s_w
20:17:49 WARNING opendrift.readers.reader_ROMS_native:310: Duplicate variables for ocean_s_coordinate_g1, selecting s_rho, and discarding s_w
2026-04-09 20:17:49 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:317: The following variables without standard_name are discarded: ['angle', 'hc', 'Cs_r', 'Cs_w', 'mask_u', 'mask_v', 'Vtransform', 'pm', 'pn', 'f', 'lon_rho', 'lat_rho', 'ocean_time', 'lon_u', 'lat_u', 'lon_v', 'lat_v']
2026-04-09 20:17:49 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:317: The following variables without standard_name are discarded: ['angle', 'hc', 'Cs_r', 'Cs_w', 'mask_u', 'mask_v', 'Vtransform', 'pm', 'pn', 'f', 'lon_rho', 'lat_rho', 'ocean_time', 'lon_u', 'lat_u', 'lon_v', 'lat_v']
20:17:49 INFO    opendrift.readers.reader_ROMS_native:317: The following variables without standard_name are discarded: ['angle', 'hc', 'Cs_r', 'Cs_w', 'mask_u', 'mask_v', 'Vtransform', 'pm', 'pn', 'f', 'lon_rho', 'lat_rho', 'ocean_time', 'lon_u', 'lat_u', 'lon_v', 'lat_v']
2026-04-09 20:17:49 WARNING opendrift.readers.basereader.structured.structured.__init__:50: No proj string or projection could be derived for reader TXLA, using 'fakeproj'.
2026-04-09 20:17:49 WARNING opendrift.readers.basereader.structured.structured.__init__:50: No proj string or projection could be derived for reader TXLA, using 'fakeproj'.
2026-04-09 20:17:49 WARNING opendrift.readers.basereader.structured.structured.__init__:50: No proj string or projection could be derived for reader TXLA, using 'fakeproj'.
20:17:49 WARNING opendrift.readers.basereader.structured:50: No proj string or projection could be derived for reader TXLA, using 'fakeproj'.
2026-04-09 20:17:49 INFO    opendrift.readers.basereader.structured.structured.__init__:88: Making interpolator for lon,lat to x,y conversion...
2026-04-09 20:17:49 INFO    opendrift.readers.basereader.structured.structured.__init__:88: Making interpolator for lon,lat to x,y conversion...
2026-04-09 20:17:49 INFO    opendrift.readers.basereader.structured.structured.__init__:88: Making interpolator for lon,lat to x,y conversion...
20:17:49 INFO    opendrift.readers.basereader.structured:88: Making interpolator for lon,lat to x,y conversion...
2026-04-09 20:17:50 INFO    opendrift.readers.basereader.structured.structured.__init__:106: Saving interpolator for lon,lat to x,y conversion.
2026-04-09 20:17:50 INFO    opendrift.readers.basereader.structured.structured.__init__:106: Saving interpolator for lon,lat to x,y conversion.
2026-04-09 20:17:50 INFO    opendrift.readers.basereader.structured.structured.__init__:106: Saving interpolator for lon,lat to x,y conversion.
20:17:50 INFO    opendrift.readers.basereader.structured:106: Saving interpolator for lon,lat to x,y conversion.
20:17:50 INFO    root:296: Using seed_flag "elements".
20:17:50 INFO    root:296: Using seed_flag "elements".
20:17:50 INFO    root:296: Using seed_flag "elements".
20:17:50 INFO    opendrift.models.basemodel.environment:227: Fallback values will be used for the following variables which have no readers: 
20:17:50 INFO    opendrift.models.basemodel.environment:230: 	x_wind: 0.000000
20:17:50 INFO    opendrift.models.basemodel.environment:230: 	y_wind: 0.000000
20:17:50 INFO    opendrift.models.basemodel.environment:230: 	upward_sea_water_velocity: 0.000000
20:17:50 INFO    opendrift.models.basemodel.environment:230: 	ocean_vertical_diffusivity: 0.000000
20:17:50 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_significant_height: 0.000000
20:17:50 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
20:17:50 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
20:17:50 INFO    root:168: start_time: 2009-11-19 12:00:00, end_time: 2009-11-19 15:00:00, steps: 36, duration: 3h
20:17:50 INFO    root:296: Using seed_flag "elements".
20:17:50 INFO    root:348: Running model forward in time.
20:17:50 INFO    opendrift:1905: Storing previous values of element property lon because of condition (('general:coastline_action', 'in', ['stranding', 'previous']), 'or', ('general:seafloor_action', 'in', ['previous']))
20:17:50 INFO    opendrift:1905: Storing previous values of element property lat because of condition (('general:coastline_action', 'in', ['stranding', 'previous']), 'or', ('general:seafloor_action', 'in', ['previous']))
20:17:50 INFO    opendrift:1913: Storing previous values of environment variable sea_surface_height because of condition ['drift:vertical_advection', 'is', True]
20:17:50 INFO    opendrift:947: Using existing reader for land_binary_mask to move elements to ocean
2026-04-09 20:17:50 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_rho:367: Using mask_rho for mask_rho
2026-04-09 20:17:50 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_rho:367: Using mask_rho for mask_rho
20:17:50 INFO    opendrift.readers.reader_ROMS_native:367: Using mask_rho for mask_rho
20:17:50 INFO    opendrift:978: All points are in ocean
20:17:50 INFO    opendrift:2202: 2009-11-19 12:00:00 - step 1 of 36 - 10 active elements (0 deactivated)
2026-04-09 20:17:50 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_u:388: Using mask_u for mask_u
2026-04-09 20:17:50 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_u:388: Using mask_u for mask_u
20:17:50 INFO    opendrift.readers.reader_ROMS_native:388: Using mask_u for mask_u
2026-04-09 20:17:50 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_v:409: Using mask_v for mask_v
2026-04-09 20:17:50 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_v:409: Using mask_v for mask_v
20:17:50 INFO    opendrift.readers.reader_ROMS_native:409: Using mask_v for mask_v
2026-04-09 20:17:50 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.angle:432: Using angle from Dataset.
2026-04-09 20:17:50 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.angle:432: Using angle from Dataset.
20:17:50 INFO    opendrift.readers.reader_ROMS_native:432: Using angle from Dataset.
20:17:50 INFO    opendrift:2202: 2009-11-19 12:05:00 - step 2 of 36 - 10 active elements (0 deactivated)
2026-04-09 20:17:50 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.zeta:418: Using zeta for sea surface height
2026-04-09 20:17:50 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.zeta:418: Using zeta for sea surface height
20:17:50 INFO    opendrift.readers.reader_ROMS_native:418: Using zeta for sea surface height
2026-04-09 20:17:50 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.get_variables:639: Time: 0:00:00.171451
2026-04-09 20:17:50 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.get_variables:639: Time: 0:00:00.171451
20:17:50 INFO    opendrift.readers.reader_ROMS_native:639: Time: 0:00:00.171451
20:17:50 INFO    opendrift:2202: 2009-11-19 12:10:00 - step 3 of 36 - 10 active elements (0 deactivated)
20:17:50 INFO    opendrift:2202: 2009-11-19 12:15:00 - step 4 of 36 - 10 active elements (0 deactivated)
20:17:50 INFO    opendrift:2202: 2009-11-19 12:20:00 - step 5 of 36 - 10 active elements (0 deactivated)
20:17:50 INFO    opendrift:2202: 2009-11-19 12:25:00 - step 6 of 36 - 10 active elements (0 deactivated)
20:17:50 INFO    opendrift:2202: 2009-11-19 12:30:00 - step 7 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 12:35:00 - step 8 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 12:40:00 - step 9 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 12:45:00 - step 10 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 12:50:00 - step 11 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 12:55:00 - step 12 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 13:00:00 - step 13 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 13:05:00 - step 14 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 13:10:00 - step 15 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 13:15:00 - step 16 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 13:20:00 - step 17 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 13:25:00 - step 18 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 13:30:00 - step 19 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 13:35:00 - step 20 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 13:40:00 - step 21 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 13:45:00 - step 22 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 13:50:00 - step 23 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 13:55:00 - step 24 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 14:00:00 - step 25 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 14:05:00 - step 26 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 14:10:00 - step 27 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 14:15:00 - step 28 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 14:20:00 - step 29 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 14:25:00 - step 30 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 14:30:00 - step 31 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 14:35:00 - step 32 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 14:40:00 - step 33 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 14:45:00 - step 34 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 14:50:00 - step 35 of 36 - 10 active elements (0 deactivated)
20:17:51 INFO    opendrift:2202: 2009-11-19 14:55:00 - step 36 of 36 - 10 active elements (0 deactivated)
20:17:51 WARNING opendrift:2565: Plotting fast. This will make your plots less accurate.
20:17:56 INFO    opendrift:3899: Time to make plot: 0:00:04.562470
20:17:56 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201744Z_spaghetti_fast_True.png
20:17:56 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201744Z_property_variable_z.png
20:17:56 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201744Z_property_variable_z_mean_True.png
20:17:56 WARNING opendrift:2565: Plotting fast. This will make your plots less accurate.
20:17:57 INFO    opendrift:4768: Saving animation to output-results_2026-04-09T201744Z_fast_True_fps_4_background_land_binary_mask_cmap_cmo.deep_hide_landmask_True.mp4...
20:17:58 INFO    opendrift:3191: Time to make animation: 0:00:02.504559
20:17:58 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201744Z_fast_True_fps_4_background_land_binary_mask_cmap_cmo.deep_hide_landmask_True.mp4
20:17:58 INFO    opendrift:4768: Saving animation to output-results_2026-04-09T201744Z_profile_fps_4.mp4...
20:17:59 INFO    opendrift:3407: Time to make animation: 0:00:00.360354
20:17:59 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201744Z_profile_fps_4.mp4
_images/1c948daa3cabc52c1005fdf11a4bbfaf825fd5433386fafc7cce4bd9e9070384.png _images/8d45781e84f1a6b808763a96671a2330bb61168fbffe68e017b7b7aea8e5c6cc.png _images/d5f50585620ed7f75e6d66e2f569907c1ef4c1ad6191884525beb499ac3b6045.png

Demo with larval fish scenario

This example plots particle tracks and additionally plots tracks colored by a variable, and runs the plot after the simulation has been run.

m = ptm.OpenDriftModel(drift_model="LarvalFish", lon=-90, lat=28.7, number=10, duration="3h",
                       z=None,
                       do3D=True, use_static_masks=True,
                       ocean_model="TXLA",
                       ocean_model_local=False,
                       start_time="2009-11-19T12:00",
                       hatched=1,
                       seed_seafloor=True,)
m.run_all()
2026-04-09 20:18:00 INFO    root.config_logging.setup_logger:54: Particle tracking manager simulation.
2026-04-09 20:18:00 INFO    root.config_logging.setup_logger:55: Log filename: output-results_2026-04-09T201800Z.log
2026-04-09 20:18:00 INFO    root.config_the_manager.timedir:348: Running model forward in time.
2026-04-09 20:18:00 INFO    root.config_the_manager.timedir:348: Running model forward in time.
2026-04-09 20:18:00 INFO    root.config_ocean_model.register_on_the_fly:230: Registered new ocean model or altered existing ocean model in the registry.
20:18:00 INFO    opendrift:568: OpenDriftSimulation initialised (version 1.14.9)
2026-04-09 20:18:00 WARNING opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:187: Vstretching not found, using 1
2026-04-09 20:18:00 WARNING opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:187: Vstretching not found, using 1
20:18:00 WARNING opendrift.readers.reader_ROMS_native:187: Vstretching not found, using 1
2026-04-09 20:18:00 WARNING opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:310: Duplicate variables for ocean_s_coordinate_g1, selecting s_rho, and discarding s_w
2026-04-09 20:18:00 WARNING opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:310: Duplicate variables for ocean_s_coordinate_g1, selecting s_rho, and discarding s_w
20:18:00 WARNING opendrift.readers.reader_ROMS_native:310: Duplicate variables for ocean_s_coordinate_g1, selecting s_rho, and discarding s_w
2026-04-09 20:18:00 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:317: The following variables without standard_name are discarded: ['angle', 'hc', 'Cs_r', 'Cs_w', 'mask_u', 'mask_v', 'Vtransform', 'pm', 'pn', 'f', 'lon_rho', 'lat_rho', 'ocean_time', 'lon_u', 'lat_u', 'lon_v', 'lat_v']
2026-04-09 20:18:00 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:317: The following variables without standard_name are discarded: ['angle', 'hc', 'Cs_r', 'Cs_w', 'mask_u', 'mask_v', 'Vtransform', 'pm', 'pn', 'f', 'lon_rho', 'lat_rho', 'ocean_time', 'lon_u', 'lat_u', 'lon_v', 'lat_v']
20:18:00 INFO    opendrift.readers.reader_ROMS_native:317: The following variables without standard_name are discarded: ['angle', 'hc', 'Cs_r', 'Cs_w', 'mask_u', 'mask_v', 'Vtransform', 'pm', 'pn', 'f', 'lon_rho', 'lat_rho', 'ocean_time', 'lon_u', 'lat_u', 'lon_v', 'lat_v']
2026-04-09 20:18:00 WARNING opendrift.readers.basereader.structured.structured.__init__:50: No proj string or projection could be derived for reader TXLA, using 'fakeproj'.
2026-04-09 20:18:00 WARNING opendrift.readers.basereader.structured.structured.__init__:50: No proj string or projection could be derived for reader TXLA, using 'fakeproj'.
2026-04-09 20:18:00 WARNING opendrift.readers.basereader.structured.structured.__init__:50: No proj string or projection could be derived for reader TXLA, using 'fakeproj'.
20:18:00 WARNING opendrift.readers.basereader.structured:50: No proj string or projection could be derived for reader TXLA, using 'fakeproj'.
2026-04-09 20:18:00 INFO    opendrift.readers.basereader.structured.structured.__init__:81: Loading previously saved interpolator for lon,lat to x,y conversion.
2026-04-09 20:18:00 INFO    opendrift.readers.basereader.structured.structured.__init__:81: Loading previously saved interpolator for lon,lat to x,y conversion.
2026-04-09 20:18:00 INFO    opendrift.readers.basereader.structured.structured.__init__:81: Loading previously saved interpolator for lon,lat to x,y conversion.
20:18:00 INFO    opendrift.readers.basereader.structured:81: Loading previously saved interpolator for lon,lat to x,y conversion.
20:18:00 INFO    root:296: Using seed_flag "elements".
20:18:00 INFO    root:296: Using seed_flag "elements".
20:18:00 INFO    root:296: Using seed_flag "elements".
2026-04-09 20:18:00 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:227: Fallback values will be used for the following variables which have no readers: 
2026-04-09 20:18:00 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:227: Fallback values will be used for the following variables which have no readers: 
2026-04-09 20:18:00 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:227: Fallback values will be used for the following variables which have no readers: 
20:18:00 INFO    opendrift.models.basemodel.environment:227: Fallback values will be used for the following variables which have no readers: 
2026-04-09 20:18:00 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_significant_height: 0.000000
2026-04-09 20:18:00 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_significant_height: 0.000000
2026-04-09 20:18:00 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_significant_height: 0.000000
20:18:00 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_significant_height: 0.000000
2026-04-09 20:18:00 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	x_wind: 0.000000
2026-04-09 20:18:00 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	x_wind: 0.000000
2026-04-09 20:18:00 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	x_wind: 0.000000
20:18:00 INFO    opendrift.models.basemodel.environment:230: 	x_wind: 0.000000
2026-04-09 20:18:00 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	y_wind: 0.000000
2026-04-09 20:18:00 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	y_wind: 0.000000
2026-04-09 20:18:00 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	y_wind: 0.000000
20:18:00 INFO    opendrift.models.basemodel.environment:230: 	y_wind: 0.000000
2026-04-09 20:18:00 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	ocean_vertical_diffusivity: 0.010000
2026-04-09 20:18:00 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	ocean_vertical_diffusivity: 0.010000
2026-04-09 20:18:00 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	ocean_vertical_diffusivity: 0.010000
20:18:00 INFO    opendrift.models.basemodel.environment:230: 	ocean_vertical_diffusivity: 0.010000
2026-04-09 20:18:00 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
2026-04-09 20:18:00 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
2026-04-09 20:18:00 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
20:18:00 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
2026-04-09 20:18:00 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
2026-04-09 20:18:00 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
2026-04-09 20:18:00 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
20:18:00 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
2026-04-09 20:18:00 WARNING opendrift.models.basemodel.environment.environment.discard_reader_if_not_relevant:441: Simulation has no simulation_extent, cannot check reader coverage
2026-04-09 20:18:00 WARNING opendrift.models.basemodel.environment.environment.discard_reader_if_not_relevant:441: Simulation has no simulation_extent, cannot check reader coverage
2026-04-09 20:18:00 WARNING opendrift.models.basemodel.environment.environment.discard_reader_if_not_relevant:441: Simulation has no simulation_extent, cannot check reader coverage
20:18:00 WARNING opendrift.models.basemodel.environment:441: Simulation has no simulation_extent, cannot check reader coverage
2026-04-09 20:18:00 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_rho:367: Using mask_rho for mask_rho
2026-04-09 20:18:00 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_rho:367: Using mask_rho for mask_rho
20:18:00 INFO    opendrift.readers.reader_ROMS_native:367: Using mask_rho for mask_rho
20:18:00 INFO    root:168: start_time: 2009-11-19 12:00:00, end_time: 2009-11-19 15:00:00, steps: 36, duration: 3h
20:18:00 INFO    root:296: Using seed_flag "elements".
20:18:00 INFO    root:348: Running model forward in time.
20:18:00 INFO    opendrift:1905: Storing previous values of element property lon because of condition (('general:coastline_action', 'in', ['stranding', 'previous']), 'or', ('general:seafloor_action', 'in', ['previous']))
20:18:00 INFO    opendrift:1905: Storing previous values of element property lat because of condition (('general:coastline_action', 'in', ['stranding', 'previous']), 'or', ('general:seafloor_action', 'in', ['previous']))
20:18:00 INFO    opendrift:947: Using existing reader for land_binary_mask to move elements to ocean
20:18:00 INFO    opendrift:978: All points are in ocean
20:18:00 INFO    opendrift:2202: 2009-11-19 12:00:00 - step 1 of 36 - 10 active elements (0 deactivated)
2026-04-09 20:18:00 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.zeta:418: Using zeta for sea surface height
2026-04-09 20:18:00 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.zeta:418: Using zeta for sea surface height
20:18:00 INFO    opendrift.readers.reader_ROMS_native:418: Using zeta for sea surface height
2026-04-09 20:18:00 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_u:388: Using mask_u for mask_u
2026-04-09 20:18:00 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_u:388: Using mask_u for mask_u
20:18:00 INFO    opendrift.readers.reader_ROMS_native:388: Using mask_u for mask_u
2026-04-09 20:18:00 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.get_variables:639: Time: 0:00:00.100384
2026-04-09 20:18:00 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.get_variables:639: Time: 0:00:00.100384
20:18:00 INFO    opendrift.readers.reader_ROMS_native:639: Time: 0:00:00.100384
2026-04-09 20:18:00 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_v:409: Using mask_v for mask_v
2026-04-09 20:18:00 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_v:409: Using mask_v for mask_v
20:18:00 INFO    opendrift.readers.reader_ROMS_native:409: Using mask_v for mask_v
2026-04-09 20:18:00 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.angle:432: Using angle from Dataset.
2026-04-09 20:18:00 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.angle:432: Using angle from Dataset.
20:18:00 INFO    opendrift.readers.reader_ROMS_native:432: Using angle from Dataset.
20:18:00 INFO    opendrift:2202: 2009-11-19 12:05:00 - step 2 of 36 - 10 active elements (0 deactivated)
20:18:00 INFO    opendrift:2202: 2009-11-19 12:10:00 - step 3 of 36 - 10 active elements (0 deactivated)
20:18:00 INFO    opendrift:2202: 2009-11-19 12:15:00 - step 4 of 36 - 10 active elements (0 deactivated)
20:18:00 INFO    opendrift:2202: 2009-11-19 12:20:00 - step 5 of 36 - 10 active elements (0 deactivated)
20:18:00 INFO    opendrift:2202: 2009-11-19 12:25:00 - step 6 of 36 - 10 active elements (0 deactivated)
20:18:00 INFO    opendrift:2202: 2009-11-19 12:30:00 - step 7 of 36 - 10 active elements (0 deactivated)
20:18:00 INFO    opendrift:2202: 2009-11-19 12:35:00 - step 8 of 36 - 10 active elements (0 deactivated)
20:18:00 INFO    opendrift:2202: 2009-11-19 12:40:00 - step 9 of 36 - 10 active elements (0 deactivated)
20:18:00 INFO    opendrift:2202: 2009-11-19 12:45:00 - step 10 of 36 - 10 active elements (0 deactivated)
20:18:00 INFO    opendrift:2202: 2009-11-19 12:50:00 - step 11 of 36 - 10 active elements (0 deactivated)
20:18:00 INFO    opendrift:2202: 2009-11-19 12:55:00 - step 12 of 36 - 10 active elements (0 deactivated)
20:18:01 INFO    opendrift:2202: 2009-11-19 13:00:00 - step 13 of 36 - 10 active elements (0 deactivated)
20:18:01 INFO    opendrift:2202: 2009-11-19 13:05:00 - step 14 of 36 - 10 active elements (0 deactivated)
20:18:01 INFO    opendrift:2202: 2009-11-19 13:10:00 - step 15 of 36 - 10 active elements (0 deactivated)
20:18:01 INFO    opendrift:2202: 2009-11-19 13:15:00 - step 16 of 36 - 10 active elements (0 deactivated)
20:18:01 INFO    opendrift:2202: 2009-11-19 13:20:00 - step 17 of 36 - 10 active elements (0 deactivated)
20:18:01 INFO    opendrift:2202: 2009-11-19 13:25:00 - step 18 of 36 - 10 active elements (0 deactivated)
20:18:01 INFO    opendrift:2202: 2009-11-19 13:30:00 - step 19 of 36 - 10 active elements (0 deactivated)
20:18:01 INFO    opendrift:2202: 2009-11-19 13:35:00 - step 20 of 36 - 10 active elements (0 deactivated)
20:18:01 INFO    opendrift:2202: 2009-11-19 13:40:00 - step 21 of 36 - 10 active elements (0 deactivated)
20:18:01 INFO    opendrift:2202: 2009-11-19 13:45:00 - step 22 of 36 - 10 active elements (0 deactivated)
20:18:01 INFO    opendrift:2202: 2009-11-19 13:50:00 - step 23 of 36 - 10 active elements (0 deactivated)
20:18:01 INFO    opendrift:2202: 2009-11-19 13:55:00 - step 24 of 36 - 10 active elements (0 deactivated)
20:18:01 INFO    opendrift:2202: 2009-11-19 14:00:00 - step 25 of 36 - 10 active elements (0 deactivated)
20:18:01 INFO    opendrift:2202: 2009-11-19 14:05:00 - step 26 of 36 - 10 active elements (0 deactivated)
20:18:01 INFO    opendrift:2202: 2009-11-19 14:10:00 - step 27 of 36 - 10 active elements (0 deactivated)
20:18:01 INFO    opendrift:2202: 2009-11-19 14:15:00 - step 28 of 36 - 10 active elements (0 deactivated)
20:18:01 INFO    opendrift:2202: 2009-11-19 14:20:00 - step 29 of 36 - 10 active elements (0 deactivated)
20:18:01 INFO    opendrift:2202: 2009-11-19 14:25:00 - step 30 of 36 - 10 active elements (0 deactivated)
20:18:01 INFO    opendrift:2202: 2009-11-19 14:30:00 - step 31 of 36 - 10 active elements (0 deactivated)
20:18:01 INFO    opendrift:2202: 2009-11-19 14:35:00 - step 32 of 36 - 10 active elements (0 deactivated)
20:18:01 INFO    opendrift:2202: 2009-11-19 14:40:00 - step 33 of 36 - 10 active elements (0 deactivated)
20:18:01 INFO    opendrift:2202: 2009-11-19 14:45:00 - step 34 of 36 - 10 active elements (0 deactivated)
20:18:01 INFO    opendrift:2202: 2009-11-19 14:50:00 - step 35 of 36 - 10 active elements (0 deactivated)
20:18:01 INFO    opendrift:2202: 2009-11-19 14:55:00 - step 36 of 36 - 10 active elements (0 deactivated)

To create the plots:

import particle_tracking_manager.models.opendrift.plot as plot
out_plots = plot.make_plots_after_simulation(m.config.output_file,
          plots={'spaghetti': {},
                  'spaghetti2': {'linecolor': 'sea_water_temperature', 'cmap': 'cmo.thermal'},
                  'animation': {'filetype': 'gif'},
                  'animation_profile': {'filetype': 'gif'},
                  'property': {'variable': 'z'},
                  'propertymean': {'variable': 'z', 'mean': True},})
20:18:01 INFO    opendrift:568: OpenDriftSimulation initialised (version 1.14.9)
20:18:01 DEBUG   opendrift:1798: No elements to deactivate
2026-04-09 20:18:01 WARNING opendrift.export.io_netcdf.io_netcdf.import_file:186: time data '3600.0' does not match format '%H:%M:%S'
2026-04-09 20:18:01 WARNING opendrift.export.io_netcdf.io_netcdf.import_file:186: time data '3600.0' does not match format '%H:%M:%S'
20:18:01 WARNING opendrift.export.io_netcdf:186: time data '3600.0' does not match format '%H:%M:%S'
2026-04-09 20:18:01 WARNING opendrift.export.io_netcdf.io_netcdf.import_file:187: Could not parse time_steps from netCDF file
2026-04-09 20:18:01 WARNING opendrift.export.io_netcdf.io_netcdf.import_file:187: Could not parse time_steps from netCDF file
20:18:01 WARNING opendrift.export.io_netcdf:187: Could not parse time_steps from netCDF file
20:18:01 INFO    opendrift:87: Returning <class 'opendrift.models.larvalfish_extended.LarvalFishExtended'> object
20:18:01 DEBUG   opendrift:2531: Setting up map: corners=None, fast=True, lscale=None
20:18:01 WARNING opendrift:2565: Plotting fast. This will make your plots less accurate.
20:18:02 INFO    opendrift:3899: Time to make plot: 0:00:01.171339
20:18:02 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201800Z_spaghetti_fast_True.png
20:18:02 DEBUG   opendrift:2531: Setting up map: corners=None, fast=True, lscale=None
20:18:02 WARNING opendrift:2565: Plotting fast. This will make your plots less accurate.
20:18:04 INFO    opendrift:3899: Time to make plot: 0:00:01.206116
20:18:04 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201800Z_spaghetti_fast_True_linecolor_sea_water_temperature_cmap_cmo.thermal.png
20:18:04 DEBUG   opendrift:2531: Setting up map: corners=None, fast=True, lscale=None
20:18:04 WARNING opendrift:2565: Plotting fast. This will make your plots less accurate.
20:18:04 DEBUG   opendrift:3198: Saving animation..
20:18:04 INFO    opendrift:4768: Saving animation to output-results_2026-04-09T201800Z_fast_True_fps_4.gif...
20:18:06 DEBUG   opendrift:4806: MPLBACKEND = module://matplotlib_inline.backend_inline
20:18:06 DEBUG   opendrift:4807: DISPLAY = None
20:18:06 DEBUG   opendrift:4808: Time to save animation: 0:00:01.714161
20:18:06 INFO    opendrift:3191: Time to make animation: 0:00:02.380000
20:18:06 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201800Z_fast_True_fps_4.gif
20:18:06 DEBUG   opendrift:3198: Saving animation..
20:18:06 INFO    opendrift:4768: Saving animation to output-results_2026-04-09T201800Z_profile_fps_4.gif...
20:18:06 DEBUG   opendrift:4806: MPLBACKEND = module://matplotlib_inline.backend_inline
20:18:06 DEBUG   opendrift:4807: DISPLAY = None
20:18:06 DEBUG   opendrift:4808: Time to save animation: 0:00:00.442917
20:18:06 INFO    opendrift:3407: Time to make animation: 0:00:00.458981
20:18:06 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201800Z_profile_fps_4.gif
20:18:07 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201800Z_property_variable_z.png
20:18:07 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201800Z_property_variable_z_mean_True.png
_images/fce31befde4cfcb32831d06a04ba6f65099b9a0018a8925f9e587fc6ce4f4a1d.png _images/b4d1f43757852ae19392764a12000cad6d45b8cbd2cff24a1bdd6a396e5541ae.png _images/db09750bb11ca815a0910c379d8e752957b92d265cd4c6e5f713b04759df070b.png _images/9a2e1e35f3dac2e24042c4b58925f9a1249b4a49efa45cec46d8164a6b7921ec.png

To show the animations:

from IPython.display import Image

gif_filename = out_plots["animation"]["filename"]
Image(filename=gif_filename)
_images/47c4642023ad537178ad2fd1eafc7447200b23a4654b6ef0660fd26b72fcfee6.gif
gif_filename = out_plots["animation_profile"]["filename"]
Image(filename=gif_filename)
_images/92cce8f520aaa6f3b2434e62df0fc761040709b5338282dcba6a0226464ac172.gif

Demo with oil spill scenario

m = ptm.OpenDriftModel(drift_model="OpenOil", lon=-90, lat=28.7, number=10, duration="3h",
                       do3D=False, use_static_masks=True, z=0,
                       ocean_model="TXLA",
                       ocean_model_local=False,
                       start_time="2009-11-19T12:00",
                       plots={'spaghetti': {},
                              'spaghetti2': {'linecolor': 'viscosity', 'cmap': 'cmo.speed'},
                              'animation': {'filetype': 'gif'},
                              'animation2': {'background': 'sea_floor_depth_below_sea_level',
                                             'cmap': 'cmo.deep', 'filetype': 'gif'},
                              'animation_profile': {'filetype': 'gif'},
                              'animation_profile2': {'markersize_scaling': 80, 'cmap': 'cmo.amp',
                                                     'color': 'mass_oil', 'fps': 4, 'filetype': 'gif'},
                              'property': {'variable': 'sea_water_salinity'},
                              'propertymean': {'variable': 'sea_water_salinity', 'mean': True},
                              'oil': {},
})
m.setup_for_simulation()
m.o.set_config('environment:constant:x_wind', 1)
m.o.set_config('environment:constant:y_wind', -1)
m.run_all()
2026-04-09 20:18:08 INFO    root.config_logging.setup_logger:54: Particle tracking manager simulation.
2026-04-09 20:18:08 INFO    root.config_logging.setup_logger:55: Log filename: output-results_2026-04-09T201808Z.log
2026-04-09 20:18:08 INFO    root.config_the_manager.timedir:348: Running model forward in time.
2026-04-09 20:18:08 INFO    root.config_the_manager.timedir:348: Running model forward in time.
2026-04-09 20:18:08 INFO    root.config_ocean_model.register_on_the_fly:230: Registered new ocean model or altered existing ocean model in the registry.
20:18:08 INFO    opendrift:568: OpenDriftSimulation initialised (version 1.14.9)
2026-04-09 20:18:08 WARNING opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:187: Vstretching not found, using 1
2026-04-09 20:18:08 WARNING opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:187: Vstretching not found, using 1
20:18:08 WARNING opendrift.readers.reader_ROMS_native:187: Vstretching not found, using 1
2026-04-09 20:18:08 WARNING opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:310: Duplicate variables for ocean_s_coordinate_g1, selecting s_rho, and discarding s_w
2026-04-09 20:18:08 WARNING opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:310: Duplicate variables for ocean_s_coordinate_g1, selecting s_rho, and discarding s_w
20:18:08 WARNING opendrift.readers.reader_ROMS_native:310: Duplicate variables for ocean_s_coordinate_g1, selecting s_rho, and discarding s_w
2026-04-09 20:18:08 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:317: The following variables without standard_name are discarded: ['angle', 'hc', 'Cs_r', 'Cs_w', 'mask_u', 'mask_v', 'Vtransform', 'pm', 'pn', 'f', 'lon_rho', 'lat_rho', 'ocean_time', 'lon_u', 'lat_u', 'lon_v', 'lat_v']
2026-04-09 20:18:08 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:317: The following variables without standard_name are discarded: ['angle', 'hc', 'Cs_r', 'Cs_w', 'mask_u', 'mask_v', 'Vtransform', 'pm', 'pn', 'f', 'lon_rho', 'lat_rho', 'ocean_time', 'lon_u', 'lat_u', 'lon_v', 'lat_v']
20:18:08 INFO    opendrift.readers.reader_ROMS_native:317: The following variables without standard_name are discarded: ['angle', 'hc', 'Cs_r', 'Cs_w', 'mask_u', 'mask_v', 'Vtransform', 'pm', 'pn', 'f', 'lon_rho', 'lat_rho', 'ocean_time', 'lon_u', 'lat_u', 'lon_v', 'lat_v']
2026-04-09 20:18:08 WARNING opendrift.readers.basereader.structured.structured.__init__:50: No proj string or projection could be derived for reader TXLA, using 'fakeproj'.
2026-04-09 20:18:08 WARNING opendrift.readers.basereader.structured.structured.__init__:50: No proj string or projection could be derived for reader TXLA, using 'fakeproj'.
2026-04-09 20:18:08 WARNING opendrift.readers.basereader.structured.structured.__init__:50: No proj string or projection could be derived for reader TXLA, using 'fakeproj'.
20:18:08 WARNING opendrift.readers.basereader.structured:50: No proj string or projection could be derived for reader TXLA, using 'fakeproj'.
2026-04-09 20:18:08 INFO    opendrift.readers.basereader.structured.structured.__init__:81: Loading previously saved interpolator for lon,lat to x,y conversion.
2026-04-09 20:18:08 INFO    opendrift.readers.basereader.structured.structured.__init__:81: Loading previously saved interpolator for lon,lat to x,y conversion.
2026-04-09 20:18:08 INFO    opendrift.readers.basereader.structured.structured.__init__:81: Loading previously saved interpolator for lon,lat to x,y conversion.
20:18:08 INFO    opendrift.readers.basereader.structured:81: Loading previously saved interpolator for lon,lat to x,y conversion.
20:18:08 INFO    root:296: Using seed_flag "elements".
20:18:08 INFO    root:296: Using seed_flag "elements".
20:18:08 INFO    root:296: Using seed_flag "elements".
2026-04-09 20:18:08 INFO    opendrift.models.openoil.adios.dirjs.dirjs.find_full_oil_from_name:86: Querying ADIOS database for oil: GENERIC BUNKER C
20:18:08 INFO    opendrift.models.openoil.adios.dirjs:86: Querying ADIOS database for oil: GENERIC BUNKER C
2026-04-09 20:18:08 INFO    opendrift.models.openoil.openoil.openoil.seed_elements:1726: Using density 988.1 and viscosity 0.021692333877975794 of oiltype GENERIC BUNKER C
20:18:08 INFO    opendrift.models.openoil.openoil:1726: Using density 988.1 and viscosity 0.021692333877975794 of oiltype GENERIC BUNKER C
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:227: Fallback values will be used for the following variables which have no readers: 
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:227: Fallback values will be used for the following variables which have no readers: 
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:227: Fallback values will be used for the following variables which have no readers: 
20:18:08 INFO    opendrift.models.basemodel.environment:227: Fallback values will be used for the following variables which have no readers: 
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	upward_sea_water_velocity: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	upward_sea_water_velocity: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	upward_sea_water_velocity: 0.000000
20:18:08 INFO    opendrift.models.basemodel.environment:230: 	upward_sea_water_velocity: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_significant_height: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_significant_height: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_significant_height: 0.000000
20:18:08 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_significant_height: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
20:18:08 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
20:18:08 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_period_at_variance_spectral_density_maximum: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_period_at_variance_spectral_density_maximum: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_period_at_variance_spectral_density_maximum: 0.000000
20:18:08 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_period_at_variance_spectral_density_maximum: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment: 0.000000
20:18:08 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_ice_area_fraction: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_ice_area_fraction: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_ice_area_fraction: 0.000000
20:18:08 INFO    opendrift.models.basemodel.environment:230: 	sea_ice_area_fraction: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_ice_x_velocity: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_ice_x_velocity: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_ice_x_velocity: 0.000000
20:18:08 INFO    opendrift.models.basemodel.environment:230: 	sea_ice_x_velocity: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_ice_y_velocity: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_ice_y_velocity: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_ice_y_velocity: 0.000000
20:18:08 INFO    opendrift.models.basemodel.environment:230: 	sea_ice_y_velocity: 0.000000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	ocean_vertical_diffusivity: 0.020000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	ocean_vertical_diffusivity: 0.020000
2026-04-09 20:18:08 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	ocean_vertical_diffusivity: 0.020000
20:18:08 INFO    opendrift.models.basemodel.environment:230: 	ocean_vertical_diffusivity: 0.020000
20:18:08 INFO    root:168: start_time: 2009-11-19 12:00:00, end_time: 2009-11-19 15:00:00, steps: 36, duration: 3h
20:18:09 INFO    root:296: Using seed_flag "elements".
20:18:09 INFO    root:348: Running model forward in time.
20:18:09 INFO    opendrift:1894: Skipping environment variable upward_sea_water_velocity because of condition ['drift:vertical_advection', 'is', False]
20:18:09 INFO    opendrift:1894: Skipping environment variable ocean_vertical_diffusivity because of condition ['drift:vertical_mixing', 'is', False]
20:18:09 INFO    opendrift:1894: Skipping environment variable ocean_mixed_layer_thickness because of condition ['drift:vertical_mixing', 'is', False]
20:18:09 INFO    opendrift:1905: Storing previous values of element property lon because of condition (('general:coastline_action', 'in', ['stranding', 'previous']), 'or', ('general:seafloor_action', 'in', ['previous']))
20:18:09 INFO    opendrift:1905: Storing previous values of element property lat because of condition (('general:coastline_action', 'in', ['stranding', 'previous']), 'or', ('general:seafloor_action', 'in', ['previous']))
20:18:09 INFO    opendrift:947: Using existing reader for land_binary_mask to move elements to ocean
2026-04-09 20:18:09 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_rho:367: Using mask_rho for mask_rho
2026-04-09 20:18:09 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_rho:367: Using mask_rho for mask_rho
20:18:09 INFO    opendrift.readers.reader_ROMS_native:367: Using mask_rho for mask_rho
20:18:09 INFO    opendrift:978: All points are in ocean
2026-04-09 20:18:09 INFO    opendrift.models.openoil.openoil.openoil.prepare_run:697: Oil-water surface tension is 0.035935 Nm
20:18:09 INFO    opendrift.models.openoil.openoil:697: Oil-water surface tension is 0.035935 Nm
2026-04-09 20:18:09 INFO    opendrift.models.openoil.openoil.openoil.prepare_run:710: Max water fraction not available for GENERIC BUNKER C, using default
20:18:09 INFO    opendrift.models.openoil.openoil:710: Max water fraction not available for GENERIC BUNKER C, using default
20:18:09 INFO    opendrift:2202: 2009-11-19 12:00:00 - step 1 of 36 - 10 active elements (0 deactivated)
2026-04-09 20:18:09 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.zeta:418: Using zeta for sea surface height
2026-04-09 20:18:09 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.zeta:418: Using zeta for sea surface height
20:18:09 INFO    opendrift.readers.reader_ROMS_native:418: Using zeta for sea surface height
2026-04-09 20:18:09 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_u:388: Using mask_u for mask_u
2026-04-09 20:18:09 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_u:388: Using mask_u for mask_u
20:18:09 INFO    opendrift.readers.reader_ROMS_native:388: Using mask_u for mask_u
2026-04-09 20:18:09 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.get_variables:639: Time: 0:00:00.103774
2026-04-09 20:18:09 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.get_variables:639: Time: 0:00:00.103774
20:18:09 INFO    opendrift.readers.reader_ROMS_native:639: Time: 0:00:00.103774
2026-04-09 20:18:09 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_v:409: Using mask_v for mask_v
2026-04-09 20:18:09 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_v:409: Using mask_v for mask_v
20:18:09 INFO    opendrift.readers.reader_ROMS_native:409: Using mask_v for mask_v
2026-04-09 20:18:09 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.angle:432: Using angle from Dataset.
2026-04-09 20:18:09 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.angle:432: Using angle from Dataset.
20:18:09 INFO    opendrift.readers.reader_ROMS_native:432: Using angle from Dataset.
20:18:09 INFO    opendrift:2202: 2009-11-19 12:05:00 - step 2 of 36 - 10 active elements (0 deactivated)
20:18:09 INFO    opendrift:2202: 2009-11-19 12:10:00 - step 3 of 36 - 10 active elements (0 deactivated)
20:18:09 INFO    opendrift:2202: 2009-11-19 12:15:00 - step 4 of 36 - 10 active elements (0 deactivated)
20:18:09 INFO    opendrift:2202: 2009-11-19 12:20:00 - step 5 of 36 - 10 active elements (0 deactivated)
20:18:09 INFO    opendrift:2202: 2009-11-19 12:25:00 - step 6 of 36 - 10 active elements (0 deactivated)
20:18:09 INFO    opendrift:2202: 2009-11-19 12:30:00 - step 7 of 36 - 10 active elements (0 deactivated)
20:18:09 INFO    opendrift:2202: 2009-11-19 12:35:00 - step 8 of 36 - 10 active elements (0 deactivated)
20:18:09 INFO    opendrift:2202: 2009-11-19 12:40:00 - step 9 of 36 - 10 active elements (0 deactivated)
20:18:09 INFO    opendrift:2202: 2009-11-19 12:45:00 - step 10 of 36 - 10 active elements (0 deactivated)
20:18:09 INFO    opendrift:2202: 2009-11-19 12:50:00 - step 11 of 36 - 10 active elements (0 deactivated)
20:18:09 INFO    opendrift:2202: 2009-11-19 12:55:00 - step 12 of 36 - 10 active elements (0 deactivated)
20:18:09 INFO    opendrift:2202: 2009-11-19 13:00:00 - step 13 of 36 - 10 active elements (0 deactivated)
20:18:09 INFO    opendrift:2202: 2009-11-19 13:05:00 - step 14 of 36 - 10 active elements (0 deactivated)
20:18:09 INFO    opendrift:2202: 2009-11-19 13:10:00 - step 15 of 36 - 10 active elements (0 deactivated)
20:18:09 INFO    opendrift:2202: 2009-11-19 13:15:00 - step 16 of 36 - 10 active elements (0 deactivated)
20:18:09 INFO    opendrift:2202: 2009-11-19 13:20:00 - step 17 of 36 - 10 active elements (0 deactivated)
20:18:09 INFO    opendrift:2202: 2009-11-19 13:25:00 - step 18 of 36 - 10 active elements (0 deactivated)
20:18:09 INFO    opendrift:2202: 2009-11-19 13:30:00 - step 19 of 36 - 10 active elements (0 deactivated)
20:18:09 INFO    opendrift:2202: 2009-11-19 13:35:00 - step 20 of 36 - 10 active elements (0 deactivated)
20:18:09 INFO    opendrift:2202: 2009-11-19 13:40:00 - step 21 of 36 - 10 active elements (0 deactivated)
20:18:09 INFO    opendrift:2202: 2009-11-19 13:45:00 - step 22 of 36 - 10 active elements (0 deactivated)
20:18:10 INFO    opendrift:2202: 2009-11-19 13:50:00 - step 23 of 36 - 10 active elements (0 deactivated)
20:18:10 INFO    opendrift:2202: 2009-11-19 13:55:00 - step 24 of 36 - 10 active elements (0 deactivated)
20:18:10 INFO    opendrift:2202: 2009-11-19 14:00:00 - step 25 of 36 - 10 active elements (0 deactivated)
20:18:10 INFO    opendrift:2202: 2009-11-19 14:05:00 - step 26 of 36 - 10 active elements (0 deactivated)
20:18:10 INFO    opendrift:2202: 2009-11-19 14:10:00 - step 27 of 36 - 10 active elements (0 deactivated)
20:18:10 INFO    opendrift:2202: 2009-11-19 14:15:00 - step 28 of 36 - 10 active elements (0 deactivated)
20:18:10 INFO    opendrift:2202: 2009-11-19 14:20:00 - step 29 of 36 - 10 active elements (0 deactivated)
20:18:10 INFO    opendrift:2202: 2009-11-19 14:25:00 - step 30 of 36 - 10 active elements (0 deactivated)
20:18:10 INFO    opendrift:2202: 2009-11-19 14:30:00 - step 31 of 36 - 10 active elements (0 deactivated)
20:18:10 INFO    opendrift:2202: 2009-11-19 14:35:00 - step 32 of 36 - 10 active elements (0 deactivated)
20:18:10 INFO    opendrift:2202: 2009-11-19 14:40:00 - step 33 of 36 - 10 active elements (0 deactivated)
20:18:10 INFO    opendrift:2202: 2009-11-19 14:45:00 - step 34 of 36 - 10 active elements (0 deactivated)
20:18:10 INFO    opendrift:2202: 2009-11-19 14:50:00 - step 35 of 36 - 10 active elements (0 deactivated)
20:18:10 INFO    opendrift:2202: 2009-11-19 14:55:00 - step 36 of 36 - 10 active elements (0 deactivated)
20:18:10 WARNING opendrift:2565: Plotting fast. This will make your plots less accurate.
20:18:11 INFO    opendrift:3899: Time to make plot: 0:00:01.447367
20:18:11 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201808Z_spaghetti_fast_True.png
20:18:11 WARNING opendrift:2565: Plotting fast. This will make your plots less accurate.
20:18:13 INFO    opendrift:3899: Time to make plot: 0:00:01.226276
20:18:13 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201808Z_spaghetti_fast_True_linecolor_viscosity_cmap_cmo.speed.png
20:18:13 WARNING opendrift:2565: Plotting fast. This will make your plots less accurate.
20:18:13 INFO    opendrift:4768: Saving animation to output-results_2026-04-09T201808Z_fast_True_fps_4_background_land_binary_mask_cmap_cmo.deep_hide_landmask_True.gif...
20:18:15 INFO    opendrift:3191: Time to make animation: 0:00:02.572031
20:18:15 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201808Z_fast_True_fps_4_background_land_binary_mask_cmap_cmo.deep_hide_landmask_True.gif
20:18:15 WARNING opendrift:2565: Plotting fast. This will make your plots less accurate.
20:18:16 INFO    opendrift:4768: Saving animation to output-results_2026-04-09T201808Z_fast_True_fps_4_background_sea_floor_depth_below_sea_level_cmap_cmo.deep_hide_landmask_True.gif...
20:18:18 INFO    opendrift:3191: Time to make animation: 0:00:02.611355
20:18:18 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201808Z_fast_True_fps_4_background_sea_floor_depth_below_sea_level_cmap_cmo.deep_hide_landmask_True.gif
20:18:18 WARNING py.warnings:110: /home/docs/checkouts/readthedocs.org/user_builds/particle-tracking-manager/conda/stable/lib/python3.13/site-packages/opendrift/models/basemodel/__init__.py:3387: UserWarning: Attempting to set identical low and high ylims makes transformation singular; automatically expanding.
  plt.ylim([zmin, sky])
20:18:18 INFO    opendrift:4768: Saving animation to output-results_2026-04-09T201808Z_profile_fps_4.gif...
20:18:18 INFO    opendrift:3407: Time to make animation: 0:00:00.475883
20:18:18 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201808Z_profile_fps_4.gif
20:18:18 WARNING py.warnings:110: /home/docs/checkouts/readthedocs.org/user_builds/particle-tracking-manager/conda/stable/lib/python3.13/site-packages/opendrift/models/basemodel/__init__.py:3387: UserWarning: Attempting to set identical low and high ylims makes transformation singular; automatically expanding.
  plt.ylim([zmin, sky])
20:18:18 INFO    opendrift:4768: Saving animation to output-results_2026-04-09T201808Z_profile_fps_4_markersize_scaling_80_cmap_cmo.amp_color_mass_oil.gif...
20:18:19 INFO    opendrift:3407: Time to make animation: 0:00:00.521240
20:18:19 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201808Z_profile_fps_4_markersize_scaling_80_cmap_cmo.amp_color_mass_oil.gif
20:18:19 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201808Z_property_variable_sea_water_salinity.png
20:18:19 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201808Z_property_variable_sea_water_salinity_mean_True.png
20:18:20 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201808Z_oil_show_wind_and_current_True_show_watercontent_and_viscosity_True.png
_images/39f18704a640a55ce6690c9b4e42f1b1f9e807aa121cc2b40df332a8ada4be9f.png _images/443c04c2220bac5ed54fac03f61d3c09268ae88dc7fae77e6da55b6d20517573.png _images/66386356d1a08a9b6b814071ec714c9d7a6cbda19a103237c4dc0a5a255e0679.png _images/0d6dc97d568203563805e7e0fc4172b647d6d0a35bd5eb7b8f64fd25d0509002.png
from IPython.display import Image, HTML
import ast

filename = ast.literal_eval(m.config.plots)["oil"]["filename"]
Image(filename=filename)
_images/8a69fc78ec35fa096b595ad898ec7c9fe535848901f1126cd67be9b94d05d18d.png

To show the animations:

gif_filename = ast.literal_eval(m.config.plots)["animation"]["filename"]
Image(filename=gif_filename)
_images/11ec27733b575a2b421b21389a3514c3b9d04608bef2b6ac584a13eaf55a9bfb.gif
gif_filename = ast.literal_eval(m.config.plots)["animation2"]["filename"]
Image(filename=gif_filename)
_images/d8bb3a779aa31aba0e7e7f9d9ec62f9a7ebc6fdafe69c68ce0ff37260ebf67ab.gif
gif_filename = ast.literal_eval(m.config.plots)["animation_profile"]["filename"]
Image(filename=gif_filename)
_images/1652707e369441de48550b2826c42767a74b947fb3a09967cd05ea1ed58da688.gif
gif_filename = ast.literal_eval(m.config.plots)["animation_profile2"]["filename"]
Image(filename=gif_filename)
_images/84b444fc3523b02f0b273bf84925f7abf49814a8f3e5d67ecc25e80e381dd1e6.gif