Note
Go to the end to download the full example code.
Sediment drift with resuspension
from datetime import timedelta, datetime
from opendrift.readers import reader_oscillating
from opendrift.models.sedimentdrift import SedimentDrift
Constructing an artificial current field where x- and y-components are oscilating with different amplitude and period
reader_oscx = reader_oscillating.Reader('x_sea_water_velocity',
amplitude=0.6, zero_time=datetime.now())
reader_oscy = reader_oscillating.Reader('y_sea_water_velocity',
amplitude=.3, period=timedelta(hours=5), zero_time=datetime.now())
o = SedimentDrift(loglevel=50) # 0 for debug output
if True:
o.add_reader([reader_oscx, reader_oscy])
o.set_config('environment:fallback:y_wind', -6)
o.set_config('environment:fallback:x_wind', -3)
o.set_config('environment:fallback:sea_floor_depth_below_sea_level', 30) # 100m depth
else: # Using live data from Thredds instead of oscillating currents
o.add_readers_from_list([
'https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be'])
Set threshold for bottom resuspension
o.set_config('vertical_mixing:resuspension_threshold', .5)
# Adding some horizontal and vertical diffusion
o.set_config('drift:current_uncertainty', 0.1)
o.set_config('drift:wind_uncertainty', 1)
o.set_config('vertical_mixing:diffusivitymodel', 'windspeed_Large1994')
#o.set_config('vertical_mixing:diffusivitymodel', 'environment')
Seeding sediments
o.seed_elements(lon=4.65, lat=60, number=10000,
time=[datetime.now(), datetime.now()+timedelta(hours=6)],
terminal_velocity=-.01) # 1 cm/s settling speed
o.run(time_step=1800, time_step_output=1800, duration=timedelta(hours=72))
<xarray.Dataset> Size: 145MB
Dimensions: (
trajectory: 10000,
time: 145)
Coordinates:
* trajectory (trajectory) int64 80kB ...
* time (time) datetime64[ns] 1kB ...
Data variables: (12/25)
status (trajectory, time) float32 6MB ...
moving (trajectory, time) float32 6MB ...
age_seconds (trajectory, time) float32 6MB ...
origin_marker (trajectory, time) float32 6MB ...
lon (trajectory, time) float32 6MB ...
lat (trajectory, time) float32 6MB ...
... ...
sea_surface_wave_period_at_variance_spectral_density_maximum (trajectory, time) float32 6MB ...
sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment (trajectory, time) float32 6MB ...
land_binary_mask (trajectory, time) float32 6MB ...
ocean_vertical_diffusivity (trajectory, time) float32 6MB ...
ocean_mixed_layer_thickness (trajectory, time) float32 6MB ...
sea_floor_depth_below_sea_level (trajectory, time) float32 6MB ...
Attributes: (12/126)
Conventions: ...
standard_name_vocabulary: ...
featureType: ...
title: ...
summary: ...
keywords: ...
... ...
geospatial_lon_units: ...
geospatial_lon_resolution: ...
runtime: ...
geospatial_vertical_min: ...
geospatial_vertical_max: ...
geospatial_vertical_positive: ...xarray.Dataset
- trajectory: 10000
- time: 145
- trajectory(trajectory)int640 1 2 3 4 ... 9996 9997 9998 9999
- cf_role :
- trajectory_id
- dtype :
- <class 'numpy.int32'>
array([ 0, 1, 2, ..., 9997, 9998, 9999], shape=(10000,))
- time(time)datetime64[ns]2025-10-24T11:12:39.512632 ... 2...
- standard_name :
- time
- long_name :
- time
- dtype :
- <class 'numpy.float64'>
array(['2025-10-24T11:12:39.512632000', '2025-10-24T11:42:39.512632000', '2025-10-24T12:12:39.512632000', '2025-10-24T12:42:39.512632000', '2025-10-24T13:12:39.512632000', '2025-10-24T13:42:39.512632000', '2025-10-24T14:12:39.512632000', '2025-10-24T14:42:39.512632000', '2025-10-24T15:12:39.512632000', '2025-10-24T15:42:39.512632000', '2025-10-24T16:12:39.512632000', '2025-10-24T16:42:39.512632000', '2025-10-24T17:12:39.512632000', '2025-10-24T17:42:39.512632000', '2025-10-24T18:12:39.512632000', '2025-10-24T18:42:39.512632000', '2025-10-24T19:12:39.512632000', '2025-10-24T19:42:39.512632000', '2025-10-24T20:12:39.512632000', '2025-10-24T20:42:39.512632000', '2025-10-24T21:12:39.512632000', '2025-10-24T21:42:39.512632000', '2025-10-24T22:12:39.512632000', '2025-10-24T22:42:39.512632000', '2025-10-24T23:12:39.512632000', '2025-10-24T23:42:39.512632000', '2025-10-25T00:12:39.512632000', '2025-10-25T00:42:39.512632000', '2025-10-25T01:12:39.512632000', '2025-10-25T01:42:39.512632000', '2025-10-25T02:12:39.512632000', '2025-10-25T02:42:39.512632000', '2025-10-25T03:12:39.512632000', '2025-10-25T03:42:39.512632000', '2025-10-25T04:12:39.512632000', '2025-10-25T04:42:39.512632000', '2025-10-25T05:12:39.512632000', '2025-10-25T05:42:39.512632000', '2025-10-25T06:12:39.512632000', '2025-10-25T06:42:39.512632000', '2025-10-25T07:12:39.512632000', '2025-10-25T07:42:39.512632000', '2025-10-25T08:12:39.512632000', '2025-10-25T08:42:39.512632000', '2025-10-25T09:12:39.512632000', '2025-10-25T09:42:39.512632000', '2025-10-25T10:12:39.512632000', '2025-10-25T10:42:39.512632000', '2025-10-25T11:12:39.512632000', '2025-10-25T11:42:39.512632000', '2025-10-25T12:12:39.512632000', '2025-10-25T12:42:39.512632000', '2025-10-25T13:12:39.512632000', '2025-10-25T13:42:39.512632000', '2025-10-25T14:12:39.512632000', '2025-10-25T14:42:39.512632000', '2025-10-25T15:12:39.512632000', '2025-10-25T15:42:39.512632000', '2025-10-25T16:12:39.512632000', '2025-10-25T16:42:39.512632000', '2025-10-25T17:12:39.512632000', '2025-10-25T17:42:39.512632000', '2025-10-25T18:12:39.512632000', '2025-10-25T18:42:39.512632000', '2025-10-25T19:12:39.512632000', '2025-10-25T19:42:39.512632000', '2025-10-25T20:12:39.512632000', '2025-10-25T20:42:39.512632000', '2025-10-25T21:12:39.512632000', '2025-10-25T21:42:39.512632000', '2025-10-25T22:12:39.512632000', '2025-10-25T22:42:39.512632000', '2025-10-25T23:12:39.512632000', '2025-10-25T23:42:39.512632000', '2025-10-26T00:12:39.512632000', '2025-10-26T00:42:39.512632000', '2025-10-26T01:12:39.512632000', '2025-10-26T01:42:39.512632000', '2025-10-26T02:12:39.512632000', '2025-10-26T02:42:39.512632000', '2025-10-26T03:12:39.512632000', '2025-10-26T03:42:39.512632000', '2025-10-26T04:12:39.512632000', '2025-10-26T04:42:39.512632000', '2025-10-26T05:12:39.512632000', '2025-10-26T05:42:39.512632000', '2025-10-26T06:12:39.512632000', '2025-10-26T06:42:39.512632000', '2025-10-26T07:12:39.512632000', '2025-10-26T07:42:39.512632000', '2025-10-26T08:12:39.512632000', '2025-10-26T08:42:39.512632000', '2025-10-26T09:12:39.512632000', '2025-10-26T09:42:39.512632000', '2025-10-26T10:12:39.512632000', '2025-10-26T10:42:39.512632000', '2025-10-26T11:12:39.512632000', '2025-10-26T11:42:39.512632000', '2025-10-26T12:12:39.512632000', '2025-10-26T12:42:39.512632000', '2025-10-26T13:12:39.512632000', '2025-10-26T13:42:39.512632000', '2025-10-26T14:12:39.512632000', '2025-10-26T14:42:39.512632000', '2025-10-26T15:12:39.512632000', '2025-10-26T15:42:39.512632000', '2025-10-26T16:12:39.512632000', '2025-10-26T16:42:39.512632000', '2025-10-26T17:12:39.512632000', '2025-10-26T17:42:39.512632000', '2025-10-26T18:12:39.512632000', '2025-10-26T18:42:39.512632000', '2025-10-26T19:12:39.512632000', '2025-10-26T19:42:39.512632000', '2025-10-26T20:12:39.512632000', '2025-10-26T20:42:39.512632000', '2025-10-26T21:12:39.512632000', '2025-10-26T21:42:39.512632000', '2025-10-26T22:12:39.512632000', '2025-10-26T22:42:39.512632000', '2025-10-26T23:12:39.512632000', '2025-10-26T23:42:39.512632000', '2025-10-27T00:12:39.512632000', '2025-10-27T00:42:39.512632000', '2025-10-27T01:12:39.512632000', '2025-10-27T01:42:39.512632000', '2025-10-27T02:12:39.512632000', '2025-10-27T02:42:39.512632000', '2025-10-27T03:12:39.512632000', '2025-10-27T03:42:39.512632000', '2025-10-27T04:12:39.512632000', '2025-10-27T04:42:39.512632000', '2025-10-27T05:12:39.512632000', '2025-10-27T05:42:39.512632000', '2025-10-27T06:12:39.512632000', '2025-10-27T06:42:39.512632000', '2025-10-27T07:12:39.512632000', '2025-10-27T07:42:39.512632000', '2025-10-27T08:12:39.512632000', '2025-10-27T08:42:39.512632000', '2025-10-27T09:12:39.512632000', '2025-10-27T09:42:39.512632000', '2025-10-27T10:12:39.512632000', '2025-10-27T10:42:39.512632000', '2025-10-27T11:12:39.512632000'], dtype='datetime64[ns]')
- status(trajectory, time)float320.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0
- dtype :
- <class 'numpy.int32'>
- valid_range :
- [0 0]
- flag_values :
- [0]
- flag_meanings :
- active
array([[ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], ..., [nan, nan, nan, ..., 0., 0., 0.], [nan, nan, nan, ..., 0., 0., 0.], [nan, nan, nan, ..., 0., 0., 0.]], shape=(10000, 145), dtype=float32) - moving(trajectory, time)float321.0 1.0 1.0 1.0 ... 1.0 1.0 1.0 1.0
- dtype :
- <class 'numpy.int32'>
- minval :
- 1
- maxval :
- 1
array([[ 1., 1., 1., ..., 1., 1., 1.], [ 1., 1., 1., ..., 1., 1., 1.], [ 1., 1., 1., ..., 1., 1., 1.], ..., [nan, nan, nan, ..., 1., 1., 1.], [nan, nan, nan, ..., 1., 1., 1.], [nan, nan, nan, ..., 1., 1., 1.]], shape=(10000, 145), dtype=float32) - age_seconds(trajectory, time)float320.0 1.8e+03 ... 2.376e+05 2.394e+05
- dtype :
- <class 'numpy.float32'>
- units :
- s
- minval :
- 0.0
- maxval :
- 259200.0
array([[ 0., 1800., 3600., ..., 255600., 257400., 259200.], [ 0., 1800., 3600., ..., 255600., 257400., 259200.], [ 0., 1800., 3600., ..., 255600., 257400., 259200.], ..., [ nan, nan, nan, ..., 235800., 237600., 239400.], [ nan, nan, nan, ..., 235800., 237600., 239400.], [ nan, nan, nan, ..., 235800., 237600., 239400.]], shape=(10000, 145), dtype=float32) - origin_marker(trajectory, time)float320.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0
- dtype :
- <class 'numpy.int32'>
- unit :
- description :
- An integer kept constant during the simulation. Different values may be used for different seedings, to separate elements during analysis. With GUI, only a single seeding is possible.
- flag_values :
- [0]
- flag_meanings :
- Seed_0
- minval :
- 0
- maxval :
- 0
array([[ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], ..., [nan, nan, nan, ..., 0., 0., 0.], [nan, nan, nan, ..., 0., 0., 0.], [nan, nan, nan, ..., 0., 0., 0.]], shape=(10000, 145), dtype=float32) - lon(trajectory, time)float324.65 4.654 4.652 ... 5.058 5.053
- dtype :
- <class 'numpy.float32'>
- units :
- degrees_east
- standard_name :
- longitude
- long_name :
- longitude
- axis :
- X
- minval :
- 4.314947
- maxval :
- 5.328229
array([[4.65 , 4.6537676, 4.651987 , ..., 4.949463 , 4.9562345, 4.957214 ], [4.65 , 4.649303 , 4.650155 , ..., 4.95713 , 4.9618115, 4.959624 ], [4.65 , 4.6506047, 4.646971 , ..., 5.0193815, 5.0210066, 5.0209007], ..., [ nan, nan, nan, ..., 4.895766 , 4.893511 , 4.8951797], [ nan, nan, nan, ..., 4.9127197, 4.9162207, 4.918529 ], [ nan, nan, nan, ..., 5.0577936, 5.0581603, 5.053189 ]], shape=(10000, 145), dtype=float32) - lat(trajectory, time)float3260.0 60.0 60.0 ... 59.74 59.75
- dtype :
- <class 'numpy.float32'>
- units :
- degrees_north
- standard_name :
- latitude
- long_name :
- latitude
- axis :
- Y
- minval :
- 59.65844
- maxval :
- 60.03005
array([[60. , 59.99876 , 59.997646, ..., 59.73759 , 59.738747, 59.74631 ], [60. , 59.99921 , 59.996067, ..., 59.738655, 59.740513, 59.74219 ], [60. , 59.99663 , 59.995205, ..., 59.72847 , 59.73013 , 59.733044], ..., [ nan, nan, nan, ..., 59.692207, 59.693336, 59.697193], [ nan, nan, nan, ..., 59.724514, 59.726467, 59.72711 ], [ nan, nan, nan, ..., 59.740143, 59.74154 , 59.74549 ]], shape=(10000, 145), dtype=float32) - z(trajectory, time)float320.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0
- dtype :
- <class 'numpy.float32'>
- units :
- m
- standard_name :
- z
- long_name :
- vertical position
- axis :
- Z
- positive :
- up
- minval :
- 0.0
- maxval :
- 0.0
array([[ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], ..., [nan, nan, nan, ..., 0., 0., 0.], [nan, nan, nan, ..., 0., 0., 0.], [nan, nan, nan, ..., 0., 0., 0.]], shape=(10000, 145), dtype=float32) - wind_drift_factor(trajectory, time)float320.02 0.02 0.02 ... 0.02 0.02 0.02
- dtype :
- <class 'numpy.float32'>
- units :
- 1
- description :
- Elements at surface are moved with this fraction of the vind vector, in addition to currents and Stokes drift
- minval :
- 0.02
- maxval :
- 0.02
array([[0.02, 0.02, 0.02, ..., 0.02, 0.02, 0.02], [0.02, 0.02, 0.02, ..., 0.02, 0.02, 0.02], [0.02, 0.02, 0.02, ..., 0.02, 0.02, 0.02], ..., [ nan, nan, nan, ..., 0.02, 0.02, 0.02], [ nan, nan, nan, ..., 0.02, 0.02, 0.02], [ nan, nan, nan, ..., 0.02, 0.02, 0.02]], shape=(10000, 145), dtype=float32) - current_drift_factor(trajectory, time)float321.0 1.0 1.0 1.0 ... 1.0 1.0 1.0 1.0
- dtype :
- <class 'numpy.float32'>
- units :
- 1
- description :
- Elements are moved with this fraction of the current vector, in addition to currents and Stokes drift
- minval :
- 1.0
- maxval :
- 1.0
array([[ 1., 1., 1., ..., 1., 1., 1.], [ 1., 1., 1., ..., 1., 1., 1.], [ 1., 1., 1., ..., 1., 1., 1.], ..., [nan, nan, nan, ..., 1., 1., 1.], [nan, nan, nan, ..., 1., 1., 1.], [nan, nan, nan, ..., 1., 1., 1.]], shape=(10000, 145), dtype=float32) - terminal_velocity(trajectory, time)float32-0.01 -0.01 -0.01 ... -0.01 -0.01
- dtype :
- <class 'numpy.float32'>
- units :
- m/s
- minval :
- -0.01
- maxval :
- -0.01
array([[-0.01, -0.01, -0.01, ..., -0.01, -0.01, -0.01], [-0.01, -0.01, -0.01, ..., -0.01, -0.01, -0.01], [-0.01, -0.01, -0.01, ..., -0.01, -0.01, -0.01], ..., [ nan, nan, nan, ..., -0.01, -0.01, -0.01], [ nan, nan, nan, ..., -0.01, -0.01, -0.01], [ nan, nan, nan, ..., -0.01, -0.01, -0.01]], shape=(10000, 145), dtype=float32) - settled(trajectory, time)float320.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0
- dtype :
- <class 'numpy.uint8'>
- units :
- 1
- minval :
- 0
- maxval :
- 0
array([[ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], ..., [nan, nan, nan, ..., 0., 0., 0.], [nan, nan, nan, ..., 0., 0., 0.], [nan, nan, nan, ..., 0., 0., 0.]], shape=(10000, 145), dtype=float32) - x_sea_water_velocity(trajectory, time)float320.1764 0.02968 ... -0.08855
- minval :
- -1.0181193
- maxval :
- 1.0368029
array([[ 0.17640956, 0.02967925, 0.10040905, ..., 0.31032223, 0.0974704 , 0.0974704 ], [ 0.04002005, 0.08297172, 0.11504074, ..., 0.2169567 , -0.0219341 , -0.0219341 ], [ 0.09787813, -0.06513394, 0.00946874, ..., 0.1016157 , 0.08584397, 0.08584397], ..., [ nan, nan, nan, ..., -0.01610531, 0.0729379 , 0.0729379 ], [ nan, nan, nan, ..., 0.14972433, 0.13996488, 0.13996488], [ nan, nan, nan, ..., 0.05969759, -0.08855399, -0.08855399]], shape=(10000, 145), dtype=float32) - y_sea_water_velocity(trajectory, time)float320.005168 0.04866 ... 0.3579 0.3579
- minval :
- -0.74978983
- maxval :
- 0.71832526
array([[ 0.00516786, 0.04866088, 0.1517672 , ..., 0.21628068, 0.5807186 , 0.5807186 ], [ 0.08673803, -0.07284798, 0.23436823, ..., 0.24177575, 0.26389533, 0.26389533], [-0.08482169, 0.01732627, 0.15258576, ..., 0.19646184, 0.3284287 , 0.3284287 ], ..., [ nan, nan, nan, ..., 0.18402947, 0.37293953, 0.37293953], [ nan, nan, nan, ..., 0.23299928, 0.15924837, 0.15924837], [ nan, nan, nan, ..., 0.21412726, 0.35787624, 0.35787624]], shape=(10000, 145), dtype=float32) - sea_surface_height(trajectory, time)float320.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0
- minval :
- 0.0
- maxval :
- 0.0
array([[ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], ..., [nan, nan, nan, ..., 0., 0., 0.], [nan, nan, nan, ..., 0., 0., 0.], [nan, nan, nan, ..., 0., 0., 0.]], shape=(10000, 145), dtype=float32) - upward_sea_water_velocity(trajectory, time)float320.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0
- minval :
- 0.0
- maxval :
- 0.0
array([[ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], ..., [nan, nan, nan, ..., 0., 0., 0.], [nan, nan, nan, ..., 0., 0., 0.], [nan, nan, nan, ..., 0., 0., 0.]], shape=(10000, 145), dtype=float32) - x_wind(trajectory, time)float32-2.981 -4.244 ... -3.338 -3.338
- minval :
- -8.002298
- maxval :
- 1.8089983
array([[-2.981078 , -4.243658 , -2.8865137, ..., -4.9380593, -3.34425 , -3.34425 ], [-3.082034 , -2.827815 , -2.0777311, ..., -3.5350225, -2.32015 , -2.32015 ], [-3.957158 , -2.3757708, -1.5997821, ..., -2.5414686, -4.458367 , -4.458367 ], ..., [ nan, nan, nan, ..., -2.7222812, -1.0365078, -1.0365078], [ nan, nan, nan, ..., -2.0151415, -3.3912978, -3.3912978], [ nan, nan, nan, ..., -2.4119408, -3.3377228, -3.3377228]], shape=(10000, 145), dtype=float32) - y_wind(trajectory, time)float32-4.097 -5.883 ... -5.671 -5.671
- minval :
- -10.789874
- maxval :
- -1.0925639
array([[-4.0973816, -5.883371 , -6.234717 , ..., -7.2351575, -5.630373 , -5.630373 ], [-6.7756643, -6.090957 , -4.563066 , ..., -6.344755 , -7.9961433, -7.9961433], [-6.18809 , -5.2804637, -5.106999 , ..., -4.6859593, -7.3998036, -7.3998036], ..., [ nan, nan, nan, ..., -5.7076945, -6.708225 , -6.708225 ], [ nan, nan, nan, ..., -5.610828 , -5.963494 , -5.963494 ], [ nan, nan, nan, ..., -6.3788004, -5.67101 , -5.67101 ]], shape=(10000, 145), dtype=float32) - sea_surface_wave_stokes_drift_x_velocity(trajectory, time)float320.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0
- minval :
- 0.0
- maxval :
- 0.0
array([[ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], ..., [nan, nan, nan, ..., 0., 0., 0.], [nan, nan, nan, ..., 0., 0., 0.], [nan, nan, nan, ..., 0., 0., 0.]], shape=(10000, 145), dtype=float32) - sea_surface_wave_stokes_drift_y_velocity(trajectory, time)float320.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0
- minval :
- 0.0
- maxval :
- 0.0
array([[ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], ..., [nan, nan, nan, ..., 0., 0., 0.], [nan, nan, nan, ..., 0., 0., 0.], [nan, nan, nan, ..., 0., 0., 0.]], shape=(10000, 145), dtype=float32) - sea_surface_wave_period_at_variance_spectral_density_maximum(trajectory, time)float320.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0
- minval :
- 0.0
- maxval :
- 0.0
array([[ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], ..., [nan, nan, nan, ..., 0., 0., 0.], [nan, nan, nan, ..., 0., 0., 0.], [nan, nan, nan, ..., 0., 0., 0.]], shape=(10000, 145), dtype=float32) - sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment(trajectory, time)float324.33 6.198 5.871 ... 5.623 5.623
- minval :
- 1.5306671
- maxval :
- 9.854761
array([[4.329676 , 6.1984577, 5.870633 , ..., 7.484886 , 5.5956483, 5.5956483], [6.3604164, 5.738093 , 4.284174 , ..., 6.2060866, 7.114278 , 7.114278 ], [6.276234 , 4.947642 , 4.5728745, ..., 4.555 , 7.3818607, 7.3818607], ..., [ nan, nan, nan, ..., 5.403376 , 5.8 , 5.8 ], [ nan, nan, nan, ..., 5.09412 , 5.861952 , 5.861952 ], [ nan, nan, nan, ..., 5.8271236, 5.622699 , 5.622699 ]], shape=(10000, 145), dtype=float32) - land_binary_mask(trajectory, time)float320.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0
- minval :
- 0.0
- maxval :
- 0.0
array([[ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], ..., [nan, nan, nan, ..., 0., 0., 0.], [nan, nan, nan, ..., 0., 0., 0.], [nan, nan, nan, ..., 0., 0., 0.]], shape=(10000, 145), dtype=float32) - ocean_vertical_diffusivity(trajectory, time)float320.02 0.02 0.02 ... 0.02 0.02 0.02
- minval :
- 0.02
- maxval :
- 0.02
array([[0.02, 0.02, 0.02, ..., 0.02, 0.02, 0.02], [0.02, 0.02, 0.02, ..., 0.02, 0.02, 0.02], [0.02, 0.02, 0.02, ..., 0.02, 0.02, 0.02], ..., [ nan, nan, nan, ..., 0.02, 0.02, 0.02], [ nan, nan, nan, ..., 0.02, 0.02, 0.02], [ nan, nan, nan, ..., 0.02, 0.02, 0.02]], shape=(10000, 145), dtype=float32) - ocean_mixed_layer_thickness(trajectory, time)float3250.0 50.0 50.0 ... 50.0 50.0 50.0
- minval :
- 50.0
- maxval :
- 50.0
array([[50., 50., 50., ..., 50., 50., 50.], [50., 50., 50., ..., 50., 50., 50.], [50., 50., 50., ..., 50., 50., 50.], ..., [nan, nan, nan, ..., 50., 50., 50.], [nan, nan, nan, ..., 50., 50., 50.], [nan, nan, nan, ..., 50., 50., 50.]], shape=(10000, 145), dtype=float32) - sea_floor_depth_below_sea_level(trajectory, time)float3230.0 30.0 30.0 ... 30.0 30.0 30.0
- minval :
- 30.0
- maxval :
- 30.0
array([[30., 30., 30., ..., 30., 30., 30.], [30., 30., 30., ..., 30., 30., 30.], [30., 30., 30., ..., 30., 30., 30.], ..., [nan, nan, nan, ..., 30., 30., 30.], [nan, nan, nan, ..., 30., 30., 30.], [nan, nan, nan, ..., 30., 30., 30.]], shape=(10000, 145), dtype=float32)
- Conventions :
- CF-1.11, ACDD-1.3
- standard_name_vocabulary :
- CF Standard Name Table v85
- featureType :
- trajectory
- title :
- OpenDrift trajectory simulation
- summary :
- Output from simulation with OpenDrift framework
- keywords :
- trajectory, drift, lagrangian, simulation
- history :
- Created 2025-10-24 11:12:44.313089
- date_created :
- 2025-10-24T11:12:44.313106
- source :
- Output from simulation with OpenDrift
- model_url :
- https://github.com/OpenDrift/opendrift
- opendrift_class :
- SedimentDrift
- opendrift_module :
- opendrift.models.sedimentdrift
- readers :
- odict_keys(['oscillating_reader', 'oscillating_reader_0', 'global_landmask'])
- time_coverage_start :
- 2025-10-24 11:12:39.512632
- time_step_calculation :
- 0:30:00
- time_step_output :
- 0:30:00
- config_environment:constant:x_sea_water_velocity :
- None
- config_environment:fallback:x_sea_water_velocity :
- 0
- config_environment:constant:y_sea_water_velocity :
- None
- config_environment:fallback:y_sea_water_velocity :
- 0
- config_environment:constant:sea_surface_height :
- None
- config_environment:fallback:sea_surface_height :
- 0
- config_environment:constant:upward_sea_water_velocity :
- None
- config_environment:fallback:upward_sea_water_velocity :
- 0
- config_environment:constant:x_wind :
- None
- config_environment:fallback:x_wind :
- -3.0
- config_environment:constant:y_wind :
- None
- config_environment:fallback:y_wind :
- -6.0
- config_environment:constant:sea_surface_wave_stokes_drift_x_velocity :
- None
- config_environment:fallback:sea_surface_wave_stokes_drift_x_velocity :
- 0
- config_environment:constant:sea_surface_wave_stokes_drift_y_velocity :
- None
- config_environment:fallback:sea_surface_wave_stokes_drift_y_velocity :
- 0
- config_environment:constant:sea_surface_wave_period_at_variance_spectral_density_maximum :
- None
- config_environment:fallback:sea_surface_wave_period_at_variance_spectral_density_maximum :
- 0
- config_environment:constant:sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment :
- None
- config_environment:fallback:sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment :
- 0
- config_environment:constant:land_binary_mask :
- None
- config_environment:fallback:land_binary_mask :
- None
- config_environment:constant:ocean_vertical_diffusivity :
- None
- config_environment:fallback:ocean_vertical_diffusivity :
- 0.02
- config_environment:constant:ocean_mixed_layer_thickness :
- None
- config_environment:fallback:ocean_mixed_layer_thickness :
- 50
- config_environment:constant:sea_floor_depth_below_sea_level :
- None
- config_environment:fallback:sea_floor_depth_below_sea_level :
- 30.0
- config_general:use_auto_landmask :
- True
- config_drift:current_uncertainty :
- 0.1
- config_drift:current_uncertainty_uniform :
- 0
- config_drift:max_speed :
- 2.0
- config_readers:max_number_of_fails :
- 1
- config_general:simulation_name :
- config_general:coastline_action :
- previous
- config_general:coastline_approximation_precision :
- 0.001
- config_general:time_step_minutes :
- 60
- config_general:time_step_output_minutes :
- None
- config_seed:ocean_only :
- True
- config_seed:number :
- 1
- config_drift:max_age_seconds :
- None
- config_drift:advection_scheme :
- euler
- config_drift:horizontal_diffusivity :
- 0
- config_drift:profiles_depth :
- 50
- config_drift:wind_uncertainty :
- 1.0
- config_drift:relative_wind :
- False
- config_drift:deactivate_north_of :
- None
- config_drift:deactivate_south_of :
- None
- config_drift:deactivate_east_of :
- None
- config_drift:deactivate_west_of :
- None
- config_seed:origin_marker :
- 0
- config_seed:z :
- 0
- config_seed:wind_drift_factor :
- 0.02
- config_seed:current_drift_factor :
- 1
- config_seed:terminal_velocity :
- -0.001
- config_seed:settled :
- 0
- config_drift:vertical_advection :
- True
- config_drift:vertical_advection_at_surface :
- False
- config_drift:water_column_stretching :
- False
- config_drift:vertical_advection_correction :
- False
- config_drift:vertical_mixing :
- True
- config_drift:vertical_mixing_at_surface :
- False
- config_vertical_mixing:timestep :
- 60
- config_vertical_mixing:diffusivitymodel :
- windspeed_Large1994
- config_vertical_mixing:background_diffusivity :
- 1.2e-05
- config_vertical_mixing:TSprofiles :
- False
- config_drift:wind_drift_depth :
- 0.1
- config_drift:stokes_drift :
- True
- config_drift:stokes_drift_profile :
- Phillips
- config_drift:use_tabularised_stokes_drift :
- False
- config_drift:tabularised_stokes_drift_fetch :
- 25000
- config_general:seafloor_action :
- lift_to_seafloor
- config_drift:truncate_ocean_model_below_m :
- None
- config_seed:seafloor :
- False
- config_vertical_mixing:resuspension_threshold :
- 0.5
- opendrift_version :
- 1.14.4
- seed_geojson :
- {"features": [], "type": "FeatureCollection"}
- simulation_time :
- 2025-10-24 11:12:44.325684
- reader_x_sea_water_velocity :
- ['oscillating_reader']
- reader_y_sea_water_velocity :
- ['oscillating_reader_0']
- reader_sea_surface_height :
- 0
- reader_upward_sea_water_velocity :
- 0
- reader_x_wind :
- -3.0
- reader_y_wind :
- -6.0
- reader_sea_surface_wave_stokes_drift_x_velocity :
- 0
- reader_sea_surface_wave_stokes_drift_y_velocity :
- 0
- reader_sea_surface_wave_period_at_variance_spectral_density_maximum :
- 0
- reader_sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment :
- 0
- reader_land_binary_mask :
- ['global_landmask']
- reader_ocean_vertical_diffusivity :
- 0.02
- reader_ocean_mixed_layer_thickness :
- 50
- reader_sea_floor_depth_below_sea_level :
- 30.0
- time_coverage_end :
- 2025-10-27 11:12:39.512632
- time_coverage_duration :
- P3DT0H0M0S
- time_coverage_resolution :
- P0DT0H30M0S
- performance :
- -------------------- Reader performance: -------------------- oscillating_reader 0:00:00.0 total 0:00:00.0 preparing 0:00:00.0 reading 0:00:00.0 masking -------------------- oscillating_reader_0 0:00:00.0 total 0:00:00.0 preparing 0:00:00.0 reading 0:00:00.0 masking -------------------- global_landmask 0:00:03.7 total 0:00:00.0 preparing 0:00:03.6 reading 0:00:00.0 masking -------------------- Performance: 1:13.0 total time 4.2 configuration 0.6 preparing main loop 0.0 moving elements to ocean 1:08.1 main loop 16.5 updating elements 14.8 vertical mixing 0.0 cleaning up --------------------
- geospatial_bounds_crs :
- EPSG:4326
- geospatial_bounds_vertical_crs :
- EPSG:5831
- geospatial_lat_min :
- 59.65844
- geospatial_lat_max :
- 60.03005
- geospatial_lat_units :
- degrees_north
- geospatial_lat_resolution :
- point
- geospatial_lon_min :
- 4.314947
- geospatial_lon_max :
- 5.328229
- geospatial_lon_units :
- degrees_east
- geospatial_lon_resolution :
- point
- runtime :
- 0:01:13.033141
- geospatial_vertical_min :
- 0.0
- geospatial_vertical_max :
- 0.0
- geospatial_vertical_positive :
- up
Plotting the depth vs time
o.plot_property('z')

Animate sediment particles
o.animation(color='moving', colorbar=False, legend=['Sedimented', 'Moving'],
fast=True, buffer=.01, vmin=0, vmax=1)
#o.animation_profile()
Total running time of the script: (3 minutes 36.843 seconds)