Note
Go to the end to download the full example code.
Ensemble
from datetime import timedelta
import numpy as np
from opendrift.models.oceandrift import OceanDrift
from opendrift.readers import reader_netCDF_CF_generic
Drift simulation using 30 member ensemble wind data from MEPS model of MET Norway
o = OceanDrift(loglevel=20)
o.set_config('drift:vertical_mixing', False)
r = reader_netCDF_CF_generic.Reader('https://thredds.met.no/thredds/dodsC/mepslatest/meps_lagged_6_h_latest_2_5km_latest.nc')
o.add_reader(r)
o.seed_elements(lat=60, lon=4.9, time=r.start_time,
radius=1000, number=10000)
o.run(duration=timedelta(hours=50), time_step=600, time_step_output=3600)
08:24:12 INFO opendrift:568: OpenDriftSimulation initialised (version 1.14.9 / v1.14.9-9-gcde0dcf)
08:24:12 INFO opendrift.readers:64: Opening file with xr.open_dataset
08:24:13 INFO opendrift.readers.reader_netCDF_CF_generic:340: Detected dimensions: {'time': 'time', 'x': 'x', 'y': 'y'}
08:24:13 INFO opendrift.models.basemodel.environment:203: Adding a global landmask from GSHHG
08:24:18 INFO opendrift.models.basemodel.environment:227: Fallback values will be used for the following variables which have no readers:
08:24:18 INFO opendrift.models.basemodel.environment:230: x_sea_water_velocity: 0.000000
08:24:18 INFO opendrift.models.basemodel.environment:230: y_sea_water_velocity: 0.000000
08:24:18 INFO opendrift.models.basemodel.environment:230: sea_surface_height: 0.000000
08:24:18 INFO opendrift.models.basemodel.environment:230: upward_sea_water_velocity: 0.000000
08:24:18 INFO opendrift.models.basemodel.environment:230: ocean_vertical_diffusivity: 0.000000
08:24:18 INFO opendrift.models.basemodel.environment:230: horizontal_diffusivity: 0.000000
08:24:18 INFO opendrift.models.basemodel.environment:230: sea_surface_wave_significant_height: 0.000000
08:24:18 INFO opendrift.models.basemodel.environment:230: sea_surface_wave_stokes_drift_x_velocity: 0.000000
08:24:18 INFO opendrift.models.basemodel.environment:230: sea_surface_wave_stokes_drift_y_velocity: 0.000000
08:24:18 INFO opendrift.models.basemodel.environment:230: ocean_mixed_layer_thickness: 50.000000
08:24:18 INFO opendrift.models.basemodel.environment:230: sea_floor_depth_below_sea_level: 10000.000000
08:24:18 INFO opendrift:1828: Skipping environment variable ocean_vertical_diffusivity because of condition ['drift:vertical_mixing', 'is', False]
08:24:18 INFO opendrift:1828: Skipping environment variable ocean_mixed_layer_thickness because of condition ['drift:vertical_mixing', 'is', False]
08:24:18 INFO opendrift:1839: Storing previous values of element property lon because of condition (('general:coastline_action', 'in', ['stranding', 'previous']), 'or', ('general:seafloor_action', 'in', ['previous']))
08:24:18 INFO opendrift:1839: Storing previous values of element property lat because of condition (('general:coastline_action', 'in', ['stranding', 'previous']), 'or', ('general:seafloor_action', 'in', ['previous']))
08:24:18 INFO opendrift:1847: Storing previous values of environment variable sea_surface_height because of condition ['drift:vertical_advection', 'is', True]
08:24:18 INFO opendrift:947: Using existing reader for land_binary_mask to move elements to ocean
08:24:18 INFO opendrift:978: All points are in ocean
08:24:18 INFO opendrift:2136: 2026-03-25 06:00:00 - step 1 of 300 - 10000 active elements (0 deactivated)
08:24:19 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:19 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:19 INFO opendrift:2136: 2026-03-25 06:10:00 - step 2 of 300 - 10000 active elements (0 deactivated)
08:24:19 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:19 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:19 INFO opendrift:2136: 2026-03-25 06:20:00 - step 3 of 300 - 10000 active elements (0 deactivated)
08:24:19 INFO opendrift:2136: 2026-03-25 06:30:00 - step 4 of 300 - 10000 active elements (0 deactivated)
08:24:20 INFO opendrift:2136: 2026-03-25 06:40:00 - step 5 of 300 - 10000 active elements (0 deactivated)
08:24:20 INFO opendrift:2136: 2026-03-25 06:50:00 - step 6 of 300 - 10000 active elements (0 deactivated)
08:24:20 INFO opendrift:2136: 2026-03-25 07:00:00 - step 7 of 300 - 10000 active elements (0 deactivated)
08:24:20 INFO opendrift:2136: 2026-03-25 07:10:00 - step 8 of 300 - 10000 active elements (0 deactivated)
08:24:20 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:20 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:21 INFO opendrift:2136: 2026-03-25 07:20:00 - step 9 of 300 - 10000 active elements (0 deactivated)
08:24:21 INFO opendrift:2136: 2026-03-25 07:30:00 - step 10 of 300 - 10000 active elements (0 deactivated)
08:24:21 INFO opendrift:2136: 2026-03-25 07:40:00 - step 11 of 300 - 10000 active elements (0 deactivated)
08:24:21 INFO opendrift:2136: 2026-03-25 07:50:00 - step 12 of 300 - 10000 active elements (0 deactivated)
08:24:21 INFO opendrift:2136: 2026-03-25 08:00:00 - step 13 of 300 - 10000 active elements (0 deactivated)
08:24:21 INFO opendrift:2136: 2026-03-25 08:10:00 - step 14 of 300 - 10000 active elements (0 deactivated)
08:24:22 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:22 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:22 INFO opendrift:2136: 2026-03-25 08:20:00 - step 15 of 300 - 10000 active elements (0 deactivated)
08:24:22 INFO opendrift:2136: 2026-03-25 08:30:00 - step 16 of 300 - 10000 active elements (0 deactivated)
08:24:22 INFO opendrift:2136: 2026-03-25 08:40:00 - step 17 of 300 - 10000 active elements (0 deactivated)
08:24:22 INFO opendrift:2136: 2026-03-25 08:50:00 - step 18 of 300 - 10000 active elements (0 deactivated)
08:24:22 INFO opendrift:2136: 2026-03-25 09:00:00 - step 19 of 300 - 10000 active elements (0 deactivated)
08:24:23 INFO opendrift:2136: 2026-03-25 09:10:00 - step 20 of 300 - 10000 active elements (0 deactivated)
08:24:23 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:23 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:23 INFO opendrift:2136: 2026-03-25 09:20:00 - step 21 of 300 - 10000 active elements (0 deactivated)
08:24:23 INFO opendrift:2136: 2026-03-25 09:30:00 - step 22 of 300 - 10000 active elements (0 deactivated)
08:24:23 INFO opendrift:2136: 2026-03-25 09:40:00 - step 23 of 300 - 10000 active elements (0 deactivated)
08:24:23 INFO opendrift:2136: 2026-03-25 09:50:00 - step 24 of 300 - 10000 active elements (0 deactivated)
08:24:27 INFO opendrift:2136: 2026-03-25 10:00:00 - step 25 of 300 - 9999 active elements (1 deactivated)
08:24:27 INFO opendrift:2136: 2026-03-25 10:10:00 - step 26 of 300 - 9999 active elements (1 deactivated)
08:24:29 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:29 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:29 INFO opendrift:2136: 2026-03-25 10:20:00 - step 27 of 300 - 9999 active elements (1 deactivated)
08:24:29 INFO opendrift:2136: 2026-03-25 10:30:00 - step 28 of 300 - 9999 active elements (1 deactivated)
08:24:29 INFO opendrift:2136: 2026-03-25 10:40:00 - step 29 of 300 - 9999 active elements (1 deactivated)
08:24:29 INFO opendrift:2136: 2026-03-25 10:50:00 - step 30 of 300 - 9999 active elements (1 deactivated)
08:24:30 INFO opendrift:2136: 2026-03-25 11:00:00 - step 31 of 300 - 9997 active elements (3 deactivated)
08:24:30 INFO opendrift:2136: 2026-03-25 11:10:00 - step 32 of 300 - 9996 active elements (4 deactivated)
08:24:31 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:31 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:32 INFO opendrift:2136: 2026-03-25 11:20:00 - step 33 of 300 - 9994 active elements (6 deactivated)
08:24:32 INFO opendrift:2136: 2026-03-25 11:30:00 - step 34 of 300 - 9993 active elements (7 deactivated)
08:24:32 INFO opendrift:2136: 2026-03-25 11:40:00 - step 35 of 300 - 9992 active elements (8 deactivated)
08:24:32 INFO opendrift:2136: 2026-03-25 11:50:00 - step 36 of 300 - 9991 active elements (9 deactivated)
08:24:32 INFO opendrift:2136: 2026-03-25 12:00:00 - step 37 of 300 - 9990 active elements (10 deactivated)
08:24:32 INFO opendrift:2136: 2026-03-25 12:10:00 - step 38 of 300 - 9989 active elements (11 deactivated)
08:24:34 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:34 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:34 INFO opendrift:2136: 2026-03-25 12:20:00 - step 39 of 300 - 9988 active elements (12 deactivated)
08:24:34 INFO opendrift:2136: 2026-03-25 12:30:00 - step 40 of 300 - 9988 active elements (12 deactivated)
08:24:34 INFO opendrift:2136: 2026-03-25 12:40:00 - step 41 of 300 - 9985 active elements (15 deactivated)
08:24:34 INFO opendrift:2136: 2026-03-25 12:50:00 - step 42 of 300 - 9982 active elements (18 deactivated)
08:24:34 INFO opendrift:2136: 2026-03-25 13:00:00 - step 43 of 300 - 9981 active elements (19 deactivated)
08:24:34 INFO opendrift:2136: 2026-03-25 13:10:00 - step 44 of 300 - 9981 active elements (19 deactivated)
08:24:36 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:36 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:36 INFO opendrift:2136: 2026-03-25 13:20:00 - step 45 of 300 - 9981 active elements (19 deactivated)
08:24:36 INFO opendrift:2136: 2026-03-25 13:30:00 - step 46 of 300 - 9980 active elements (20 deactivated)
08:24:37 INFO opendrift:2136: 2026-03-25 13:40:00 - step 47 of 300 - 9980 active elements (20 deactivated)
08:24:37 INFO opendrift:2136: 2026-03-25 13:50:00 - step 48 of 300 - 9978 active elements (22 deactivated)
08:24:37 INFO opendrift:2136: 2026-03-25 14:00:00 - step 49 of 300 - 9977 active elements (23 deactivated)
08:24:37 INFO opendrift:2136: 2026-03-25 14:10:00 - step 50 of 300 - 9975 active elements (25 deactivated)
08:24:39 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:39 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:39 INFO opendrift:2136: 2026-03-25 14:20:00 - step 51 of 300 - 9975 active elements (25 deactivated)
08:24:39 INFO opendrift:2136: 2026-03-25 14:30:00 - step 52 of 300 - 9969 active elements (31 deactivated)
08:24:39 INFO opendrift:2136: 2026-03-25 14:40:00 - step 53 of 300 - 9965 active elements (35 deactivated)
08:24:39 INFO opendrift:2136: 2026-03-25 14:50:00 - step 54 of 300 - 9961 active elements (39 deactivated)
08:24:39 INFO opendrift:2136: 2026-03-25 15:00:00 - step 55 of 300 - 9956 active elements (44 deactivated)
08:24:39 INFO opendrift:2136: 2026-03-25 15:10:00 - step 56 of 300 - 9950 active elements (50 deactivated)
08:24:41 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:41 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:41 INFO opendrift:2136: 2026-03-25 15:20:00 - step 57 of 300 - 9939 active elements (61 deactivated)
08:24:41 INFO opendrift:2136: 2026-03-25 15:30:00 - step 58 of 300 - 9935 active elements (65 deactivated)
08:24:41 INFO opendrift:2136: 2026-03-25 15:40:00 - step 59 of 300 - 9926 active elements (74 deactivated)
08:24:41 INFO opendrift:2136: 2026-03-25 15:50:00 - step 60 of 300 - 9918 active elements (82 deactivated)
08:24:41 INFO opendrift:2136: 2026-03-25 16:00:00 - step 61 of 300 - 9898 active elements (102 deactivated)
08:24:42 INFO opendrift:2136: 2026-03-25 16:10:00 - step 62 of 300 - 9879 active elements (121 deactivated)
08:24:43 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:43 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:43 INFO opendrift:2136: 2026-03-25 16:20:00 - step 63 of 300 - 9868 active elements (132 deactivated)
08:24:44 INFO opendrift:2136: 2026-03-25 16:30:00 - step 64 of 300 - 9853 active elements (147 deactivated)
08:24:44 INFO opendrift:2136: 2026-03-25 16:40:00 - step 65 of 300 - 9833 active elements (167 deactivated)
08:24:44 INFO opendrift:2136: 2026-03-25 16:50:00 - step 66 of 300 - 9813 active elements (187 deactivated)
08:24:44 INFO opendrift:2136: 2026-03-25 17:00:00 - step 67 of 300 - 9794 active elements (206 deactivated)
08:24:44 INFO opendrift:2136: 2026-03-25 17:10:00 - step 68 of 300 - 9771 active elements (229 deactivated)
08:24:46 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:46 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:46 INFO opendrift:2136: 2026-03-25 17:20:00 - step 69 of 300 - 9754 active elements (246 deactivated)
08:24:46 INFO opendrift:2136: 2026-03-25 17:30:00 - step 70 of 300 - 9735 active elements (265 deactivated)
08:24:46 INFO opendrift:2136: 2026-03-25 17:40:00 - step 71 of 300 - 9723 active elements (277 deactivated)
08:24:46 INFO opendrift:2136: 2026-03-25 17:50:00 - step 72 of 300 - 9711 active elements (289 deactivated)
08:24:46 INFO opendrift:2136: 2026-03-25 18:00:00 - step 73 of 300 - 9706 active elements (294 deactivated)
08:24:47 INFO opendrift:2136: 2026-03-25 18:10:00 - step 74 of 300 - 9700 active elements (300 deactivated)
08:24:49 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:49 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:49 INFO opendrift:2136: 2026-03-25 18:20:00 - step 75 of 300 - 9693 active elements (307 deactivated)
08:24:49 INFO opendrift:2136: 2026-03-25 18:30:00 - step 76 of 300 - 9681 active elements (319 deactivated)
08:24:49 INFO opendrift:2136: 2026-03-25 18:40:00 - step 77 of 300 - 9660 active elements (340 deactivated)
08:24:49 INFO opendrift:2136: 2026-03-25 18:50:00 - step 78 of 300 - 9641 active elements (359 deactivated)
08:24:49 INFO opendrift:2136: 2026-03-25 19:00:00 - step 79 of 300 - 9605 active elements (395 deactivated)
08:24:49 INFO opendrift:2136: 2026-03-25 19:10:00 - step 80 of 300 - 9564 active elements (436 deactivated)
08:24:51 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:51 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:51 INFO opendrift:2136: 2026-03-25 19:20:00 - step 81 of 300 - 9509 active elements (491 deactivated)
08:24:51 INFO opendrift:2136: 2026-03-25 19:30:00 - step 82 of 300 - 9449 active elements (551 deactivated)
08:24:52 INFO opendrift:2136: 2026-03-25 19:40:00 - step 83 of 300 - 9354 active elements (646 deactivated)
08:24:52 INFO opendrift:2136: 2026-03-25 19:50:00 - step 84 of 300 - 9253 active elements (747 deactivated)
08:24:52 INFO opendrift:2136: 2026-03-25 20:00:00 - step 85 of 300 - 9094 active elements (906 deactivated)
08:24:52 INFO opendrift:2136: 2026-03-25 20:10:00 - step 86 of 300 - 8920 active elements (1080 deactivated)
08:24:54 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:54 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:54 INFO opendrift:2136: 2026-03-25 20:20:00 - step 87 of 300 - 8672 active elements (1328 deactivated)
08:24:54 INFO opendrift:2136: 2026-03-25 20:30:00 - step 88 of 300 - 8394 active elements (1606 deactivated)
08:24:54 INFO opendrift:2136: 2026-03-25 20:40:00 - step 89 of 300 - 8043 active elements (1957 deactivated)
08:24:54 INFO opendrift:2136: 2026-03-25 20:50:00 - step 90 of 300 - 7696 active elements (2304 deactivated)
08:24:54 INFO opendrift:2136: 2026-03-25 21:00:00 - step 91 of 300 - 7299 active elements (2701 deactivated)
08:24:55 INFO opendrift:2136: 2026-03-25 21:10:00 - step 92 of 300 - 6877 active elements (3123 deactivated)
08:24:56 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:56 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:56 INFO opendrift:2136: 2026-03-25 21:20:00 - step 93 of 300 - 6393 active elements (3607 deactivated)
08:24:56 INFO opendrift:2136: 2026-03-25 21:30:00 - step 94 of 300 - 5899 active elements (4101 deactivated)
08:24:56 INFO opendrift:2136: 2026-03-25 21:40:00 - step 95 of 300 - 5360 active elements (4640 deactivated)
08:24:56 INFO opendrift:2136: 2026-03-25 21:50:00 - step 96 of 300 - 4842 active elements (5158 deactivated)
08:24:56 INFO opendrift:2136: 2026-03-25 22:00:00 - step 97 of 300 - 4315 active elements (5685 deactivated)
08:24:56 INFO opendrift:2136: 2026-03-25 22:10:00 - step 98 of 300 - 3825 active elements (6175 deactivated)
08:24:58 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:58 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:58 INFO opendrift:2136: 2026-03-25 22:20:00 - step 99 of 300 - 3349 active elements (6651 deactivated)
08:24:58 INFO opendrift:2136: 2026-03-25 22:30:00 - step 100 of 300 - 2901 active elements (7099 deactivated)
08:24:58 INFO opendrift:2136: 2026-03-25 22:40:00 - step 101 of 300 - 2458 active elements (7542 deactivated)
08:24:58 INFO opendrift:2136: 2026-03-25 22:50:00 - step 102 of 300 - 2107 active elements (7893 deactivated)
08:24:58 INFO opendrift:2136: 2026-03-25 23:00:00 - step 103 of 300 - 1758 active elements (8242 deactivated)
08:24:58 INFO opendrift:2136: 2026-03-25 23:10:00 - step 104 of 300 - 1424 active elements (8576 deactivated)
08:24:59 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:59 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:24:59 INFO opendrift:2136: 2026-03-25 23:20:00 - step 105 of 300 - 1177 active elements (8823 deactivated)
08:24:59 INFO opendrift:2136: 2026-03-25 23:30:00 - step 106 of 300 - 955 active elements (9045 deactivated)
08:24:59 INFO opendrift:2136: 2026-03-25 23:40:00 - step 107 of 300 - 790 active elements (9210 deactivated)
08:24:59 INFO opendrift:2136: 2026-03-25 23:50:00 - step 108 of 300 - 642 active elements (9358 deactivated)
08:24:59 INFO opendrift:2136: 2026-03-26 00:00:00 - step 109 of 300 - 538 active elements (9462 deactivated)
08:24:59 INFO opendrift:2136: 2026-03-26 00:10:00 - step 110 of 300 - 435 active elements (9565 deactivated)
08:25:00 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:25:00 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:25:00 INFO opendrift:2136: 2026-03-26 00:20:00 - step 111 of 300 - 347 active elements (9653 deactivated)
08:25:00 INFO opendrift:2136: 2026-03-26 00:30:00 - step 112 of 300 - 275 active elements (9725 deactivated)
08:25:00 INFO opendrift:2136: 2026-03-26 00:40:00 - step 113 of 300 - 224 active elements (9776 deactivated)
08:25:00 INFO opendrift:2136: 2026-03-26 00:50:00 - step 114 of 300 - 187 active elements (9813 deactivated)
08:25:00 INFO opendrift:2136: 2026-03-26 01:00:00 - step 115 of 300 - 150 active elements (9850 deactivated)
08:25:00 INFO opendrift:2136: 2026-03-26 01:10:00 - step 116 of 300 - 114 active elements (9886 deactivated)
08:25:00 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:25:00 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:25:00 INFO opendrift:2136: 2026-03-26 01:20:00 - step 117 of 300 - 88 active elements (9912 deactivated)
08:25:00 INFO opendrift:2136: 2026-03-26 01:30:00 - step 118 of 300 - 70 active elements (9930 deactivated)
08:25:00 INFO opendrift:2136: 2026-03-26 01:40:00 - step 119 of 300 - 62 active elements (9938 deactivated)
08:25:00 INFO opendrift:2136: 2026-03-26 01:50:00 - step 120 of 300 - 38 active elements (9962 deactivated)
08:25:00 INFO opendrift:2136: 2026-03-26 02:00:00 - step 121 of 300 - 33 active elements (9967 deactivated)
08:25:00 INFO opendrift:2136: 2026-03-26 02:10:00 - step 122 of 300 - 24 active elements (9976 deactivated)
08:25:01 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:25:01 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:25:01 INFO opendrift:2136: 2026-03-26 02:20:00 - step 123 of 300 - 19 active elements (9981 deactivated)
08:25:01 INFO opendrift:2136: 2026-03-26 02:30:00 - step 124 of 300 - 11 active elements (9989 deactivated)
08:25:01 INFO opendrift:2136: 2026-03-26 02:40:00 - step 125 of 300 - 6 active elements (9994 deactivated)
08:25:01 INFO opendrift:2136: 2026-03-26 02:50:00 - step 126 of 300 - 4 active elements (9996 deactivated)
08:25:01 INFO opendrift:2136: 2026-03-26 03:00:00 - step 127 of 300 - 3 active elements (9997 deactivated)
08:25:01 INFO opendrift:2136: 2026-03-26 03:10:00 - step 128 of 300 - 2 active elements (9998 deactivated)
08:25:02 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:25:02 WARNING opendrift.readers.interpolation.structured:63: Ensemble data currently not extrapolated towards seafloor
08:25:02 INFO opendrift:2136: 2026-03-26 03:20:00 - step 129 of 300 - 1 active elements (9999 deactivated)
08:25:02 WARNING opendrift:2212: The simulation stopped before requested end time was reached.
08:25:02 INFO opendrift:2214: ========================
08:25:02 INFO opendrift:2215: End of simulation:
08:25:02 INFO opendrift:2216: No more active or scheduled elements, quitting.
08:25:02 INFO opendrift:2217: Traceback (most recent call last):
File "/root/project/opendrift/models/basemodel/__init__.py", line 2199, in run
raise ValueError('No more active or scheduled elements, quitting.')
ValueError: No more active or scheduled elements, quitting.
08:25:02 INFO opendrift:2218: 'The simulation stopped before requested end time was reached.'
08:25:02 INFO opendrift:2221: ========================
Ensemble members are recycled among the 10000 particles
ensemble_number = np.remainder(np.arange(o.num_elements_total()), len(r.realizations)) + 1
o.animation(fast=True, color=ensemble_number, legend=['Member ' + str(i) for i in r.realizations], colorbar=False)
08:25:02 WARNING opendrift:2499: Plotting fast. This will make your plots less accurate.
08:25:03 INFO opendrift:4697: Saving animation to /root/project/docs/source/gallery/animations/example_ensemble_0.gif...
08:25:21 INFO opendrift:3120: Time to make animation: 0:00:18.623824
We see that elements forced by different wind ensemble members move differently
o.plot_memory_usage()

Total running time of the script: (1 minutes 17.076 seconds)