Tutorial

Particle Tracking Manager (PTM) is a wrapper around particle tracking codes to easily run particle simulations in select (or user-input) ocean models. Currently, OpenDrift is included. In this tutorial we demonstrate using the five wrapped drift models from OpenDrift along with some high level configuration changes.

import xarray as xr
import particle_tracking_manager as ptm
import xroms
import cmocean.cm as cmo
import pprint
/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

After a drift simulation is run, results can be found in file with name m.config.output_file. Detailed information on ocean models is available Ocean Model Configuration. The example below use the user-defined “TXLA” ocean model.

OceanDrift (Physics)

This model can run in 2D or 3D with or without horizontal or vertical mixing, wind drift, Stokes drift, etc.

Initialize manager m

m = ptm.OpenDriftModel(lon=-90, lat=28.7, number=10, steps=40,
                       z=-5, do3D=True, horizontal_diffusivity=100,
                       ocean_model="TXLA",
                       ocean_model_local=False,
                       start_time="2009-11-19T12:00",
                       plots={'spaghetti': {'linecolor': 'z', 'cmap': 'cmo.deep'}})
2026-04-09 20:18:54 INFO    root.config_logging.setup_logger:54: Particle tracking manager simulation.
2026-04-09 20:18:54 INFO    root.config_logging.setup_logger:55: Log filename: output-results_2026-04-09T201854Z.log
2026-04-09 20:18:54 INFO    root.config_the_manager.timedir:348: Running model forward in time.
2026-04-09 20:18:54 INFO    root.config_the_manager.timedir:348: Running model forward in time.
2026-04-09 20:18:54 INFO    root.config_ocean_model.register_on_the_fly:230: Registered new ocean model or altered existing ocean model in the registry.

The configuration parameters for this simulation are:

pprint.pprint(m.config.model_dump())
2026-04-09 20:18:54 INFO    root.config_the_manager.seed_flag:296: Using seed_flag "elements".
2026-04-09 20:18:54 INFO    root.config_the_manager.timedir:348: Running model forward in time.
{'coastline_action': 'stranding',
 'current_uncertainty': 0.0,
 'diffusivitymodel': 'windspeed_Large1994',
 'do3D': True,
 'drift_model': 'OceanDrift',
 'duration': 'P0DT3H20M0S',
 'end_time': datetime.datetime(2009, 11, 19, 15, 20),
 'export_variables': None,
 'geojson': None,
 'horizontal_diffusivity': 100.0,
 'interpolator_filename': PosixPath('/home/docs/.cache/particle-tracking-manager/TXLA_interpolator.pickle'),
 'lat': 28.7,
 'log_level': 'INFO',
 'lon': -90.0,
 'max_speed': 20.0,
 'mixed_layer_depth': 20.0,
 'model': 'opendrift',
 'number': 10,
 'ocean_model': 'TXLA',
 'ocean_model_config': {'chunks': None,
                        'dx': 1000.0,
                        'end_time_fixed': datetime.datetime(2009, 11, 19, 16, 0),
                        'kerchunk_func_str': None,
                        'lat_max': 30.62933797,
                        'lat_min': 27.48800453,
                        'loc_remote': '/home/docs/.cache/xroms/ROMS_example_full_grid.nc',
                        'lon_max': -88.0137713,
                        'lon_min': -93.04208536,
                        'model_drop_vars': [],
                        'name': 'TXLA',
                        'oceanmodel_lon0_360': False,
                        'standard_name_mapping': {'mask_rho': 'land_binary_mask'},
                        'start_time_model': datetime.datetime(2009, 11, 19, 12, 0),
                        'temporal_resolution_str': 'PT1H'},
 'ocean_model_local': False,
 'ocean_model_simulation': {'ocean_model_local': False},
 'output_file': PosixPath('output-results_2026-04-09T201854Z.nc'),
 'output_format': 'netcdf',
 'plots': {'spaghetti': {'cmap': 'cmo.deep', 'linecolor': 'z'}},
 'radius': 1000.0,
 'radius_type': 'gaussian',
 'run_forward': True,
 'save_interpolator': True,
 'seafloor_action': 'lift_to_seafloor',
 'seed_flag': 'elements',
 'seed_seafloor': False,
 'start_time': datetime.datetime(2009, 11, 19, 12, 0),
 'start_time_end': None,
 'steps': 40,
 'stokes_drift': True,
 'time_step': 300.0,
 'time_step_output': 3600.0,
 'time_step_output_integer': 12,
 'timedir': 1,
 'use_auto_landmask': False,
 'use_cache': True,
 'use_static_masks': False,
 'vertical_advection_at_surface': True,
 'vertical_mixing': True,
 'vertical_mixing_at_surface': True,
 'vertical_mixing_timestep': 60.0,
 'wind_drift': True,
 'wind_drift_depth': 0.1,
 'wind_drift_factor': 0.02,
 'wind_uncertainty': 0.0,
 'z': -5.0}

Run

m.run_all()
20:18:57 INFO    opendrift:568: OpenDriftSimulation initialised (version 1.14.9)
2026-04-09 20:18:57 WARNING opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:187: Vstretching not found, using 1
2026-04-09 20:18:57 WARNING opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:187: Vstretching not found, using 1
20:18:57 WARNING opendrift.readers.reader_ROMS_native:187: Vstretching not found, using 1
2026-04-09 20:18:57 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:57 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:57 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:57 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:57 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:57 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:57 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:57 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:57 WARNING opendrift.readers.basereader.structured.structured.__init__:50: No proj string or projection could be derived for reader TXLA, using 'fakeproj'.
20:18:57 WARNING opendrift.readers.basereader.structured:50: No proj string or projection could be derived for reader TXLA, using 'fakeproj'.
2026-04-09 20:18:57 INFO    opendrift.readers.basereader.structured.structured.__init__:81: Loading previously saved interpolator for lon,lat to x,y conversion.
2026-04-09 20:18:57 INFO    opendrift.readers.basereader.structured.structured.__init__:81: Loading previously saved interpolator for lon,lat to x,y conversion.
2026-04-09 20:18:57 INFO    opendrift.readers.basereader.structured.structured.__init__:81: Loading previously saved interpolator for lon,lat to x,y conversion.
20:18:57 INFO    opendrift.readers.basereader.structured:81: Loading previously saved interpolator for lon,lat to x,y conversion.
20:18:57 INFO    root:296: Using seed_flag "elements".
20:18:57 INFO    root:296: Using seed_flag "elements".
20:18:57 INFO    root:296: Using seed_flag "elements".
20:18:57 INFO    opendrift.models.basemodel.environment:227: Fallback values will be used for the following variables which have no readers: 
20:18:57 INFO    opendrift.models.basemodel.environment:230: 	x_wind: 0.000000
20:18:57 INFO    opendrift.models.basemodel.environment:230: 	y_wind: 0.000000
20:18:57 INFO    opendrift.models.basemodel.environment:230: 	upward_sea_water_velocity: 0.000000
20:18:57 INFO    opendrift.models.basemodel.environment:230: 	ocean_vertical_diffusivity: 0.000000
20:18:57 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_significant_height: 0.000000
20:18:57 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
20:18:57 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
20:18:57 INFO    root:168: start_time: 2009-11-19 12:00:00, end_time: 2009-11-19 15:20:00, steps: 40, duration: P0DT3H20M0S
20:18:57 INFO    root:296: Using seed_flag "elements".
20:18:57 INFO    root:348: Running model forward in time.
20:18:57 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:57 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:57 INFO    opendrift:1913: Storing previous values of environment variable sea_surface_height because of condition ['drift:vertical_advection', 'is', True]
20:18:57 WARNING opendrift:1993: Simulation end is not at an output time step. Extending duration from 3:20:00 to 4:00:00
20:18:57 INFO    opendrift:947: Using existing reader for land_binary_mask to move elements to ocean
2026-04-09 20:18:57 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_rho:367: Using mask_rho for mask_rho
2026-04-09 20:18:57 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_rho:367: Using mask_rho for mask_rho
20:18:57 INFO    opendrift.readers.reader_ROMS_native:367: Using mask_rho for mask_rho
20:18:57 INFO    opendrift:978: All points are in ocean
20:18:57 INFO    opendrift:2202: 2009-11-19 12:00:00 - step 1 of 48 - 10 active elements (0 deactivated)
2026-04-09 20:18:58 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.zeta:418: Using zeta for sea surface height
2026-04-09 20:18:58 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.zeta:418: Using zeta for sea surface height
20:18:58 INFO    opendrift.readers.reader_ROMS_native:418: Using zeta for sea surface height
2026-04-09 20:18:58 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_u:388: Using mask_u for mask_u
2026-04-09 20:18:58 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_u:388: Using mask_u for mask_u
20:18:58 INFO    opendrift.readers.reader_ROMS_native:388: Using mask_u for mask_u
2026-04-09 20:18:58 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.get_variables:639: Time: 0:00:00.116958
2026-04-09 20:18:58 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.get_variables:639: Time: 0:00:00.116958
20:18:58 INFO    opendrift.readers.reader_ROMS_native:639: Time: 0:00:00.116958
2026-04-09 20:18:58 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_v:409: Using mask_v for mask_v
2026-04-09 20:18:58 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_v:409: Using mask_v for mask_v
20:18:58 INFO    opendrift.readers.reader_ROMS_native:409: Using mask_v for mask_v
2026-04-09 20:18:58 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.angle:432: Using angle from Dataset.
2026-04-09 20:18:58 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.angle:432: Using angle from Dataset.
20:18:58 INFO    opendrift.readers.reader_ROMS_native:432: Using angle from Dataset.
20:18:58 INFO    opendrift:2202: 2009-11-19 12:05:00 - step 2 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 12:10:00 - step 3 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 12:15:00 - step 4 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 12:20:00 - step 5 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 12:25:00 - step 6 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 12:30:00 - step 7 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 12:35:00 - step 8 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 12:40:00 - step 9 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 12:45:00 - step 10 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 12:50:00 - step 11 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 12:55:00 - step 12 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 13:00:00 - step 13 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 13:05:00 - step 14 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 13:10:00 - step 15 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 13:15:00 - step 16 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 13:20:00 - step 17 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 13:25:00 - step 18 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 13:30:00 - step 19 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 13:35:00 - step 20 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 13:40:00 - step 21 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 13:45:00 - step 22 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 13:50:00 - step 23 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 13:55:00 - step 24 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 14:00:00 - step 25 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 14:05:00 - step 26 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 14:10:00 - step 27 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 14:15:00 - step 28 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 14:20:00 - step 29 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 14:25:00 - step 30 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 14:30:00 - step 31 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 14:35:00 - step 32 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 14:40:00 - step 33 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 14:45:00 - step 34 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 14:50:00 - step 35 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 14:55:00 - step 36 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 15:00:00 - step 37 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 15:05:00 - step 38 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 15:10:00 - step 39 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 15:15:00 - step 40 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 15:20:00 - step 41 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 15:25:00 - step 42 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 15:30:00 - step 43 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 15:35:00 - step 44 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 15:40:00 - step 45 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 15:45:00 - step 46 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 15:50:00 - step 47 of 48 - 10 active elements (0 deactivated)
20:18:58 INFO    opendrift:2202: 2009-11-19 15:55:00 - step 48 of 48 - 10 active elements (0 deactivated)
20:18:59 WARNING opendrift:2565: Plotting fast. This will make your plots less accurate.
20:19:03 INFO    opendrift:3899: Time to make plot: 0:00:04.521392
20:19:03 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201854Z_spaghetti_fast_True_linecolor_z_cmap_cmo.deep.png
_images/9d9f9a389f26920a5dd5f61ef80b98df6423090f882f702970d7d9eefd37403f.png

Phytoplankton

The goal of this scenario is to examine the transport of phytoplankton (e.g. harmful algal blooms) forward in time or run backward in time to determine where a bloom originated. Optional vertical behavior modes allow particles to actively seek preferred depths or perform diel vertical migration.

More detail about the model framework is available in Drift Model Details and Species Reference, including suggested parameter values for specific species of interest.

Initialize manager m

The key parameters for this model are the vertical behavior mode and associated depth settings. The two vertical behavior modes are:

  • depth: particles maintain a preferred depth band around z_pref

  • dvm: diel vertical migration between z_day (daytime) and z_night (nighttime)

m = ptm.OpenDriftModel(drift_model="Phytoplankton", lon=-89.8, lat=29.08,
                       number=10, steps=40,
                       ocean_model="TXLA",
                       start_time="2009-11-19T12:00",
                       ocean_model_local=False,
                       vertical_behavior_mode="dvm",
                       w_active=0.001,
                       z_day=-20.0, z_night=-5.0,
                       plots={'spaghetti': {}})
2026-04-09 20:19:04 INFO    root.config_logging.setup_logger:54: Particle tracking manager simulation.
2026-04-09 20:19:04 INFO    root.config_logging.setup_logger:55: Log filename: output-results_2026-04-09T201904Z.log
2026-04-09 20:19:04 INFO    root.config_the_manager.timedir:348: Running model forward in time.
2026-04-09 20:19:04 INFO    root.config_the_manager.timedir:348: Running model forward in time.
2026-04-09 20:19:04 INFO    root.config_ocean_model.register_on_the_fly:230: Registered new ocean model or altered existing ocean model in the registry.

The full set of configuration options for this scenario:

import json
schema = ptm.PhytoplanktonModelConfig.model_json_schema()
print(json.dumps(schema, indent=2))
{
  "$defs": {
    "CoastlineActionEnum": {
      "description": "Enum for coastline actions used in OpenDrift.",
      "enum": [
        "none",
        "stranding",
        "previous"
      ],
      "title": "CoastlineActionEnum",
      "type": "string"
    },
    "DiffusivityModelEnum": {
      "description": "Enum for diffusivity models used in OpenDrift.",
      "enum": [
        "environment",
        "stepfunction",
        "windspeed_Sundby1983",
        "windspeed_Large1994",
        "gls_tke",
        "constant"
      ],
      "title": "DiffusivityModelEnum",
      "type": "string"
    },
    "DriftModelEnum": {
      "description": "Enum for drift models used in OpenDrift.",
      "enum": [
        "OceanDrift",
        "LarvalFish",
        "Phytoplankton",
        "OpenOil",
        "Leeway"
      ],
      "title": "DriftModelEnum",
      "type": "string"
    },
    "LogLevelEnum": {
      "description": "Log verbosity.",
      "enum": [
        "DEBUG",
        "INFO",
        "WARNING",
        "ERROR",
        "CRITICAL"
      ],
      "title": "LogLevelEnum",
      "type": "string"
    },
    "ModelEnum": {
      "description": "Lagrangian model software to use for simulation.",
      "enum": [
        "opendrift"
      ],
      "title": "ModelEnum",
      "type": "string"
    },
    "OceanModelEnum": {
      "enum": [
        "NWGOA",
        "CIOFSOP",
        "CIOFS3",
        "CIOFSFRESH",
        "CIOFS",
        "ONTHEFLY",
        "TXLA"
      ],
      "title": "OceanModelEnum",
      "type": "string"
    },
    "OutputFormatEnum": {
      "description": "Output file format.",
      "enum": [
        "netcdf",
        "parquet",
        "both"
      ],
      "title": "OutputFormatEnum",
      "type": "string"
    },
    "RadiusTypeEnum": {
      "description": "Enum for radius types used in OpenDrift.",
      "enum": [
        "gaussian",
        "uniform"
      ],
      "title": "RadiusTypeEnum",
      "type": "string"
    },
    "SeafloorActionEnum": {
      "description": "Enum for seafloor actions used in OpenDrift.",
      "enum": [
        "none",
        "lift_to_seafloor",
        "deactivate",
        "previous"
      ],
      "title": "SeafloorActionEnum",
      "type": "string"
    },
    "VerticalBehaviorModeEnum": {
      "description": "Enum for vertical behavior modes in biological models.",
      "enum": [
        "none",
        "depth",
        "dvm"
      ],
      "title": "VerticalBehaviorModeEnum",
      "type": "string"
    }
  },
  "additionalProperties": false,
  "description": "Phytoplankton (HAB) model configuration for OpenDrift.\n\nUses the OpenDrift LarvalFish model internally but configured for\nphytoplankton particle tracking (no egg stage, no growth/weight).\nTransport-focused with optional vertical behavior (depth or DVM).",
  "properties": {
    "model": {
      "$ref": "#/$defs/ModelEnum",
      "default": "opendrift",
      "ptm_level": 1
    },
    "lon": {
      "anyOf": [
        {
          "maximum": 180,
          "minimum": -180,
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Central longitude for seeding drifters. If this is set, `lat` should also be set, and `geojson` should be None.",
      "ptm_level": 1,
      "title": "Lon",
      "units": "degrees_east"
    },
    "lat": {
      "anyOf": [
        {
          "maximum": 90,
          "minimum": -90,
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Central latitude for seeding drifters. If this is set, `lon` should also be set, and `geojson` should be None.",
      "ptm_level": 1,
      "title": "Lat",
      "units": "degrees_north"
    },
    "geojson": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "GeoJSON describing a polygon within which to seed drifters; must contain \"geometry\". If this is set, `lon` and `lat` should be None.",
      "ptm_level": 1,
      "title": "Geojson"
    },
    "start_time": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": "2022-01-01T00:00:00",
      "description": "Start time for drifter simulation. start_time or end_time must be input. If a timezone is included, it will be used and the time will be converted to UTC which is the same timezone as the models.",
      "ptm_level": 1,
      "title": "Start Time"
    },
    "start_time_end": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "If used, this creates a range of start times for drifters, starting with `start_time` and ending with `start_time_end`. Drifters will be initialized linearly between the two start times. If a timezone is included, it will be used and the time will be converted to UTC which is the same timezone as the models.",
      "ptm_level": 2,
      "title": "Start Time End"
    },
    "run_forward": {
      "default": true,
      "description": "Run forward in time.",
      "ptm_level": 2,
      "title": "Run Forward",
      "type": "boolean"
    },
    "time_step": {
      "default": 300,
      "description": "Interval between particles updates, in seconds.",
      "maximum": 1440,
      "minimum": 0.01,
      "ptm_level": 3,
      "title": "Time Step",
      "type": "number",
      "units": "seconds"
    },
    "time_step_output_integer": {
      "default": 12,
      "description": "Time step at which element properties are stored and eventually written to file, calculated as time_step*time_step_output_integer. This must be an integer multiple of this.",
      "maximum": 300,
      "minimum": 1,
      "ptm_level": 3,
      "title": "Time Step Output Integer",
      "type": "integer",
      "units": ""
    },
    "steps": {
      "anyOf": [
        {
          "maximum": 10000,
          "minimum": 1,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Maximum number of steps. End of simulation will be start_time + steps * time_step.",
      "ptm_level": 1,
      "title": "Steps"
    },
    "duration": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Duration should be input as a string of ISO 8601. The length of the simulation. steps, end_time, or duration must be input by user.",
      "ptm_level": 1,
      "title": "Duration"
    },
    "end_time": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The end of the simulation. steps, end_time, or duration must be input by user. start_time or end_time must be input. If a timezone is included, it will be used and the time will be converted to UTC which is the same timezone as the models.",
      "ptm_level": 1,
      "title": "End Time"
    },
    "ocean_model": {
      "$ref": "#/$defs/OceanModelEnum",
      "default": "CIOFSOP",
      "description": "Name of ocean model to use for driving drifter simulation.",
      "ptm_level": 1
    },
    "ocean_model_local": {
      "default": true,
      "description": "Set to True to use local version of known `ocean_model` instead of remote version.",
      "ptm_level": 3,
      "title": "Ocean Model Local",
      "type": "boolean"
    },
    "do3D": {
      "default": true,
      "description": "Set to True to run drifters in 3D, by default False for most drift models.",
      "ptm_level": 1,
      "title": "Do3D",
      "type": "boolean"
    },
    "use_static_masks": {
      "default": false,
      "description": "If True, use static ocean model land masks. This saves some computation time but since the available ocean models run in wet/dry mode, it is inconsistent with the ROMS output files in some places since the drifters may be allowed (due to the static mask) to enter a cell they wouldn't otherwise. However, it doesn't make much of a difference for simulations that aren't in the tidal flats. Use the time-varying wet/dry masks (set to False) if drifters are expected to run in the tidal flats. This costs some more computational time but is fully consistent with the ROMS output files.",
      "ptm_level": 3,
      "title": "Use Static Masks",
      "type": "boolean"
    },
    "output_file": {
      "anyOf": [
        {
          "format": "path",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Name of file to write output to. If None, default name is used.",
      "ptm_level": 3,
      "title": "Output File"
    },
    "output_format": {
      "$ref": "#/$defs/OutputFormatEnum",
      "default": "netcdf",
      "description": "Output file format. Options are \"netcdf\", \"parquet\", or \"both\".",
      "ptm_level": 2
    },
    "use_cache": {
      "default": true,
      "description": "Set to True to use cache for storing interpolators.",
      "ptm_level": 3,
      "title": "Use Cache",
      "type": "boolean"
    },
    "log_level": {
      "$ref": "#/$defs/LogLevelEnum",
      "default": "INFO",
      "description": "Log verbosity",
      "ptm_level": 3
    },
    "horizontal_diffusivity": {
      "anyOf": [
        {
          "maximum": 100000,
          "minimum": 0,
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Add horizontal diffusivity (random walk). For known ocean models, the value is calculated as the approximate horizontal grid resolution for the selected ocean model times an estimate of the scale of sub-gridscale velocity of 0.1 m/s.",
      "od_mapping": "environment:constant:horizontal_diffusivity",
      "ptm_level": 2,
      "title": "Horizontal Diffusivity",
      "units": "m2/s"
    },
    "stokes_drift": {
      "default": false,
      "description": "Advection elements with Stokes drift (wave orbital motion).",
      "od_mapping": "drift:stokes_drift",
      "ptm_level": 2,
      "title": "Stokes Drift",
      "type": "boolean"
    },
    "z": {
      "anyOf": [
        {
          "maximum": 0,
          "minimum": -10000,
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": 0,
      "description": "Depth below sea level where elements are released. This depth is neglected if seafloor seeding is set selected.",
      "od_mapping": "seed:z",
      "ptm_level": 1,
      "title": "Z",
      "units": "m"
    },
    "number": {
      "default": 1,
      "description": "The number of elements for the simulation.",
      "minimum": 1,
      "od_mapping": "seed:number",
      "ptm_level": 1,
      "title": "Number",
      "type": "integer",
      "units": 1
    },
    "drift_model": {
      "$ref": "#/$defs/DriftModelEnum",
      "default": "Phytoplankton"
    },
    "save_interpolator": {
      "default": false,
      "description": "Whether to save the interpolator.",
      "title": "Save Interpolator",
      "type": "boolean"
    },
    "interpolator_filename": {
      "anyOf": [
        {
          "format": "path",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filename to save interpolator to or read interpolator from. Exclude suffix (which should be .pickle).",
      "ptm_level": 3,
      "title": "Interpolator Filename"
    },
    "export_variables": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "List of variables to export. Options available with `m.all_export_variables` for a given `drift_model`. ['lon', 'lat', 'ID', 'status', 'z'] will always be exported. Default of None means all possible variables are exported.",
      "ptm_level": 3,
      "title": "Export Variables"
    },
    "plots": {
      "anyOf": [
        {
          "additionalProperties": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "object"
        },
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Dictionary of plots to generate using OpenDrift.",
      "ptm_level": 1,
      "title": "Plots"
    },
    "radius": {
      "default": 1000.0,
      "description": "Radius around each lon-lat pair, within which particles will be seeded according to `radius_type`.",
      "maximum": 1000000,
      "minimum": 0.0,
      "ptm_level": 2,
      "title": "Radius",
      "type": "number",
      "units": "m"
    },
    "radius_type": {
      "$ref": "#/$defs/RadiusTypeEnum",
      "default": "gaussian",
      "description": "Distribution for seeding particles around location. Options: 'gaussian' or 'uniform'.",
      "ptm_level": 3
    },
    "max_speed": {
      "default": 20.0,
      "description": "Typical maximum speed of elements, used to estimate reader buffer size",
      "exclusiveMinimum": 0,
      "od_mapping": "drift:max_speed",
      "ptm_level": 1,
      "title": "Maximum speed",
      "type": "number",
      "units": "m/s"
    },
    "use_auto_landmask": {
      "default": false,
      "description": "If True, use a global-scale land mask from https://www.generic-mapping-tools.org/remote-datasets/earth-mask.html. Dataset scale selected is `auto`. If False, use the land mask from the ocean model.",
      "od_mapping": "general:use_auto_landmask",
      "ptm_level": 3,
      "title": "Use Auto Landmask",
      "type": "boolean"
    },
    "coastline_action": {
      "$ref": "#/$defs/CoastlineActionEnum",
      "default": "stranding",
      "description": "This controls particle behavior at the coastline. Use `previous` for a particle to move back to its previous location if it hits land. Use `stranding` to have a particle stick (that is, become deactivated) where it interacts with land. With None, objects may also move over land.",
      "od_mapping": "general:coastline_action",
      "ptm_level": 2,
      "title": "Coastline Action"
    },
    "current_uncertainty": {
      "default": 0,
      "description": "Add gaussian perturbation with this standard deviation to current components at each time step",
      "maximum": 5,
      "minimum": 0,
      "od_mapping": "drift:current_uncertainty",
      "ptm_level": 2,
      "title": "Current Uncertainty",
      "type": "number",
      "units": "m/s"
    },
    "wind_uncertainty": {
      "default": 0,
      "description": "Add gaussian perturbation with this standard deviation to wind components at each time step.",
      "maximum": 5,
      "minimum": 0,
      "od_mapping": "drift:wind_uncertainty",
      "ptm_level": 2,
      "title": "Wind Uncertainty",
      "type": "number",
      "units": "m/s"
    },
    "seed_seafloor": {
      "default": false,
      "description": "Elements are seeded at seafloor, and seeding depth (z) is neglected and must be None.",
      "od_mapping": "seed:seafloor",
      "ptm_level": 2,
      "title": "Seed Seafloor",
      "type": "boolean"
    },
    "diffusivitymodel": {
      "$ref": "#/$defs/DiffusivityModelEnum",
      "default": "windspeed_Large1994",
      "description": "Algorithm/source used for profile of vertical diffusivity. Environment means that diffusivity is acquired from readers or environment constants/fallback. Parameterizations based on wind speed are also available.",
      "od_mapping": "vertical_mixing:diffusivitymodel",
      "ptm_level": 3,
      "title": "Diffusivity model",
      "units": "seconds"
    },
    "mixed_layer_depth": {
      "default": 20,
      "description": "mixed_layer_depth controls how deep the vertical diffusivity profile reaches. This sets the fallback value for ocean_mixed_layer_thickness if not available from any reader.",
      "minimum": 0.0,
      "od_mapping": "environment:constant:ocean_mixed_layer_thickness",
      "ptm_level": 3,
      "title": "Mixed Layer Depth",
      "type": "number",
      "units": "m"
    },
    "seafloor_action": {
      "$ref": "#/$defs/SeafloorActionEnum",
      "default": "lift_to_seafloor",
      "description": "This controls particle behavior at the seafloor. Use `deactivate` to stick particles to the seafloor at the point of interaction. Use `lift_to_seafloor` to elevate particles up to seabed if below. User `previous` to move elements back to previous position. Use None to ignore seafloor.",
      "od_mapping": "general:seafloor_action",
      "ptm_level": 2,
      "title": "Seafloor Action"
    },
    "wind_drift": {
      "default": true,
      "description": "If on, elements at surface are moved with a fraction, the wind draft factor, of the wind speed from the surface down to the wind drift depth.",
      "ptm_level": 1,
      "title": "Wind Drift",
      "type": "boolean"
    },
    "wind_drift_depth": {
      "default": 0.1,
      "description": "The direct wind drift (windage) is linearly decreasing from the surface value (wind_drift_factor) until 0 at this depth.",
      "maximum": 1,
      "minimum": 0,
      "od_mapping": "drift:wind_drift_depth",
      "ptm_level": 3,
      "title": "Wind Drift Depth",
      "type": "number",
      "units": "meters"
    },
    "vertical_mixing_timestep": {
      "default": 60,
      "description": "Time step used for inner (fast) loop of the vertical mixing model. Set this smaller to increase frequency of vertical mixing calculation; number of loops is calculated as int(self.time_step/vertical_mixing_timestep) so vertical_mixing_timestep must be smaller than time_step.",
      "maximum": 3600,
      "minimum": 0.1,
      "od_mapping": "vertical_mixing:timestep",
      "ptm_level": 3,
      "title": "Vertical Mixing Timestep",
      "type": "number",
      "units": "seconds"
    },
    "wind_drift_factor": {
      "default": 0.0,
      "description": "Elements at surface are moved with this fraction of the wind vector, in addition to currents and Stokes drift. Multiply by 100 to get the percent windage.",
      "maximum": 0.1,
      "minimum": 0,
      "od_mapping": "seed:wind_drift_factor",
      "ptm_level": 2,
      "title": "Wind Drift Factor",
      "type": "number",
      "units": "1"
    },
    "vertical_mixing": {
      "default": true,
      "description": "Activate vertical mixing scheme. Vertical mixing includes movement due to buoyancy and turbulent mixing.",
      "od_mapping": "drift:vertical_mixing",
      "ptm_level": 2,
      "title": "Vertical Mixing",
      "type": "boolean"
    },
    "vertical_mixing_at_surface": {
      "default": true,
      "description": "If vertical mixing is activated, surface elements (z=0) can only be mixed (downwards) if this setting it True.",
      "od_mapping": "drift:vertical_mixing_at_surface",
      "ptm_level": 2,
      "title": "Vertical Mixing At Surface",
      "type": "boolean"
    },
    "vertical_advection_at_surface": {
      "default": false,
      "description": "If vertical advection is activated, surface elements (z=0) can only be advected (downwards) if this setting it True.",
      "od_mapping": "drift:vertical_advection_at_surface",
      "ptm_level": 2,
      "title": "Vertical Advection At Surface",
      "type": "boolean"
    },
    "vertical_behavior_mode": {
      "$ref": "#/$defs/VerticalBehaviorModeEnum",
      "default": "dvm",
      "description": "Vertical behavior mode. none: passive. depth: maintain preferred depth band. dvm: diel vertical migration.",
      "od_mapping": "biology:vertical_behavior_mode",
      "ptm_level": 1,
      "title": "Vertical Behavior Mode"
    },
    "w_active": {
      "default": 0.001,
      "description": "Maximum active vertical positioning speed (effective swimming/buoyancy regulation).",
      "maximum": 1.0,
      "minimum": 0.0,
      "od_mapping": "biology:w_active",
      "ptm_level": 1,
      "title": "Vertical Speed",
      "type": "number",
      "units": "m/s"
    },
    "z_pref": {
      "default": -10.0,
      "description": "Preferred depth for depth mode (negative down from surface). Used when vertical_behavior_mode is 'depth'.",
      "maximum": 0.0,
      "minimum": -10000,
      "od_mapping": "biology:z_pref",
      "ptm_level": 1,
      "title": "Preferred Depth",
      "type": "number",
      "units": "m"
    },
    "z_day": {
      "default": -25.0,
      "description": "Target depth during daytime for DVM mode (negative down from surface). Used when vertical_behavior_mode is 'dvm'.",
      "maximum": 0.0,
      "minimum": -10000,
      "od_mapping": "biology:z_day",
      "ptm_level": 1,
      "title": "Day Depth",
      "type": "number",
      "units": "m"
    },
    "z_night": {
      "default": -5.0,
      "description": "Target depth during nighttime for DVM mode (negative down from surface). Used when vertical_behavior_mode is 'dvm'.",
      "maximum": 0.0,
      "minimum": -10000,
      "od_mapping": "biology:z_night",
      "ptm_level": 1,
      "title": "Night Depth",
      "type": "number",
      "units": "m"
    },
    "dz_min": {
      "default": 1.0,
      "description": "Minimum half-width for depth bands (internal parameter).",
      "maximum": 100,
      "minimum": 0.1,
      "od_mapping": "biology:dz_min",
      "ptm_level": 3,
      "title": "Min Band Half-Width",
      "type": "number",
      "units": "m"
    },
    "dz_rel": {
      "default": 0.1,
      "description": "Relative depth band expansion factor (internal parameter).",
      "maximum": 1.0,
      "minimum": 0.0,
      "od_mapping": "biology:dz_rel",
      "ptm_level": 3,
      "title": "Relative Band Factor",
      "type": "number",
      "units": "fraction"
    },
    "dz_max": {
      "default": 15.0,
      "description": "Maximum half-width for depth bands (internal parameter).",
      "maximum": 1000,
      "minimum": 0.1,
      "od_mapping": "biology:dz_max",
      "ptm_level": 3,
      "title": "Max Band Half-Width",
      "type": "number",
      "units": "m"
    }
  },
  "title": "PhytoplanktonModelConfig",
  "type": "object"
}

The configuration parameters for this simulation are:

pprint.pprint(m.config.model_dump())
2026-04-09 20:19:04 INFO    root.config_the_manager.seed_flag:296: Using seed_flag "elements".
2026-04-09 20:19:04 INFO    root.config_the_manager.timedir:348: Running model forward in time.
{'coastline_action': 'stranding',
 'current_uncertainty': 0.0,
 'diffusivitymodel': 'windspeed_Large1994',
 'do3D': True,
 'drift_model': 'Phytoplankton',
 'duration': 'P0DT3H20M0S',
 'dz_max': 15.0,
 'dz_min': 1.0,
 'dz_rel': 0.1,
 'end_time': datetime.datetime(2009, 11, 19, 15, 20),
 'export_variables': None,
 'geojson': None,
 'horizontal_diffusivity': 100.0,
 'interpolator_filename': PosixPath('/home/docs/.cache/particle-tracking-manager/TXLA_interpolator.pickle'),
 'lat': 29.08,
 'log_level': 'INFO',
 'lon': -89.8,
 'max_speed': 20.0,
 'mixed_layer_depth': 20.0,
 'model': 'opendrift',
 'number': 10,
 'ocean_model': 'TXLA',
 'ocean_model_config': {'chunks': None,
                        'dx': 1000.0,
                        'end_time_fixed': datetime.datetime(2009, 11, 19, 16, 0),
                        'kerchunk_func_str': None,
                        'lat_max': 30.62933797,
                        'lat_min': 27.48800453,
                        'loc_remote': '/home/docs/.cache/xroms/ROMS_example_full_grid.nc',
                        'lon_max': -88.0137713,
                        'lon_min': -93.04208536,
                        'model_drop_vars': [],
                        'name': 'TXLA',
                        'oceanmodel_lon0_360': False,
                        'standard_name_mapping': {'mask_rho': 'land_binary_mask'},
                        'start_time_model': datetime.datetime(2009, 11, 19, 12, 0),
                        'temporal_resolution_str': 'PT1H'},
 'ocean_model_local': False,
 'ocean_model_simulation': {'ocean_model_local': False},
 'output_file': PosixPath('output-results_2026-04-09T201904Z.nc'),
 'output_format': 'netcdf',
 'plots': {'spaghetti': {}},
 'radius': 1000.0,
 'radius_type': 'gaussian',
 'run_forward': True,
 'save_interpolator': True,
 'seafloor_action': 'lift_to_seafloor',
 'seed_flag': 'elements',
 'seed_seafloor': False,
 'start_time': datetime.datetime(2009, 11, 19, 12, 0),
 'start_time_end': None,
 'steps': 40,
 'stokes_drift': False,
 'time_step': 300.0,
 'time_step_output': 3600.0,
 'time_step_output_integer': 12,
 'timedir': 1,
 'use_auto_landmask': False,
 'use_cache': True,
 'use_static_masks': False,
 'vertical_advection_at_surface': True,
 'vertical_behavior_mode': 'dvm',
 'vertical_mixing': True,
 'vertical_mixing_at_surface': True,
 'vertical_mixing_timestep': 60.0,
 'w_active': 0.001,
 'wind_drift': True,
 'wind_drift_depth': 0.1,
 'wind_drift_factor': 0.0,
 'wind_uncertainty': 0.0,
 'z': 0.0,
 'z_day': -20.0,
 'z_night': -5.0,
 'z_pref': -10.0}

Run

m.run_all()
20:19:04 INFO    opendrift:568: OpenDriftSimulation initialised (version 1.14.9)
2026-04-09 20:19:04 WARNING opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:187: Vstretching not found, using 1
2026-04-09 20:19:04 WARNING opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:187: Vstretching not found, using 1
20:19:04 WARNING opendrift.readers.reader_ROMS_native:187: Vstretching not found, using 1
2026-04-09 20:19:04 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:19:04 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:19:04 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:19:04 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:19:04 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:19:04 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:19:04 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:19:04 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:19:04 WARNING opendrift.readers.basereader.structured.structured.__init__:50: No proj string or projection could be derived for reader TXLA, using 'fakeproj'.
20:19:04 WARNING opendrift.readers.basereader.structured:50: No proj string or projection could be derived for reader TXLA, using 'fakeproj'.
2026-04-09 20:19:04 INFO    opendrift.readers.basereader.structured.structured.__init__:81: Loading previously saved interpolator for lon,lat to x,y conversion.
2026-04-09 20:19:04 INFO    opendrift.readers.basereader.structured.structured.__init__:81: Loading previously saved interpolator for lon,lat to x,y conversion.
2026-04-09 20:19:04 INFO    opendrift.readers.basereader.structured.structured.__init__:81: Loading previously saved interpolator for lon,lat to x,y conversion.
20:19:04 INFO    opendrift.readers.basereader.structured:81: Loading previously saved interpolator for lon,lat to x,y conversion.
20:19:04 INFO    root:296: Using seed_flag "elements".
20:19:04 INFO    root:296: Using seed_flag "elements".
20:19:04 INFO    root:296: Using seed_flag "elements".
2026-04-09 20:19:04 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:19:04 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:19:04 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:19:04 INFO    opendrift.models.basemodel.environment:227: Fallback values will be used for the following variables which have no readers: 
2026-04-09 20:19:04 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_significant_height: 0.000000
2026-04-09 20:19:04 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_significant_height: 0.000000
2026-04-09 20:19:04 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_significant_height: 0.000000
20:19:04 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_significant_height: 0.000000
2026-04-09 20:19:04 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	x_wind: 0.000000
2026-04-09 20:19:04 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	x_wind: 0.000000
2026-04-09 20:19:04 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	x_wind: 0.000000
20:19:04 INFO    opendrift.models.basemodel.environment:230: 	x_wind: 0.000000
2026-04-09 20:19:04 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	y_wind: 0.000000
2026-04-09 20:19:04 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	y_wind: 0.000000
2026-04-09 20:19:04 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	y_wind: 0.000000
20:19:04 INFO    opendrift.models.basemodel.environment:230: 	y_wind: 0.000000
2026-04-09 20:19:04 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	ocean_vertical_diffusivity: 0.010000
2026-04-09 20:19:04 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	ocean_vertical_diffusivity: 0.010000
2026-04-09 20:19:04 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	ocean_vertical_diffusivity: 0.010000
20:19:04 INFO    opendrift.models.basemodel.environment:230: 	ocean_vertical_diffusivity: 0.010000
2026-04-09 20:19:04 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
2026-04-09 20:19:04 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
2026-04-09 20:19:04 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
20:19:04 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
2026-04-09 20:19:04 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
2026-04-09 20:19:04 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
2026-04-09 20:19:04 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
20:19:04 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
20:19:04 INFO    root:168: start_time: 2009-11-19 12:00:00, end_time: 2009-11-19 15:20:00, steps: 40, duration: P0DT3H20M0S
20:19:04 INFO    root:296: Using seed_flag "elements".
20:19:04 INFO    root:348: Running model forward in time.
20:19:04 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:19:04 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:19:04 WARNING opendrift:1993: Simulation end is not at an output time step. Extending duration from 3:20:00 to 4:00:00
20:19:04 INFO    opendrift:947: Using existing reader for land_binary_mask to move elements to ocean
2026-04-09 20:19:04 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_rho:367: Using mask_rho for mask_rho
2026-04-09 20:19:04 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_rho:367: Using mask_rho for mask_rho
20:19:04 INFO    opendrift.readers.reader_ROMS_native:367: Using mask_rho for mask_rho
20:19:04 INFO    opendrift:978: All points are in ocean
20:19:04 INFO    opendrift:2202: 2009-11-19 12:00:00 - step 1 of 48 - 10 active elements (0 deactivated)
2026-04-09 20:19:04 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.zeta:418: Using zeta for sea surface height
2026-04-09 20:19:04 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.zeta:418: Using zeta for sea surface height
20:19:04 INFO    opendrift.readers.reader_ROMS_native:418: Using zeta for sea surface height
2026-04-09 20:19:04 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_u:388: Using mask_u for mask_u
2026-04-09 20:19:04 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_u:388: Using mask_u for mask_u
20:19:04 INFO    opendrift.readers.reader_ROMS_native:388: Using mask_u for mask_u
2026-04-09 20:19:04 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.get_variables:639: Time: 0:00:00.105401
2026-04-09 20:19:04 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.get_variables:639: Time: 0:00:00.105401
20:19:04 INFO    opendrift.readers.reader_ROMS_native:639: Time: 0:00:00.105401
2026-04-09 20:19:04 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_v:409: Using mask_v for mask_v
2026-04-09 20:19:04 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_v:409: Using mask_v for mask_v
20:19:04 INFO    opendrift.readers.reader_ROMS_native:409: Using mask_v for mask_v
2026-04-09 20:19:04 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.angle:432: Using angle from Dataset.
2026-04-09 20:19:04 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.angle:432: Using angle from Dataset.
20:19:04 INFO    opendrift.readers.reader_ROMS_native:432: Using angle from Dataset.
20:19:04 INFO    opendrift:2202: 2009-11-19 12:05:00 - step 2 of 48 - 10 active elements (0 deactivated)
20:19:04 INFO    opendrift:2202: 2009-11-19 12:10:00 - step 3 of 48 - 10 active elements (0 deactivated)
20:19:04 INFO    opendrift:2202: 2009-11-19 12:15:00 - step 4 of 48 - 10 active elements (0 deactivated)
20:19:04 INFO    opendrift:2202: 2009-11-19 12:20:00 - step 5 of 48 - 10 active elements (0 deactivated)
20:19:04 INFO    opendrift:2202: 2009-11-19 12:25:00 - step 6 of 48 - 10 active elements (0 deactivated)
20:19:04 INFO    opendrift:2202: 2009-11-19 12:30:00 - step 7 of 48 - 10 active elements (0 deactivated)
20:19:04 INFO    opendrift:2202: 2009-11-19 12:35:00 - step 8 of 48 - 10 active elements (0 deactivated)
20:19:04 INFO    opendrift:2202: 2009-11-19 12:40:00 - step 9 of 48 - 10 active elements (0 deactivated)
20:19:04 INFO    opendrift:2202: 2009-11-19 12:45:00 - step 10 of 48 - 10 active elements (0 deactivated)
20:19:04 INFO    opendrift:2202: 2009-11-19 12:50:00 - step 11 of 48 - 10 active elements (0 deactivated)
20:19:04 INFO    opendrift:2202: 2009-11-19 12:55:00 - step 12 of 48 - 10 active elements (0 deactivated)
20:19:04 INFO    opendrift:2202: 2009-11-19 13:00:00 - step 13 of 48 - 10 active elements (0 deactivated)
20:19:04 INFO    opendrift:2202: 2009-11-19 13:05:00 - step 14 of 48 - 10 active elements (0 deactivated)
20:19:04 INFO    opendrift:2202: 2009-11-19 13:10:00 - step 15 of 48 - 10 active elements (0 deactivated)
20:19:04 INFO    opendrift:2202: 2009-11-19 13:15:00 - step 16 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 13:20:00 - step 17 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 13:25:00 - step 18 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 13:30:00 - step 19 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 13:35:00 - step 20 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 13:40:00 - step 21 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 13:45:00 - step 22 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 13:50:00 - step 23 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 13:55:00 - step 24 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 14:00:00 - step 25 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 14:05:00 - step 26 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 14:10:00 - step 27 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 14:15:00 - step 28 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 14:20:00 - step 29 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 14:25:00 - step 30 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 14:30:00 - step 31 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 14:35:00 - step 32 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 14:40:00 - step 33 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 14:45:00 - step 34 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 14:50:00 - step 35 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 14:55:00 - step 36 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 15:00:00 - step 37 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 15:05:00 - step 38 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 15:10:00 - step 39 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 15:15:00 - step 40 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 15:20:00 - step 41 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 15:25:00 - step 42 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 15:30:00 - step 43 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 15:35:00 - step 44 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 15:40:00 - step 45 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 15:45:00 - step 46 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 15:50:00 - step 47 of 48 - 10 active elements (0 deactivated)
20:19:05 INFO    opendrift:2202: 2009-11-19 15:55:00 - step 48 of 48 - 10 active elements (0 deactivated)
20:19:05 WARNING opendrift:2565: Plotting fast. This will make your plots less accurate.
20:19:06 INFO    opendrift:3899: Time to make plot: 0:00:01.105218
20:19:06 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201904Z_spaghetti_fast_True.png
_images/a5dbfbb4f9c0084bbfdddb6d31ea26d2985cc53188d6a8ddb7bf87317c6cadbb.png

Leeway (Search and Rescue)

These are simulations of objects that stay at the surface and are transported by both the wind and ocean currents at rates that depend on how much the object sticks up out of and down into the water. The constants to use for those rates have been experimentally determined by the coastguard and are used in this model.

Initialize manager m

m = ptm.OpenDriftModel(drift_model="Leeway", lon = -89.8, lat = 29.08,
                       number=10, steps=40,
                       ocean_model="TXLA",
                       start_time="2009-11-19T12:00",
                       ocean_model_local=False,
                       object_type="Fishing vessel, general (mean values)",
                       plots={'spaghetti': {}})

# setup opendrift object (need to do this to set the wind in the next step)
m.setup_for_simulation()

# This drift model requires wind data to be set which isn't present in model output
m.o.set_config('environment:constant:x_wind', -1)
m.o.set_config('environment:constant:y_wind', 1)
2026-04-09 20:19:07 INFO    root.config_logging.setup_logger:54: Particle tracking manager simulation.
2026-04-09 20:19:07 INFO    root.config_logging.setup_logger:55: Log filename: output-results_2026-04-09T201907Z.log
2026-04-09 20:19:07 INFO    root.config_the_manager.timedir:348: Running model forward in time.
2026-04-09 20:19:07 INFO    root.config_the_manager.timedir:348: Running model forward in time.
2026-04-09 20:19:07 INFO    root.config_ocean_model.register_on_the_fly:230: Registered new ocean model or altered existing ocean model in the registry.
20:19:07 INFO    opendrift:568: OpenDriftSimulation initialised (version 1.14.9)

The objects that can be modeled are:

ptm.LeewayModelConfig.model_json_schema()["$defs"]["ObjectTypeEnum"]["enum"]
['Person-in-water (PIW), unknown state (mean values)',
 '>PIW, vertical PFD type III conscious',
 '>PIW, sitting, PFD type I or II',
 '>PIW, survival suit (face up)',
 '>PIW, scuba suit (face up)',
 '>PIW, deceased (face down)',
 'Life raft, deep ballast (DB) system, general, unknown capacity and loading (mean values)',
 '>4-14 person capacity, deep ballast system, canopy (average)',
 '>>4-14 person capacity, deep ballast system, no drogue',
 '>>>4-14 person capacity, deep ballast system, canopy, no drogue, light loading',
 '>>>4-14 person capacity, deep ballast system, no drogue, heavy loading',
 '>>4-14 person capacity, deep ballast system, canopy, with drogue (average)',
 '>>>4-14 person capacity, deep ballast system, canopy, with drogue, light loading',
 '>>>4-14 person capacity, deep ballast system, canopy, with drogue, heavy loading',
 '>15-50 person capacity, deep ballast system, canopy, general (mean values)',
 '>>15-50 person capacity, deep ballast system, canopy, no drogue, light loading',
 '>>15-50 person capacity, deep ballast system, canopy, with drogue, heavy loading',
 'Deep ballast system, general (mean values), capsized',
 'Deep ballast system, general (mean values), swamped',
 'Life-raft, shallow ballast (SB) system AND canopy, general (mean values)',
 '>Life-raft, shallow ballast system, canopy, no drogue',
 '>Life-raft, shallow ballast system AND canopy, with drogue',
 'Life-raft, shallow ballast system AND canopy, capsized',
 'Life Raft - Shallow ballast, canopy, Navy Sub Escape (SEIE) 1-man raft, NO drogue',
 'Life Raft - Shallow ballast, canopy, Navy Sub Escape (SEIE) 1-man raft, with drogue',
 'Life-raft, no ballast (NB) system, general (mean values)',
 '>Life-raft, no ballast system, no canopy, no drogue',
 '>Life-raft, no ballast system, no canopy, with drogue',
 '>Life-raft, no ballast system, with canopy, no drogue',
 '>Life-raft, no ballast system, with canopy, with drogue',
 'Survival Craft - USCG Sea Rescue Kit - 3 ballasted life rafts and 300 meter of line',
 'Life-raft, 4-6 person capacity, no ballast, with canopy, no drogue',
 'Evacuation slide with life-raft, 46 person capacity',
 'Survival Craft - SOLAS Hard Shell Life Capsule, 22 man',
 'Survival Craft - Ovatek Hard Shell Life Raft, 4 and 7-man, lightly loaded, no drogue (average)',
 '>Survival Craft - Ovatek Hard Shell Life Raft, 4 man, lightly loaded, no drogue',
 '>Survival Craft - Ovatek Hard Shell Life Raft, 7 man, lightly loaded, no drogue',
 'Survival Craft - Ovatek Hard Shell Life Raft, 4 and 7-man, fully loaded, drogued (average)',
 '>Survival Craft - Ovatek Hard Shell Life Raft, 4 man, fully loaded, drogued',
 '>Survival Craft - Ovatek Hard Shell Life Raft, 7 man, fully loaded, drogued',
 'Sea Kayak with person on aft deck',
 'Surf board with person',
 'Windsurfer with mast and sail in water',
 'Skiff - modified-v, cathedral-hull, runabout outboard powerboat',
 'Skiff, V-hull',
 'Skiffs, swamped and capsized',
 'Skiff - v-hull bow to stern (aluminum, Norway)',
 'Sport boat, no canvas (*1), modified V-hull',
 'Sport fisher, center console (*2), open cockpit',
 'Fishing vessel, general (mean values)',
 'Fishing vessel, Hawaiian Sampan (*3)',
 '>Fishing vessel, Japanese side-stern trawler',
 '>Fishing vessel, Japanese Longliner (*3)',
 '>Fishing vessel, Korean fishing vessel (*4)',
 '>Fishing vessel, Gill-netter with rear reel (*3)',
 'Coastal freighter. (*5)',
 'Sailboat Mono-hull (Average)',
 '>Sailboat Mono-hull (Dismasted, Average)',
 '>>Sailboat Mono-hull (Dismasted - rudder amidships)',
 '>>Sailboat Mono-hull (Dismasted - rudder missing)',
 '>Sailboat Mono-hull (Bare-masted,  Average)',
 '>>Sailboat Mono-hull (Bare-masted, rudder amidships)',
 '>>Sailboat Mono-hull (Bare-masted, rudder hove-to)',
 'Sailboat Mono-hull, fin keel, shallow draft (was SAILBOAT-2)',
 'Sunfish sailing dingy  -  Bare-masted, rudder missing',
 'Fishing vessel debris',
 'Self-locating datum marker buoy - no windage',
 'Navy Submarine EPIRB (SEPIRB)',
 'Bait/wharf box, holds a cubic metre of ice, mean values (*6)',
 'Bait/wharf box, holds a cubic metre of ice, lightly loaded',
 '>Bait/wharf box, holds a cubic metre of ice, full loaded',
 '55-gallon (220 l) Oil Drum',
 'Scaled down (1:3) 40-ft Container (70% submerged)',
 '20-ft Container (80% submerged)',
 'WWII L-MK2 mine',
 'Immigration vessel, Cuban refugee-raft, no sail (*7)',
 'Immigration vessel, Cuban refugee-raft, with sail (*7)',
 'Sewage floatables, tampon applicator',
 'Medical waste (mean values)',
 '>Medical waste, vials',
 '>>Medical waste, vials, large',
 '>>Medical waste, vials, small',
 '>Medical waste, syringes',
 '>>Medical waste, syringes, large',
 '>>Medical waste, syringes, small']

You can run the previous command without initializing a class instance. If you don’t want to remember which scenario object to check and don’t mind initializating, you can instead run from your manager instance:

m.config.model_json_schema()["$defs"]["ObjectTypeEnum"]["enum"]
['Person-in-water (PIW), unknown state (mean values)',
 '>PIW, vertical PFD type III conscious',
 '>PIW, sitting, PFD type I or II',
 '>PIW, survival suit (face up)',
 '>PIW, scuba suit (face up)',
 '>PIW, deceased (face down)',
 'Life raft, deep ballast (DB) system, general, unknown capacity and loading (mean values)',
 '>4-14 person capacity, deep ballast system, canopy (average)',
 '>>4-14 person capacity, deep ballast system, no drogue',
 '>>>4-14 person capacity, deep ballast system, canopy, no drogue, light loading',
 '>>>4-14 person capacity, deep ballast system, no drogue, heavy loading',
 '>>4-14 person capacity, deep ballast system, canopy, with drogue (average)',
 '>>>4-14 person capacity, deep ballast system, canopy, with drogue, light loading',
 '>>>4-14 person capacity, deep ballast system, canopy, with drogue, heavy loading',
 '>15-50 person capacity, deep ballast system, canopy, general (mean values)',
 '>>15-50 person capacity, deep ballast system, canopy, no drogue, light loading',
 '>>15-50 person capacity, deep ballast system, canopy, with drogue, heavy loading',
 'Deep ballast system, general (mean values), capsized',
 'Deep ballast system, general (mean values), swamped',
 'Life-raft, shallow ballast (SB) system AND canopy, general (mean values)',
 '>Life-raft, shallow ballast system, canopy, no drogue',
 '>Life-raft, shallow ballast system AND canopy, with drogue',
 'Life-raft, shallow ballast system AND canopy, capsized',
 'Life Raft - Shallow ballast, canopy, Navy Sub Escape (SEIE) 1-man raft, NO drogue',
 'Life Raft - Shallow ballast, canopy, Navy Sub Escape (SEIE) 1-man raft, with drogue',
 'Life-raft, no ballast (NB) system, general (mean values)',
 '>Life-raft, no ballast system, no canopy, no drogue',
 '>Life-raft, no ballast system, no canopy, with drogue',
 '>Life-raft, no ballast system, with canopy, no drogue',
 '>Life-raft, no ballast system, with canopy, with drogue',
 'Survival Craft - USCG Sea Rescue Kit - 3 ballasted life rafts and 300 meter of line',
 'Life-raft, 4-6 person capacity, no ballast, with canopy, no drogue',
 'Evacuation slide with life-raft, 46 person capacity',
 'Survival Craft - SOLAS Hard Shell Life Capsule, 22 man',
 'Survival Craft - Ovatek Hard Shell Life Raft, 4 and 7-man, lightly loaded, no drogue (average)',
 '>Survival Craft - Ovatek Hard Shell Life Raft, 4 man, lightly loaded, no drogue',
 '>Survival Craft - Ovatek Hard Shell Life Raft, 7 man, lightly loaded, no drogue',
 'Survival Craft - Ovatek Hard Shell Life Raft, 4 and 7-man, fully loaded, drogued (average)',
 '>Survival Craft - Ovatek Hard Shell Life Raft, 4 man, fully loaded, drogued',
 '>Survival Craft - Ovatek Hard Shell Life Raft, 7 man, fully loaded, drogued',
 'Sea Kayak with person on aft deck',
 'Surf board with person',
 'Windsurfer with mast and sail in water',
 'Skiff - modified-v, cathedral-hull, runabout outboard powerboat',
 'Skiff, V-hull',
 'Skiffs, swamped and capsized',
 'Skiff - v-hull bow to stern (aluminum, Norway)',
 'Sport boat, no canvas (*1), modified V-hull',
 'Sport fisher, center console (*2), open cockpit',
 'Fishing vessel, general (mean values)',
 'Fishing vessel, Hawaiian Sampan (*3)',
 '>Fishing vessel, Japanese side-stern trawler',
 '>Fishing vessel, Japanese Longliner (*3)',
 '>Fishing vessel, Korean fishing vessel (*4)',
 '>Fishing vessel, Gill-netter with rear reel (*3)',
 'Coastal freighter. (*5)',
 'Sailboat Mono-hull (Average)',
 '>Sailboat Mono-hull (Dismasted, Average)',
 '>>Sailboat Mono-hull (Dismasted - rudder amidships)',
 '>>Sailboat Mono-hull (Dismasted - rudder missing)',
 '>Sailboat Mono-hull (Bare-masted,  Average)',
 '>>Sailboat Mono-hull (Bare-masted, rudder amidships)',
 '>>Sailboat Mono-hull (Bare-masted, rudder hove-to)',
 'Sailboat Mono-hull, fin keel, shallow draft (was SAILBOAT-2)',
 'Sunfish sailing dingy  -  Bare-masted, rudder missing',
 'Fishing vessel debris',
 'Self-locating datum marker buoy - no windage',
 'Navy Submarine EPIRB (SEPIRB)',
 'Bait/wharf box, holds a cubic metre of ice, mean values (*6)',
 'Bait/wharf box, holds a cubic metre of ice, lightly loaded',
 '>Bait/wharf box, holds a cubic metre of ice, full loaded',
 '55-gallon (220 l) Oil Drum',
 'Scaled down (1:3) 40-ft Container (70% submerged)',
 '20-ft Container (80% submerged)',
 'WWII L-MK2 mine',
 'Immigration vessel, Cuban refugee-raft, no sail (*7)',
 'Immigration vessel, Cuban refugee-raft, with sail (*7)',
 'Sewage floatables, tampon applicator',
 'Medical waste (mean values)',
 '>Medical waste, vials',
 '>>Medical waste, vials, large',
 '>>Medical waste, vials, small',
 '>Medical waste, syringes',
 '>>Medical waste, syringes, large',
 '>>Medical waste, syringes, small']

The configuration parameters for this simulation are:

pprint.pprint(m.config.model_dump())
20:19:07 INFO    root:296: Using seed_flag "elements".
20:19:07 INFO    root:348: Running model forward in time.
{'coastline_action': 'stranding',
 'current_uncertainty': 0.0,
 'do3D': False,
 'drift_model': 'Leeway',
 'duration': 'P0DT3H20M0S',
 'end_time': datetime.datetime(2009, 11, 19, 15, 20),
 'export_variables': None,
 'geojson': None,
 'horizontal_diffusivity': 100.0,
 'interpolator_filename': PosixPath('/home/docs/.cache/particle-tracking-manager/TXLA_interpolator.pickle'),
 'lat': 29.08,
 'log_level': 'INFO',
 'lon': -89.8,
 'max_speed': 20.0,
 'model': 'opendrift',
 'number': 10,
 'object_type': 'Fishing vessel, general (mean values)',
 'ocean_model': 'TXLA',
 'ocean_model_config': {'chunks': None,
                        'dx': 1000.0,
                        'end_time_fixed': datetime.datetime(2009, 11, 19, 16, 0),
                        'kerchunk_func_str': None,
                        'lat_max': 30.62933797,
                        'lat_min': 27.48800453,
                        'loc_remote': '/home/docs/.cache/xroms/ROMS_example_full_grid.nc',
                        'lon_max': -88.0137713,
                        'lon_min': -93.04208536,
                        'model_drop_vars': [],
                        'name': 'TXLA',
                        'oceanmodel_lon0_360': False,
                        'standard_name_mapping': {'mask_rho': 'land_binary_mask'},
                        'start_time_model': datetime.datetime(2009, 11, 19, 12, 0),
                        'temporal_resolution_str': 'PT1H'},
 'ocean_model_local': False,
 'ocean_model_simulation': {'ocean_model_local': False},
 'output_file': PosixPath('output-results_2026-04-09T201907Z.nc'),
 'output_format': 'netcdf',
 'plots': {'spaghetti': {}},
 'radius': 1000.0,
 'radius_type': 'gaussian',
 'run_forward': True,
 'save_interpolator': True,
 'seed_flag': 'elements',
 'start_time': datetime.datetime(2009, 11, 19, 12, 0),
 'start_time_end': None,
 'steps': 40,
 'stokes_drift': False,
 'time_step': 300.0,
 'time_step_output': 3600.0,
 'time_step_output_integer': 12,
 'timedir': 1,
 'use_auto_landmask': False,
 'use_cache': True,
 'use_static_masks': False,
 'wind_uncertainty': 0.0,
 'z': 0.0}

Run

m.run_all()
2026-04-09 20:19:07 WARNING opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:187: Vstretching not found, using 1
2026-04-09 20:19:07 WARNING opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:187: Vstretching not found, using 1
20:19:07 WARNING opendrift.readers.reader_ROMS_native:187: Vstretching not found, using 1
2026-04-09 20:19:07 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:19:07 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:19:07 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:19:07 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:19:07 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:19:07 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:19:07 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:19:07 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:19:07 WARNING opendrift.readers.basereader.structured.structured.__init__:50: No proj string or projection could be derived for reader TXLA, using 'fakeproj'.
20:19:07 WARNING opendrift.readers.basereader.structured:50: No proj string or projection could be derived for reader TXLA, using 'fakeproj'.
2026-04-09 20:19:07 INFO    opendrift.readers.basereader.structured.structured.__init__:81: Loading previously saved interpolator for lon,lat to x,y conversion.
2026-04-09 20:19:07 INFO    opendrift.readers.basereader.structured.structured.__init__:81: Loading previously saved interpolator for lon,lat to x,y conversion.
2026-04-09 20:19:07 INFO    opendrift.readers.basereader.structured.structured.__init__:81: Loading previously saved interpolator for lon,lat to x,y conversion.
20:19:07 INFO    opendrift.readers.basereader.structured:81: Loading previously saved interpolator for lon,lat to x,y conversion.
20:19:07 INFO    root:296: Using seed_flag "elements".
20:19:07 INFO    root:296: Using seed_flag "elements".
20:19:07 INFO    root:296: Using seed_flag "elements".
2026-04-09 20:19:07 INFO    opendrift.models.leeway.leeway.seed_elements:321: Seeding elements of object type 50: FISHING-VESSEL-1 (Fishing vessel, general (mean values))
20:19:07 INFO    opendrift.models.leeway:321: Seeding elements of object type 50: FISHING-VESSEL-1 (Fishing vessel, general (mean values))
2026-04-09 20:19:07 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:19:07 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:19:07 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:19:07 INFO    opendrift.models.basemodel.environment:227: Fallback values will be used for the following variables which have no readers: 
2026-04-09 20:19:07 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
2026-04-09 20:19:07 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
2026-04-09 20:19:07 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
20:19:07 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
2026-04-09 20:19:07 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
2026-04-09 20:19:07 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
2026-04-09 20:19:07 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
20:19:07 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
20:19:07 INFO    root:168: start_time: 2009-11-19 12:00:00, end_time: 2009-11-19 15:20:00, steps: 40, duration: P0DT3H20M0S
20:19:07 INFO    root:296: Using seed_flag "elements".
20:19:07 INFO    root:348: Running model forward in time.
20:19:07 INFO    opendrift:1894: Skipping environment variable sea_surface_wave_stokes_drift_x_velocity because of condition ['drift:stokes_drift', 'is', False]
20:19:07 INFO    opendrift:1894: Skipping environment variable sea_surface_wave_stokes_drift_y_velocity because of condition ['drift:stokes_drift', 'is', False]
20:19:07 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:19:07 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:19:07 WARNING opendrift:1993: Simulation end is not at an output time step. Extending duration from 3:20:00 to 4:00:00
20:19:07 INFO    opendrift:947: Using existing reader for land_binary_mask to move elements to ocean
2026-04-09 20:19:07 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_rho:367: Using mask_rho for mask_rho
2026-04-09 20:19:07 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_rho:367: Using mask_rho for mask_rho
20:19:07 INFO    opendrift.readers.reader_ROMS_native:367: Using mask_rho for mask_rho
20:19:07 INFO    opendrift:978: All points are in ocean
20:19:07 INFO    opendrift:2202: 2009-11-19 12:00:00 - step 1 of 48 - 10 active elements (0 deactivated)
2026-04-09 20:19:07 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_u:388: Using mask_u for mask_u
2026-04-09 20:19:07 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_u:388: Using mask_u for mask_u
20:19:07 INFO    opendrift.readers.reader_ROMS_native:388: Using mask_u for mask_u
2026-04-09 20:19:07 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_v:409: Using mask_v for mask_v
2026-04-09 20:19:07 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_v:409: Using mask_v for mask_v
20:19:07 INFO    opendrift.readers.reader_ROMS_native:409: Using mask_v for mask_v
2026-04-09 20:19:07 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.angle:432: Using angle from Dataset.
2026-04-09 20:19:07 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.angle:432: Using angle from Dataset.
20:19:07 INFO    opendrift.readers.reader_ROMS_native:432: Using angle from Dataset.
20:19:07 INFO    opendrift:2202: 2009-11-19 12:05:00 - step 2 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 12:10:00 - step 3 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 12:15:00 - step 4 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 12:20:00 - step 5 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 12:25:00 - step 6 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 12:30:00 - step 7 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 12:35:00 - step 8 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 12:40:00 - step 9 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 12:45:00 - step 10 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 12:50:00 - step 11 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 12:55:00 - step 12 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 13:00:00 - step 13 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 13:05:00 - step 14 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 13:10:00 - step 15 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 13:15:00 - step 16 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 13:20:00 - step 17 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 13:25:00 - step 18 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 13:30:00 - step 19 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 13:35:00 - step 20 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 13:40:00 - step 21 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 13:45:00 - step 22 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 13:50:00 - step 23 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 13:55:00 - step 24 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 14:00:00 - step 25 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 14:05:00 - step 26 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 14:10:00 - step 27 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 14:15:00 - step 28 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 14:20:00 - step 29 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 14:25:00 - step 30 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 14:30:00 - step 31 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 14:35:00 - step 32 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 14:40:00 - step 33 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 14:45:00 - step 34 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 14:50:00 - step 35 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 14:55:00 - step 36 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 15:00:00 - step 37 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 15:05:00 - step 38 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 15:10:00 - step 39 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 15:15:00 - step 40 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 15:20:00 - step 41 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 15:25:00 - step 42 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 15:30:00 - step 43 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 15:35:00 - step 44 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 15:40:00 - step 45 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 15:45:00 - step 46 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 15:50:00 - step 47 of 48 - 10 active elements (0 deactivated)
20:19:07 INFO    opendrift:2202: 2009-11-19 15:55:00 - step 48 of 48 - 10 active elements (0 deactivated)
20:19:08 WARNING opendrift:2565: Plotting fast. This will make your plots less accurate.
20:19:09 INFO    opendrift:3899: Time to make plot: 0:00:01.154413
20:19:09 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201907Z_spaghetti_fast_True.png
_images/6b7350861d3131891e9820e6189f38a2bdc3627450a72c7182ff2ef692634e99.png

LarvalFish

This model simulates eggs and larvae that move in 3D with the currents. Eggs drift passively until they hatch, after which larvae can exhibit vertical behavior. The user chooses whether to initialize particles as eggs or larvae.

Key parameters for this model include:

  • hatched: 0 for eggs (default), 1 for larvae

  • hatching_method: "fixed_time" — eggs hatch after a fixed duration

  • hatch_time_days: number of days until hatching (default 2.0)

  • vertical_behavior_mode: "depth" (maintain preferred depth) or "dvm" (diel vertical migration)

  • w_active: maximum active vertical swimming speed (m/s)

  • z_pref: preferred depth for "depth" mode (m, negative down)

  • z_day / z_night: target depths for "dvm" mode (m, negative down)

More detail and suggested parameter values for specific fish species are available in Drift Model Details and Species Reference.

An optional general flag is to initialize the drifters at the seabed, which might make sense for eggs and is demonstrated here.

Initialize manager m

m = ptm.OpenDriftModel(drift_model="LarvalFish", lon=-89.85, lat=28.8, number=10, steps=45,
                       z=None,
                       hatched=0,
                       hatching_method="fixed_time",
                       hatch_time_days=(1/24),
                       vertical_behavior_mode="depth",
                       w_active=0.002, z_pref=-2,
                       do3D=True, seed_seafloor=True,
                       ocean_model="TXLA",
                       start_time="2009-11-19T12:00",
                       ocean_model_local=False,
                       plots={'spaghetti': {'linecolor': 'z', 'cmap': 'cmo.deep'},
                              'property1': {'variable': 'z'},
                              })
2026-04-09 20:19:09 INFO    root.config_logging.setup_logger:54: Particle tracking manager simulation.
2026-04-09 20:19:09 INFO    root.config_logging.setup_logger:55: Log filename: output-results_2026-04-09T201909Z.log
2026-04-09 20:19:09 INFO    root.config_the_manager.timedir:348: Running model forward in time.
2026-04-09 20:19:09 INFO    root.config_the_manager.timedir:348: Running model forward in time.
2026-04-09 20:19:09 INFO    root.config_ocean_model.register_on_the_fly:230: Registered new ocean model or altered existing ocean model in the registry.

The configuration parameters for this simulation are:

pprint.pprint(m.config.model_dump())
2026-04-09 20:19:09 INFO    root.config_the_manager.seed_flag:296: Using seed_flag "elements".
2026-04-09 20:19:09 INFO    root.config_the_manager.timedir:348: Running model forward in time.
{'coastline_action': 'stranding',
 'current_uncertainty': 0.0,
 'diameter': 0.0014,
 'diffusivitymodel': 'windspeed_Large1994',
 'do3D': True,
 'drift_model': 'LarvalFish',
 'duration': 'P0DT3H45M0S',
 'dz_max': 15.0,
 'dz_min': 1.0,
 'dz_rel': 0.1,
 'end_time': datetime.datetime(2009, 11, 19, 15, 45),
 'export_variables': None,
 'geojson': None,
 'hatch_time_days': 0.041666666666666664,
 'hatched': 0,
 'hatching_method': 'fixed_time',
 'horizontal_diffusivity': 100.0,
 'interpolator_filename': PosixPath('/home/docs/.cache/particle-tracking-manager/TXLA_interpolator.pickle'),
 'lat': 28.8,
 'length': None,
 'log_level': 'INFO',
 'lon': -89.85,
 'max_speed': 20.0,
 'mixed_layer_depth': 20.0,
 'model': 'opendrift',
 'neutral_buoyancy_salinity': 31.25,
 'number': 10,
 'ocean_model': 'TXLA',
 'ocean_model_config': {'chunks': None,
                        'dx': 1000.0,
                        'end_time_fixed': datetime.datetime(2009, 11, 19, 16, 0),
                        'kerchunk_func_str': None,
                        'lat_max': 30.62933797,
                        'lat_min': 27.48800453,
                        'loc_remote': '/home/docs/.cache/xroms/ROMS_example_full_grid.nc',
                        'lon_max': -88.0137713,
                        'lon_min': -93.04208536,
                        'model_drop_vars': [],
                        'name': 'TXLA',
                        'oceanmodel_lon0_360': False,
                        'standard_name_mapping': {'mask_rho': 'land_binary_mask'},
                        'start_time_model': datetime.datetime(2009, 11, 19, 12, 0),
                        'temporal_resolution_str': 'PT1H'},
 'ocean_model_local': False,
 'ocean_model_simulation': {'ocean_model_local': False},
 'output_file': PosixPath('output-results_2026-04-09T201909Z.nc'),
 'output_format': 'netcdf',
 'plots': {'property1': {'variable': 'z'},
           'spaghetti': {'cmap': 'cmo.deep', 'linecolor': 'z'}},
 'radius': 1000.0,
 'radius_type': 'gaussian',
 'run_forward': True,
 'save_interpolator': True,
 'seafloor_action': 'lift_to_seafloor',
 'seed_flag': 'elements',
 'seed_seafloor': True,
 'stage_fraction': 0.0,
 'start_time': datetime.datetime(2009, 11, 19, 12, 0),
 'start_time_end': None,
 'steps': 45,
 'stokes_drift': False,
 'time_step': 300.0,
 'time_step_output': 3600.0,
 'time_step_output_integer': 12,
 'timedir': 1,
 'use_auto_landmask': False,
 'use_cache': True,
 'use_static_masks': False,
 'vertical_advection_at_surface': True,
 'vertical_behavior_mode': 'depth',
 'vertical_mixing': True,
 'vertical_mixing_at_surface': True,
 'vertical_mixing_timestep': 60.0,
 'w_active': 0.002,
 'weight': 0.08,
 'wind_drift': True,
 'wind_drift_depth': 0.1,
 'wind_drift_factor': 0.0,
 'wind_uncertainty': 0.0,
 'z': None,
 'z_day': -25.0,
 'z_night': -5.0,
 'z_pref': -2.0}

Run

m.run_all()
20:19:09 INFO    opendrift:568: OpenDriftSimulation initialised (version 1.14.9)
2026-04-09 20:19:09 WARNING opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:187: Vstretching not found, using 1
2026-04-09 20:19:09 WARNING opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:187: Vstretching not found, using 1
20:19:09 WARNING opendrift.readers.reader_ROMS_native:187: Vstretching not found, using 1
2026-04-09 20:19:09 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:19:09 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:19:09 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:19:09 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:19:09 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:19:09 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:19:09 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:19:09 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:19:09 WARNING opendrift.readers.basereader.structured.structured.__init__:50: No proj string or projection could be derived for reader TXLA, using 'fakeproj'.
20:19:09 WARNING opendrift.readers.basereader.structured:50: No proj string or projection could be derived for reader TXLA, using 'fakeproj'.
2026-04-09 20:19:09 INFO    opendrift.readers.basereader.structured.structured.__init__:81: Loading previously saved interpolator for lon,lat to x,y conversion.
2026-04-09 20:19:09 INFO    opendrift.readers.basereader.structured.structured.__init__:81: Loading previously saved interpolator for lon,lat to x,y conversion.
2026-04-09 20:19:09 INFO    opendrift.readers.basereader.structured.structured.__init__:81: Loading previously saved interpolator for lon,lat to x,y conversion.
20:19:09 INFO    opendrift.readers.basereader.structured:81: Loading previously saved interpolator for lon,lat to x,y conversion.
20:19:09 INFO    root:296: Using seed_flag "elements".
20:19:09 INFO    root:296: Using seed_flag "elements".
20:19:09 INFO    root:296: Using seed_flag "elements".
2026-04-09 20:19:09 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:19:09 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:19:09 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:19:09 INFO    opendrift.models.basemodel.environment:227: Fallback values will be used for the following variables which have no readers: 
2026-04-09 20:19:09 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_significant_height: 0.000000
2026-04-09 20:19:09 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_significant_height: 0.000000
2026-04-09 20:19:09 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_significant_height: 0.000000
20:19:09 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_significant_height: 0.000000
2026-04-09 20:19:09 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	x_wind: 0.000000
2026-04-09 20:19:09 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	x_wind: 0.000000
2026-04-09 20:19:09 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	x_wind: 0.000000
20:19:09 INFO    opendrift.models.basemodel.environment:230: 	x_wind: 0.000000
2026-04-09 20:19:09 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	y_wind: 0.000000
2026-04-09 20:19:09 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	y_wind: 0.000000
2026-04-09 20:19:09 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	y_wind: 0.000000
20:19:09 INFO    opendrift.models.basemodel.environment:230: 	y_wind: 0.000000
2026-04-09 20:19:09 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	ocean_vertical_diffusivity: 0.010000
2026-04-09 20:19:09 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	ocean_vertical_diffusivity: 0.010000
2026-04-09 20:19:09 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	ocean_vertical_diffusivity: 0.010000
20:19:09 INFO    opendrift.models.basemodel.environment:230: 	ocean_vertical_diffusivity: 0.010000
2026-04-09 20:19:09 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
2026-04-09 20:19:09 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
2026-04-09 20:19:09 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
20:19:09 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
2026-04-09 20:19:09 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
2026-04-09 20:19:09 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
2026-04-09 20:19:09 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
20:19:09 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
2026-04-09 20:19:09 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:19:09 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:19:09 WARNING opendrift.models.basemodel.environment.environment.discard_reader_if_not_relevant:441: Simulation has no simulation_extent, cannot check reader coverage
20:19:09 WARNING opendrift.models.basemodel.environment:441: Simulation has no simulation_extent, cannot check reader coverage
2026-04-09 20:19:09 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_rho:367: Using mask_rho for mask_rho
2026-04-09 20:19:09 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_rho:367: Using mask_rho for mask_rho
20:19:09 INFO    opendrift.readers.reader_ROMS_native:367: Using mask_rho for mask_rho
20:19:09 INFO    root:168: start_time: 2009-11-19 12:00:00, end_time: 2009-11-19 15:45:00, steps: 45, duration: P0DT3H45M0S
20:19:09 INFO    root:296: Using seed_flag "elements".
20:19:09 INFO    root:348: Running model forward in time.
20:19: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:19: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:19:09 WARNING opendrift:1993: Simulation end is not at an output time step. Extending duration from 3:45:00 to 4:00:00
20:19:09 INFO    opendrift:947: Using existing reader for land_binary_mask to move elements to ocean
20:19:09 INFO    opendrift:978: All points are in ocean
20:19:09 INFO    opendrift:2202: 2009-11-19 12:00:00 - step 1 of 48 - 10 active elements (0 deactivated)
2026-04-09 20:19:09 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.zeta:418: Using zeta for sea surface height
2026-04-09 20:19:09 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.zeta:418: Using zeta for sea surface height
20:19:09 INFO    opendrift.readers.reader_ROMS_native:418: Using zeta for sea surface height
2026-04-09 20:19:09 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_u:388: Using mask_u for mask_u
2026-04-09 20:19:09 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_u:388: Using mask_u for mask_u
20:19:09 INFO    opendrift.readers.reader_ROMS_native:388: Using mask_u for mask_u
2026-04-09 20:19:10 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.get_variables:639: Time: 0:00:00.104447
2026-04-09 20:19:10 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.get_variables:639: Time: 0:00:00.104447
20:19:10 INFO    opendrift.readers.reader_ROMS_native:639: Time: 0:00:00.104447
2026-04-09 20:19:10 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_v:409: Using mask_v for mask_v
2026-04-09 20:19:10 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_v:409: Using mask_v for mask_v
20:19:10 INFO    opendrift.readers.reader_ROMS_native:409: Using mask_v for mask_v
2026-04-09 20:19:10 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.angle:432: Using angle from Dataset.
2026-04-09 20:19:10 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.angle:432: Using angle from Dataset.
20:19:10 INFO    opendrift.readers.reader_ROMS_native:432: Using angle from Dataset.
20:19:10 INFO    opendrift:2202: 2009-11-19 12:05:00 - step 2 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 12:10:00 - step 3 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 12:15:00 - step 4 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 12:20:00 - step 5 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 12:25:00 - step 6 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 12:30:00 - step 7 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 12:35:00 - step 8 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 12:40:00 - step 9 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 12:45:00 - step 10 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 12:50:00 - step 11 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 12:55:00 - step 12 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 13:00:00 - step 13 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 13:05:00 - step 14 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 13:10:00 - step 15 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 13:15:00 - step 16 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 13:20:00 - step 17 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 13:25:00 - step 18 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 13:30:00 - step 19 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 13:35:00 - step 20 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 13:40:00 - step 21 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 13:45:00 - step 22 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 13:50:00 - step 23 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 13:55:00 - step 24 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 14:00:00 - step 25 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 14:05:00 - step 26 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 14:10:00 - step 27 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 14:15:00 - step 28 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 14:20:00 - step 29 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 14:25:00 - step 30 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 14:30:00 - step 31 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 14:35:00 - step 32 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 14:40:00 - step 33 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 14:45:00 - step 34 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 14:50:00 - step 35 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 14:55:00 - step 36 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 15:00:00 - step 37 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 15:05:00 - step 38 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 15:10:00 - step 39 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 15:15:00 - step 40 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 15:20:00 - step 41 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 15:25:00 - step 42 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 15:30:00 - step 43 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 15:35:00 - step 44 of 48 - 10 active elements (0 deactivated)
20:19:10 INFO    opendrift:2202: 2009-11-19 15:40:00 - step 45 of 48 - 10 active elements (0 deactivated)
20:19:11 INFO    opendrift:2202: 2009-11-19 15:45:00 - step 46 of 48 - 10 active elements (0 deactivated)
20:19:11 INFO    opendrift:2202: 2009-11-19 15:50:00 - step 47 of 48 - 10 active elements (0 deactivated)
20:19:11 INFO    opendrift:2202: 2009-11-19 15:55:00 - step 48 of 48 - 10 active elements (0 deactivated)
20:19:11 WARNING opendrift:2565: Plotting fast. This will make your plots less accurate.
20:19:12 INFO    opendrift:3899: Time to make plot: 0:00:01.071072
20:19:12 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201909Z_spaghetti_fast_True_linecolor_z_cmap_cmo.deep.png
20:19:12 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201909Z_property_variable_z.png
_images/57ce2e9645b9341ffb1c814c37f880faccea9972f35afe4db93025922cbc9cd8.png _images/3f2c5b4d225323ca4ff245cfcaa06f6f579251fa9126317386702c174b80ab18.png

Output from the simulation can be viewed in the history or elements, or from the output file.

m.config.output_file
PosixPath('output-results_2026-04-09T201909Z.nc')
m.o.result["z"]
<xarray.DataArray 'z' (trajectory: 10, time: 5)> Size: 200B
array([[-60.042397, -59.559734, -52.407093, -45.005062, -37.89022 ],
       [-55.971485, -55.453793, -48.57942 , -41.805355, -34.45422 ],
       [-57.71462 , -56.585556, -49.189102, -41.600872, -33.98891 ],
       [-60.902836, -59.803543, -52.062603, -44.276947, -37.2981  ],
       [-59.72285 , -59.268456, -52.324203, -45.063828, -37.768135],
       [-55.20293 , -54.637024, -47.62217 , -40.226837, -33.022465],
       [-56.70956 , -56.20099 , -49.335033, -42.395554, -35.595673],
       [-57.05813 , -56.567703, -49.647484, -42.467854, -35.38268 ],
       [-56.572124, -55.848858, -48.261032, -40.77318 , -33.41273 ],
       [-58.874073, -58.201134, -50.930065, -43.221016, -36.140366]],
      dtype=float32)
Coordinates:
  * trajectory  (trajectory) int32 40B 0 1 2 3 4 5 6 7 8 9
  * time        (time) datetime64[ns] 40B 2009-11-19T12:00:00 ... 2009-11-19T...
Attributes:
    units:          m
    standard_name:  z
    long_name:      vertical position
    axis:           Z
    positive:       up
    minval:         -60.902836
    maxval:         -33.022465
m.o.elements
ID: [0 1 2 3 4 5 6 7 8 9]
status: [0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
moving: [1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]
age_seconds: [14400. 14400. 14400. 14400. 14400. 14400. 14400. 14400. 14400. 14400.]
origin_marker: [0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
lon: [-89.84701462 -89.85956583 -89.8545143  -89.8430152  -89.84578753
 -89.87295416 -89.85405211 -89.86476458 -89.86482353 -89.8600679 ]
lat: [28.79292072 28.8067526  28.80038934 28.79294779 28.79573707 28.79813329
 28.80638441 28.79102332 28.79710355 28.78385176]
z: [-37.89022099 -34.45422065 -33.98891192 -37.29809764 -37.76813434
 -33.02246612 -35.59567233 -35.38267851 -33.41273218 -36.14036719]
wind_drift_factor: [0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
current_drift_factor: [1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]
terminal_velocity: [0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
stage_fraction: [1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]
hatched: [1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]

OpenOil

This model simulates the transport of oil. Processes optionally modeled (which are included in PTM by default) include:

  • “emulsification”

  • “dispersion”

  • “evaporation”

  • “update_oilfilm_thickness”

  • “biodegradation”

There are also specific seeding options for this model:

  • “m3_per_hour”

  • “oil_film_thickness”

  • “droplet_size_distribution”

  • “droplet_diameter_mu”

  • “droplet_diameter_sigma”

  • “droplet_diameter_min_subsea”

  • “droplet_diameter_max_subsea”

Initialize manager m

m = ptm.OpenDriftModel(drift_model="OpenOil", lon=-89.85, lat=28.08, number=10, steps=45,
                       z=-10, do3D=True, oil_type="EC00561",
                       start_time="2009-11-19T12:00", ocean_model="TXLA",
                       ocean_model_local=False,
                       )
m.setup_for_simulation()
m.o.set_config('environment:constant:x_wind', -1)
m.o.set_config('environment:constant:y_wind', 1)
2026-04-09 20:19:13 INFO    root.config_logging.setup_logger:54: Particle tracking manager simulation.
2026-04-09 20:19:13 INFO    root.config_logging.setup_logger:55: Log filename: output-results_2026-04-09T201913Z.log
2026-04-09 20:19:13 INFO    root.config_the_manager.timedir:348: Running model forward in time.
2026-04-09 20:19:13 INFO    root.config_the_manager.timedir:348: Running model forward in time.
2026-04-09 20:19:13 INFO    root.config_ocean_model.register_on_the_fly:230: Registered new ocean model or altered existing ocean model in the registry.
20:19:13 INFO    opendrift:568: OpenDriftSimulation initialised (version 1.14.9)

Note that oil_type was input by its oil id, in order to disambiguate the oils in ADIOS.

List of available oil types can be found in the

  1. NOAA’s ADIOS database https://adios.orr.noaa.gov/oils

  2. or in the library’s OIL_ID_TO_NAME dictionary:

You can also find the oil IDs by name in said database or in the library’s NAME_TO_OIL_ID dictionary. E.g.:

ptm.models.opendrift.enums.oil_types.NAME_TO_OIL_ID["ALASKA NORTH SLOPE"]
['AD00020', 'AD01986']

Keep in mind that some oil types share the same name which is why NAME_TO_OIL_ID contains lists of IDs.

The configuration parameters for this simulation are:

pprint.pprint(m.config.model_dump())
20:19:13 INFO    root:296: Using seed_flag "elements".
20:19:13 INFO    root:348: Running model forward in time.
{'biodegradation': True,
 'coastline_action': 'stranding',
 'current_uncertainty': 0.0,
 'diffusivitymodel': 'windspeed_Large1994',
 'dispersion': True,
 'do3D': True,
 'drift_model': 'OpenOil',
 'droplet_diameter_max_subsea': 0.005,
 'droplet_diameter_min_subsea': 0.0005,
 'droplet_diameter_mu': 0.001,
 'droplet_diameter_sigma': 0.0005,
 'droplet_size_distribution': 'uniform',
 'duration': 'P0DT3H45M0S',
 'emulsification': True,
 'end_time': datetime.datetime(2009, 11, 19, 15, 45),
 'evaporation': True,
 'export_variables': None,
 'geojson': None,
 'horizontal_diffusivity': 100.0,
 'interpolator_filename': PosixPath('/home/docs/.cache/particle-tracking-manager/TXLA_interpolator.pickle'),
 'lat': 28.08,
 'log_level': 'INFO',
 'lon': -89.85,
 'm3_per_hour': 1.0,
 'max_speed': 20.0,
 'mixed_layer_depth': 20.0,
 'model': 'opendrift',
 'number': 10,
 'ocean_model': 'TXLA',
 'ocean_model_config': {'chunks': None,
                        'dx': 1000.0,
                        'end_time_fixed': datetime.datetime(2009, 11, 19, 16, 0),
                        'kerchunk_func_str': None,
                        'lat_max': 30.62933797,
                        'lat_min': 27.48800453,
                        'loc_remote': '/home/docs/.cache/xroms/ROMS_example_full_grid.nc',
                        'lon_max': -88.0137713,
                        'lon_min': -93.04208536,
                        'model_drop_vars': [],
                        'name': 'TXLA',
                        'oceanmodel_lon0_360': False,
                        'standard_name_mapping': {'mask_rho': 'land_binary_mask'},
                        'start_time_model': datetime.datetime(2009, 11, 19, 12, 0),
                        'temporal_resolution_str': 'PT1H'},
 'ocean_model_local': False,
 'ocean_model_simulation': {'ocean_model_local': False},
 'oil_film_thickness': 0.001,
 'oil_type': 'EC00561',
 'output_file': PosixPath('output-results_2026-04-09T201913Z.nc'),
 'output_format': 'netcdf',
 'plots': None,
 'radius': 1000.0,
 'radius_type': 'gaussian',
 'run_forward': True,
 'save_interpolator': True,
 'seafloor_action': 'lift_to_seafloor',
 'seed_flag': 'elements',
 'seed_seafloor': False,
 'start_time': datetime.datetime(2009, 11, 19, 12, 0),
 'start_time_end': None,
 'steps': 45,
 'stokes_drift': True,
 'time_step': 300.0,
 'time_step_output': 3600.0,
 'time_step_output_integer': 12,
 'timedir': 1,
 'update_oilfilm_thickness': True,
 'use_auto_landmask': False,
 'use_cache': True,
 'use_static_masks': False,
 'vertical_advection_at_surface': True,
 'vertical_mixing': True,
 'vertical_mixing_at_surface': True,
 'vertical_mixing_timestep': 60.0,
 'wind_drift': True,
 'wind_drift_depth': 0.1,
 'wind_drift_factor': 0.03,
 'wind_uncertainty': 0.0,
 'z': -10.0}

Run

m.run_all()
2026-04-09 20:19:13 WARNING opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:187: Vstretching not found, using 1
2026-04-09 20:19:13 WARNING opendrift.readers.reader_ROMS_native.reader_ROMS_native.__init__:187: Vstretching not found, using 1
20:19:13 WARNING opendrift.readers.reader_ROMS_native:187: Vstretching not found, using 1
2026-04-09 20:19:13 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:19:13 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:19:13 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:19:13 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:19:13 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:19:13 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:19:13 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:19:13 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:19:13 WARNING opendrift.readers.basereader.structured.structured.__init__:50: No proj string or projection could be derived for reader TXLA, using 'fakeproj'.
20:19:13 WARNING opendrift.readers.basereader.structured:50: No proj string or projection could be derived for reader TXLA, using 'fakeproj'.
2026-04-09 20:19:13 INFO    opendrift.readers.basereader.structured.structured.__init__:81: Loading previously saved interpolator for lon,lat to x,y conversion.
2026-04-09 20:19:13 INFO    opendrift.readers.basereader.structured.structured.__init__:81: Loading previously saved interpolator for lon,lat to x,y conversion.
2026-04-09 20:19:13 INFO    opendrift.readers.basereader.structured.structured.__init__:81: Loading previously saved interpolator for lon,lat to x,y conversion.
20:19:13 INFO    opendrift.readers.basereader.structured:81: Loading previously saved interpolator for lon,lat to x,y conversion.
20:19:13 INFO    root:296: Using seed_flag "elements".
20:19:13 INFO    root:296: Using seed_flag "elements".
20:19:13 INFO    root:296: Using seed_flag "elements".
2026-04-09 20:19:13 INFO    opendrift.models.openoil.openoil.openoil.seed_elements:1660: Using uniform droplet size distribution between 0.0005 and 0.005 m for elements seeded below sea surface.
20:19:13 INFO    opendrift.models.openoil.openoil:1660: Using uniform droplet size distribution between 0.0005 and 0.005 m for elements seeded below sea surface.
2026-04-09 20:19:13 INFO    opendrift.models.openoil.adios.dirjs.dirjs.find_full_oil_from_name:86: Querying ADIOS database for oil: Cook Inlet [2003]
20:19:13 INFO    opendrift.models.openoil.adios.dirjs:86: Querying ADIOS database for oil: Cook Inlet [2003]
2026-04-09 20:19:13 INFO    opendrift.models.openoil.openoil.openoil.seed_elements:1726: Using density 856.794 and viscosity 1.0721517105006031e-05 of oiltype Cook Inlet [2003]
20:19:13 INFO    opendrift.models.openoil.openoil:1726: Using density 856.794 and viscosity 1.0721517105006031e-05 of oiltype Cook Inlet [2003]
2026-04-09 20:19:13 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:19:13 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:19:13 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:19:13 INFO    opendrift.models.basemodel.environment:227: Fallback values will be used for the following variables which have no readers: 
2026-04-09 20:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	upward_sea_water_velocity: 0.000000
2026-04-09 20:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	upward_sea_water_velocity: 0.000000
2026-04-09 20:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	upward_sea_water_velocity: 0.000000
20:19:13 INFO    opendrift.models.basemodel.environment:230: 	upward_sea_water_velocity: 0.000000
2026-04-09 20:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_significant_height: 0.000000
2026-04-09 20:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_significant_height: 0.000000
2026-04-09 20:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_significant_height: 0.000000
20:19:13 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_significant_height: 0.000000
2026-04-09 20:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
2026-04-09 20:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
2026-04-09 20:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
20:19:13 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
2026-04-09 20:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
2026-04-09 20:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
2026-04-09 20:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
20:19:13 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
2026-04-09 20:19:13 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:19:13 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:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_surface_wave_period_at_variance_spectral_density_maximum: 0.000000
20:19:13 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_period_at_variance_spectral_density_maximum: 0.000000
2026-04-09 20:19:13 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:19:13 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:19:13 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:19:13 INFO    opendrift.models.basemodel.environment:230: 	sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment: 0.000000
2026-04-09 20:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_ice_area_fraction: 0.000000
2026-04-09 20:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_ice_area_fraction: 0.000000
2026-04-09 20:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_ice_area_fraction: 0.000000
20:19:13 INFO    opendrift.models.basemodel.environment:230: 	sea_ice_area_fraction: 0.000000
2026-04-09 20:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_ice_x_velocity: 0.000000
2026-04-09 20:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_ice_x_velocity: 0.000000
2026-04-09 20:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_ice_x_velocity: 0.000000
20:19:13 INFO    opendrift.models.basemodel.environment:230: 	sea_ice_x_velocity: 0.000000
2026-04-09 20:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_ice_y_velocity: 0.000000
2026-04-09 20:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_ice_y_velocity: 0.000000
2026-04-09 20:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	sea_ice_y_velocity: 0.000000
20:19:13 INFO    opendrift.models.basemodel.environment:230: 	sea_ice_y_velocity: 0.000000
2026-04-09 20:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	ocean_vertical_diffusivity: 0.020000
2026-04-09 20:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	ocean_vertical_diffusivity: 0.020000
2026-04-09 20:19:13 INFO    opendrift.models.basemodel.environment.environment.__assert_no_missing_variables__:230: 	ocean_vertical_diffusivity: 0.020000
20:19:13 INFO    opendrift.models.basemodel.environment:230: 	ocean_vertical_diffusivity: 0.020000
20:19:13 INFO    root:168: start_time: 2009-11-19 12:00:00, end_time: 2009-11-19 15:45:00, steps: 45, duration: P0DT3H45M0S
20:19:13 INFO    root:296: Using seed_flag "elements".
20:19:13 INFO    root:348: Running model forward in time.
20:19:13 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:19:13 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:19:13 WARNING opendrift:1993: Simulation end is not at an output time step. Extending duration from 3:45:00 to 4:00:00
20:19:13 INFO    opendrift:947: Using existing reader for land_binary_mask to move elements to ocean
2026-04-09 20:19:13 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_rho:367: Using mask_rho for mask_rho
2026-04-09 20:19:13 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_rho:367: Using mask_rho for mask_rho
20:19:13 INFO    opendrift.readers.reader_ROMS_native:367: Using mask_rho for mask_rho
20:19:13 INFO    opendrift:978: All points are in ocean
2026-04-09 20:19:13 INFO    opendrift.models.openoil.openoil.openoil.prepare_run:697: Oil-water surface tension is 0.030235 Nm
20:19:13 INFO    opendrift.models.openoil.openoil:697: Oil-water surface tension is 0.030235 Nm
2026-04-09 20:19:13 INFO    opendrift.models.openoil.openoil.openoil.prepare_run:710: Max water fraction not available for Cook Inlet [2003], using default
20:19:13 INFO    opendrift.models.openoil.openoil:710: Max water fraction not available for Cook Inlet [2003], using default
20:19:13 INFO    opendrift:2202: 2009-11-19 12:00:00 - step 1 of 48 - 10 active elements (0 deactivated)
2026-04-09 20:19:13 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.zeta:418: Using zeta for sea surface height
2026-04-09 20:19:13 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.zeta:418: Using zeta for sea surface height
20:19:13 INFO    opendrift.readers.reader_ROMS_native:418: Using zeta for sea surface height
2026-04-09 20:19:13 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_u:388: Using mask_u for mask_u
2026-04-09 20:19:13 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_u:388: Using mask_u for mask_u
20:19:13 INFO    opendrift.readers.reader_ROMS_native:388: Using mask_u for mask_u
2026-04-09 20:19:13 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.get_variables:639: Time: 0:00:00.102445
2026-04-09 20:19:13 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.get_variables:639: Time: 0:00:00.102445
20:19:13 INFO    opendrift.readers.reader_ROMS_native:639: Time: 0:00:00.102445
2026-04-09 20:19:13 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_v:409: Using mask_v for mask_v
2026-04-09 20:19:13 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.mask_v:409: Using mask_v for mask_v
20:19:13 INFO    opendrift.readers.reader_ROMS_native:409: Using mask_v for mask_v
2026-04-09 20:19:13 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.angle:432: Using angle from Dataset.
2026-04-09 20:19:13 INFO    opendrift.readers.reader_ROMS_native.reader_ROMS_native.angle:432: Using angle from Dataset.
20:19:13 INFO    opendrift.readers.reader_ROMS_native:432: Using angle from Dataset.
20:19:14 INFO    opendrift:2202: 2009-11-19 12:05:00 - step 2 of 48 - 10 active elements (0 deactivated)
20:19:14 INFO    opendrift:2202: 2009-11-19 12:10:00 - step 3 of 48 - 10 active elements (0 deactivated)
20:19:14 INFO    opendrift:2202: 2009-11-19 12:15:00 - step 4 of 48 - 10 active elements (0 deactivated)
20:19:14 INFO    opendrift:2202: 2009-11-19 12:20:00 - step 5 of 48 - 10 active elements (0 deactivated)
20:19:14 INFO    opendrift:2202: 2009-11-19 12:25:00 - step 6 of 48 - 10 active elements (0 deactivated)
20:19:14 INFO    opendrift:2202: 2009-11-19 12:30:00 - step 7 of 48 - 10 active elements (0 deactivated)
20:19:14 INFO    opendrift:2202: 2009-11-19 12:35:00 - step 8 of 48 - 10 active elements (0 deactivated)
20:19:14 INFO    opendrift:2202: 2009-11-19 12:40:00 - step 9 of 48 - 10 active elements (0 deactivated)
20:19:14 INFO    opendrift:2202: 2009-11-19 12:45:00 - step 10 of 48 - 10 active elements (0 deactivated)
20:19:14 INFO    opendrift:2202: 2009-11-19 12:50:00 - step 11 of 48 - 10 active elements (0 deactivated)
20:19:14 INFO    opendrift:2202: 2009-11-19 12:55:00 - step 12 of 48 - 10 active elements (0 deactivated)
20:19:14 INFO    opendrift:2202: 2009-11-19 13:00:00 - step 13 of 48 - 10 active elements (0 deactivated)
20:19:14 INFO    opendrift:2202: 2009-11-19 13:05:00 - step 14 of 48 - 10 active elements (0 deactivated)
20:19:14 INFO    opendrift:2202: 2009-11-19 13:10:00 - step 15 of 48 - 10 active elements (0 deactivated)
20:19:14 INFO    opendrift:2202: 2009-11-19 13:15:00 - step 16 of 48 - 10 active elements (0 deactivated)
20:19:14 INFO    opendrift:2202: 2009-11-19 13:20:00 - step 17 of 48 - 10 active elements (0 deactivated)
20:19:15 INFO    opendrift:2202: 2009-11-19 13:25:00 - step 18 of 48 - 10 active elements (0 deactivated)
20:19:15 INFO    opendrift:2202: 2009-11-19 13:30:00 - step 19 of 48 - 10 active elements (0 deactivated)
20:19:15 INFO    opendrift:2202: 2009-11-19 13:35:00 - step 20 of 48 - 10 active elements (0 deactivated)
20:19:15 INFO    opendrift:2202: 2009-11-19 13:40:00 - step 21 of 48 - 10 active elements (0 deactivated)
20:19:15 INFO    opendrift:2202: 2009-11-19 13:45:00 - step 22 of 48 - 10 active elements (0 deactivated)
20:19:15 INFO    opendrift:2202: 2009-11-19 13:50:00 - step 23 of 48 - 10 active elements (0 deactivated)
20:19:15 INFO    opendrift:2202: 2009-11-19 13:55:00 - step 24 of 48 - 10 active elements (0 deactivated)
20:19:15 INFO    opendrift:2202: 2009-11-19 14:00:00 - step 25 of 48 - 10 active elements (0 deactivated)
20:19:15 INFO    opendrift:2202: 2009-11-19 14:05:00 - step 26 of 48 - 10 active elements (0 deactivated)
20:19:15 INFO    opendrift:2202: 2009-11-19 14:10:00 - step 27 of 48 - 10 active elements (0 deactivated)
20:19:15 INFO    opendrift:2202: 2009-11-19 14:15:00 - step 28 of 48 - 10 active elements (0 deactivated)
20:19:15 INFO    opendrift:2202: 2009-11-19 14:20:00 - step 29 of 48 - 10 active elements (0 deactivated)
20:19:15 INFO    opendrift:2202: 2009-11-19 14:25:00 - step 30 of 48 - 10 active elements (0 deactivated)
20:19:15 INFO    opendrift:2202: 2009-11-19 14:30:00 - step 31 of 48 - 10 active elements (0 deactivated)
20:19:15 INFO    opendrift:2202: 2009-11-19 14:35:00 - step 32 of 48 - 10 active elements (0 deactivated)
20:19:15 INFO    opendrift:2202: 2009-11-19 14:40:00 - step 33 of 48 - 10 active elements (0 deactivated)
20:19:15 INFO    opendrift:2202: 2009-11-19 14:45:00 - step 34 of 48 - 10 active elements (0 deactivated)
20:19:15 WARNING opendrift:2487: Missing variables: ['x_sea_water_velocity', 'y_sea_water_velocity', 'land_binary_mask']
20:19:15 INFO    opendrift:2202: 2009-11-19 14:50:00 - step 35 of 48 - 9 active elements (1 deactivated)
20:19:15 INFO    opendrift:2202: 2009-11-19 14:55:00 - step 36 of 48 - 9 active elements (1 deactivated)
20:19:15 INFO    opendrift:2202: 2009-11-19 15:00:00 - step 37 of 48 - 9 active elements (1 deactivated)
20:19:15 INFO    opendrift:2202: 2009-11-19 15:05:00 - step 38 of 48 - 9 active elements (1 deactivated)
20:19:16 INFO    opendrift:2202: 2009-11-19 15:10:00 - step 39 of 48 - 9 active elements (1 deactivated)
20:19:16 INFO    opendrift:2202: 2009-11-19 15:15:00 - step 40 of 48 - 9 active elements (1 deactivated)
20:19:16 INFO    opendrift:2202: 2009-11-19 15:20:00 - step 41 of 48 - 9 active elements (1 deactivated)
20:19:16 INFO    opendrift:2202: 2009-11-19 15:25:00 - step 42 of 48 - 9 active elements (1 deactivated)
20:19:16 INFO    opendrift:2202: 2009-11-19 15:30:00 - step 43 of 48 - 9 active elements (1 deactivated)
20:19:16 INFO    opendrift:2202: 2009-11-19 15:35:00 - step 44 of 48 - 9 active elements (1 deactivated)
20:19:16 INFO    opendrift:2202: 2009-11-19 15:40:00 - step 45 of 48 - 9 active elements (1 deactivated)
20:19:16 INFO    opendrift:2202: 2009-11-19 15:45:00 - step 46 of 48 - 9 active elements (1 deactivated)
20:19:16 WARNING opendrift:2487: Missing variables: ['x_sea_water_velocity', 'y_sea_water_velocity', 'land_binary_mask']
20:19:16 INFO    opendrift:2202: 2009-11-19 15:50:00 - step 47 of 48 - 8 active elements (2 deactivated)
20:19:16 INFO    opendrift:2202: 2009-11-19 15:55:00 - step 48 of 48 - 8 active elements (2 deactivated)
20:19:16 WARNING opendrift:2487: Missing variables: ['x_sea_water_velocity', 'y_sea_water_velocity', 'land_binary_mask']

Run the plots after the simulation has finished:

import particle_tracking_manager.models.opendrift.plot as plot
plots = plot.make_plots_after_simulation(m.config.output_file,
                                 plots={'spaghetti': {'linecolor': 'z', 'cmap': 'cmo.deep'},
                                        'oil': {'show_wind_and_current': True}})
20:19:16 INFO    opendrift:568: OpenDriftSimulation initialised (version 1.14.9)
20:19:16 DEBUG   opendrift:1802: Removed 3 elements.
2026-04-09 20:19:16 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:19:16 WARNING opendrift.export.io_netcdf.io_netcdf.import_file:186: time data '3600.0' does not match format '%H:%M:%S'
20:19:16 WARNING opendrift.export.io_netcdf:186: time data '3600.0' does not match format '%H:%M:%S'
2026-04-09 20:19:16 WARNING opendrift.export.io_netcdf.io_netcdf.import_file:187: Could not parse time_steps from netCDF file
2026-04-09 20:19:16 WARNING opendrift.export.io_netcdf.io_netcdf.import_file:187: Could not parse time_steps from netCDF file
20:19:16 WARNING opendrift.export.io_netcdf:187: Could not parse time_steps from netCDF file
20:19:16 INFO    opendrift:87: Returning <class 'opendrift.models.openoil.openoil.OpenOil'> object
20:19:16 DEBUG   opendrift:2531: Setting up map: corners=None, fast=True, lscale=None
20:19:16 WARNING opendrift:2565: Plotting fast. This will make your plots less accurate.
20:19:18 INFO    opendrift:3899: Time to make plot: 0:00:01.649654
20:19:18 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201913Z_spaghetti_fast_True_linecolor_z_cmap_cmo.deep.png
20:19:19 INFO    opendrift:247: Saved plot to output-results_2026-04-09T201913Z_oil_show_wind_and_current_True_show_watercontent_and_viscosity_True.png
_images/f17219c5a6988abc449b6eab7ccc7cf5297972f4164d1f1eabbdb01daf1214dd.png

To show the second plot:

from IPython.display import Image

image_filename = plots["oil"]["filename"]
Image(filename=image_filename)
_images/66d211c943e7aea74c61f10a81fb13721ae48e1967f46f7f7ad4d9588c2aa894.png