Note
Go to the end to download the full example code.
Water column stretching
from datetime import datetime, timedelta
import numpy as np
import matplotlib.pyplot as plt
from opendrift.readers import reader_oscillating
from opendrift.models.oceandrift import OceanDrift
In OpenDrift, the vertical position of elements (“z”) is defined as relative to actual surface, and not an absolute reference level (e.g. mean sea surface height). Thus if sea surface elevation changes with time (e.g. tides), we need to add a “correction / perturbation” to z, otherwise elements at/near seafloor will be lifted if surface elevation increases and z (relative to surface) remains unchanged. This correction is presently only implemented for OceanDrift, and must be switched on with config setting “drift:water:column_stretching”
# To illustrate, we add a reader with oscillating sea surface elevation (tidal)
# with amplitude of 1m and peroid of 6 hours
time = datetime.now()
reader_tidal = reader_oscillating.Reader('sea_surface_height', amplitude=-1,
period=timedelta(hours=6), zero_time=time)
First an illustration withouth this correction.
o = OceanDrift(loglevel=20)
o.add_reader(reader_tidal)
o.set_config('drift:water_column_stretching', False)
o.set_config('environment:constant:sea_floor_depth_below_sea_level', 10)
z = np.arange(0, -11, -1) # Seeding one particle every meter from surface to 10m depth
o.seed_elements(lon=0, lat=0, time=time, z=z, number=11)
o.run(duration=timedelta(hours=24), time_step=1800)
o.result.z.plot.line(x='time', add_legend=False)
plt.show()

17:16:25 INFO opendrift:513: OpenDriftSimulation initialised (version 1.14.2 / v1.14.2-88-gf09b7bd)
17:16:25 INFO opendrift.models.basemodel.environment:206: Adding a global landmask from GSHHG
17:16:30 INFO opendrift.models.basemodel.environment:229: Fallback values will be used for the following variables which have no readers:
17:16:30 INFO opendrift.models.basemodel.environment:232: x_sea_water_velocity: 0.000000
17:16:30 INFO opendrift.models.basemodel.environment:232: y_sea_water_velocity: 0.000000
17:16:30 INFO opendrift.models.basemodel.environment:232: x_wind: 0.000000
17:16:30 INFO opendrift.models.basemodel.environment:232: y_wind: 0.000000
17:16:30 INFO opendrift.models.basemodel.environment:232: upward_sea_water_velocity: 0.000000
17:16:30 INFO opendrift.models.basemodel.environment:232: ocean_vertical_diffusivity: 0.000000
17:16:30 INFO opendrift.models.basemodel.environment:232: sea_surface_wave_significant_height: 0.000000
17:16:30 INFO opendrift.models.basemodel.environment:232: sea_surface_wave_stokes_drift_x_velocity: 0.000000
17:16:30 INFO opendrift.models.basemodel.environment:232: sea_surface_wave_stokes_drift_y_velocity: 0.000000
17:16:30 INFO opendrift.models.basemodel.environment:232: ocean_mixed_layer_thickness: 50.000000
17:16:30 INFO opendrift:1732: Skipping environment variable ocean_vertical_diffusivity because of condition ['drift:vertical_mixing', 'is', False]
17:16:30 INFO opendrift:1732: Skipping environment variable ocean_mixed_layer_thickness because of condition ['drift:vertical_mixing', 'is', False]
17:16:30 INFO opendrift:1743: Storing previous values of element property lon because of condition (('general:coastline_action', 'in', ['stranding', 'previous']), 'or', ('general:seafloor_action', 'in', ['previous']))
17:16:30 INFO opendrift:1743: Storing previous values of element property lat because of condition (('general:coastline_action', 'in', ['stranding', 'previous']), 'or', ('general:seafloor_action', 'in', ['previous']))
17:16:30 INFO opendrift:1751: Storing previous values of environment variable sea_surface_height because of condition ['drift:vertical_advection', 'is', True]
17:16:30 INFO opendrift:899: Using existing reader for land_binary_mask
17:16:30 INFO opendrift:928: All points are in ocean
17:16:30 INFO opendrift:2035: 2025-07-11 17:16:25.472655 - step 1 of 48 - 11 active elements (0 deactivated)
17:16:30 INFO opendrift:2035: 2025-07-11 17:46:25.472655 - step 2 of 48 - 11 active elements (0 deactivated)
17:16:30 INFO opendrift:2035: 2025-07-11 18:16:25.472655 - step 3 of 48 - 11 active elements (0 deactivated)
17:16:30 INFO opendrift:2035: 2025-07-11 18:46:25.472655 - step 4 of 48 - 11 active elements (0 deactivated)
17:16:30 INFO opendrift:2035: 2025-07-11 19:16:25.472655 - step 5 of 48 - 11 active elements (0 deactivated)
17:16:30 INFO opendrift:2035: 2025-07-11 19:46:25.472655 - step 6 of 48 - 11 active elements (0 deactivated)
17:16:30 INFO opendrift:2035: 2025-07-11 20:16:25.472655 - step 7 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-11 20:46:25.472655 - step 8 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-11 21:16:25.472655 - step 9 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-11 21:46:25.472655 - step 10 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-11 22:16:25.472655 - step 11 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-11 22:46:25.472655 - step 12 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-11 23:16:25.472655 - step 13 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-11 23:46:25.472655 - step 14 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 00:16:25.472655 - step 15 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 00:46:25.472655 - step 16 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 01:16:25.472655 - step 17 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 01:46:25.472655 - step 18 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 02:16:25.472655 - step 19 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 02:46:25.472655 - step 20 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 03:16:25.472655 - step 21 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 03:46:25.472655 - step 22 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 04:16:25.472655 - step 23 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 04:46:25.472655 - step 24 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 05:16:25.472655 - step 25 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 05:46:25.472655 - step 26 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 06:16:25.472655 - step 27 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 06:46:25.472655 - step 28 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 07:16:25.472655 - step 29 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 07:46:25.472655 - step 30 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 08:16:25.472655 - step 31 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 08:46:25.472655 - step 32 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 09:16:25.472655 - step 33 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 09:46:25.472655 - step 34 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 10:16:25.472655 - step 35 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 10:46:25.472655 - step 36 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 11:16:25.472655 - step 37 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 11:46:25.472655 - step 38 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 12:16:25.472655 - step 39 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 12:46:25.472655 - step 40 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 13:16:25.472655 - step 41 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 13:46:25.472655 - step 42 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 14:16:25.472655 - step 43 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 14:46:25.472655 - step 44 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 15:16:25.472655 - step 45 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 15:46:25.472655 - step 46 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 16:16:25.472655 - step 47 of 48 - 11 active elements (0 deactivated)
17:16:31 INFO opendrift:2035: 2025-07-12 16:46:25.472655 - step 48 of 48 - 11 active elements (0 deactivated)
We see that the particles remain at their initial depths (since we have no vertical advection or mixing), except for the element starting at seafloor, which is lifted up when sea level rises, since the config setting drift:seafloor_action is lift_to_seafloor by default. This lifting is in this case unphysical.
We then make a simulation wih correction for the stretching/contraction of the water column.
o = OceanDrift(loglevel=20)
o.add_reader(reader_tidal)
o.set_config('drift:water_column_stretching', True)
o.set_config('environment:constant:sea_floor_depth_below_sea_level', 10)
o.seed_elements(lon=0, lat=0, time=time, z=z, number=11)
o.run(duration=timedelta(hours=24), time_step=1800)
o.result.z.plot.line(x='time', add_legend=False)
plt.show()

17:16:32 INFO opendrift:513: OpenDriftSimulation initialised (version 1.14.2 / v1.14.2-88-gf09b7bd)
17:16:32 INFO opendrift.models.basemodel.environment:206: Adding a global landmask from GSHHG
17:16:32 INFO opendrift.models.basemodel.environment:229: Fallback values will be used for the following variables which have no readers:
17:16:32 INFO opendrift.models.basemodel.environment:232: x_sea_water_velocity: 0.000000
17:16:32 INFO opendrift.models.basemodel.environment:232: y_sea_water_velocity: 0.000000
17:16:32 INFO opendrift.models.basemodel.environment:232: x_wind: 0.000000
17:16:32 INFO opendrift.models.basemodel.environment:232: y_wind: 0.000000
17:16:32 INFO opendrift.models.basemodel.environment:232: upward_sea_water_velocity: 0.000000
17:16:32 INFO opendrift.models.basemodel.environment:232: ocean_vertical_diffusivity: 0.000000
17:16:32 INFO opendrift.models.basemodel.environment:232: sea_surface_wave_significant_height: 0.000000
17:16:32 INFO opendrift.models.basemodel.environment:232: sea_surface_wave_stokes_drift_x_velocity: 0.000000
17:16:32 INFO opendrift.models.basemodel.environment:232: sea_surface_wave_stokes_drift_y_velocity: 0.000000
17:16:32 INFO opendrift.models.basemodel.environment:232: ocean_mixed_layer_thickness: 50.000000
17:16:32 INFO opendrift:1732: Skipping environment variable ocean_vertical_diffusivity because of condition ['drift:vertical_mixing', 'is', False]
17:16:32 INFO opendrift:1732: Skipping environment variable ocean_mixed_layer_thickness because of condition ['drift:vertical_mixing', 'is', False]
17:16:32 INFO opendrift:1743: Storing previous values of element property lon because of condition (('general:coastline_action', 'in', ['stranding', 'previous']), 'or', ('general:seafloor_action', 'in', ['previous']))
17:16:32 INFO opendrift:1743: Storing previous values of element property lat because of condition (('general:coastline_action', 'in', ['stranding', 'previous']), 'or', ('general:seafloor_action', 'in', ['previous']))
17:16:32 INFO opendrift:1751: Storing previous values of environment variable sea_surface_height because of condition ['drift:vertical_advection', 'is', True]
17:16:32 INFO opendrift:899: Using existing reader for land_binary_mask
17:16:32 INFO opendrift:928: All points are in ocean
17:16:32 INFO opendrift:2035: 2025-07-11 17:16:25.472655 - step 1 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-11 17:46:25.472655 - step 2 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-11 18:16:25.472655 - step 3 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-11 18:46:25.472655 - step 4 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-11 19:16:25.472655 - step 5 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-11 19:46:25.472655 - step 6 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-11 20:16:25.472655 - step 7 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-11 20:46:25.472655 - step 8 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-11 21:16:25.472655 - step 9 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-11 21:46:25.472655 - step 10 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-11 22:16:25.472655 - step 11 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-11 22:46:25.472655 - step 12 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-11 23:16:25.472655 - step 13 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-11 23:46:25.472655 - step 14 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-12 00:16:25.472655 - step 15 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-12 00:46:25.472655 - step 16 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-12 01:16:25.472655 - step 17 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-12 01:46:25.472655 - step 18 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-12 02:16:25.472655 - step 19 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-12 02:46:25.472655 - step 20 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-12 03:16:25.472655 - step 21 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-12 03:46:25.472655 - step 22 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-12 04:16:25.472655 - step 23 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-12 04:46:25.472655 - step 24 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-12 05:16:25.472655 - step 25 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-12 05:46:25.472655 - step 26 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-12 06:16:25.472655 - step 27 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-12 06:46:25.472655 - step 28 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-12 07:16:25.472655 - step 29 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-12 07:46:25.472655 - step 30 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-12 08:16:25.472655 - step 31 of 48 - 11 active elements (0 deactivated)
17:16:32 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:32 INFO opendrift:2035: 2025-07-12 08:46:25.472655 - step 32 of 48 - 11 active elements (0 deactivated)
17:16:33 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:33 INFO opendrift:2035: 2025-07-12 09:16:25.472655 - step 33 of 48 - 11 active elements (0 deactivated)
17:16:33 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:33 INFO opendrift:2035: 2025-07-12 09:46:25.472655 - step 34 of 48 - 11 active elements (0 deactivated)
17:16:33 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:33 INFO opendrift:2035: 2025-07-12 10:16:25.472655 - step 35 of 48 - 11 active elements (0 deactivated)
17:16:33 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:33 INFO opendrift:2035: 2025-07-12 10:46:25.472655 - step 36 of 48 - 11 active elements (0 deactivated)
17:16:33 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:33 INFO opendrift:2035: 2025-07-12 11:16:25.472655 - step 37 of 48 - 11 active elements (0 deactivated)
17:16:33 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:33 INFO opendrift:2035: 2025-07-12 11:46:25.472655 - step 38 of 48 - 11 active elements (0 deactivated)
17:16:33 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:33 INFO opendrift:2035: 2025-07-12 12:16:25.472655 - step 39 of 48 - 11 active elements (0 deactivated)
17:16:33 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:33 INFO opendrift:2035: 2025-07-12 12:46:25.472655 - step 40 of 48 - 11 active elements (0 deactivated)
17:16:33 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:33 INFO opendrift:2035: 2025-07-12 13:16:25.472655 - step 41 of 48 - 11 active elements (0 deactivated)
17:16:33 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:33 INFO opendrift:2035: 2025-07-12 13:46:25.472655 - step 42 of 48 - 11 active elements (0 deactivated)
17:16:33 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:33 INFO opendrift:2035: 2025-07-12 14:16:25.472655 - step 43 of 48 - 11 active elements (0 deactivated)
17:16:33 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:33 INFO opendrift:2035: 2025-07-12 14:46:25.472655 - step 44 of 48 - 11 active elements (0 deactivated)
17:16:33 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:33 INFO opendrift:2035: 2025-07-12 15:16:25.472655 - step 45 of 48 - 11 active elements (0 deactivated)
17:16:33 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:33 INFO opendrift:2035: 2025-07-12 15:46:25.472655 - step 46 of 48 - 11 active elements (0 deactivated)
17:16:33 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:33 INFO opendrift:2035: 2025-07-12 16:16:25.472655 - step 47 of 48 - 11 active elements (0 deactivated)
17:16:33 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
17:16:33 INFO opendrift:2035: 2025-07-12 16:46:25.472655 - step 48 of 48 - 11 active elements (0 deactivated)
17:16:33 INFO opendrift.models.oceandrift:305: Compensating for change in surface elevation
Here we see that element depth (z, relative to surface) is changed so that elements at surface and seafloor remain at resp surface (z=0) and seafloor (z = sea_floor_depth + sea_surface_elevation)
Total running time of the script: (0 minutes 14.041 seconds)