Relative and absolute wind

from datetime import timedelta
from opendrift.readers import reader_netCDF_CF_generic
from opendrift.models.oceandrift import OceanDrift

o = OceanDrift(loglevel=20)  # Set loglevel to 0 for debug information

# Arome
reader_arome = reader_netCDF_CF_generic.Reader(o.test_data_folder() +
    '16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc')
#reader_arome = reader_netCDF_CF_generic.Reader('https://thredds.met.no/thredds/dodsC/mepslatest/meps_lagged_6_h_latest_2_5km_latest.nc')

# Norkyst
reader_norkyst = reader_netCDF_CF_generic.Reader(o.test_data_folder() +
    '16Nov2015_NorKyst_z_surface/norkyst800_subset_16Nov2015.nc')
#reader_norkyst = reader_netCDF_CF_generic.Reader('https://thredds.met.no/thredds/dodsC/sea/norkyst800m/1h/aggregate_be')

o.add_reader([reader_norkyst, reader_arome])

Out:

13:44:00 INFO    opendrift.models.basemodel: OpenDriftSimulation initialised (version 1.7.1 / v1.7.1-87-g074c1d2)
13:44:00 INFO    opendrift.readers.reader_netCDF_CF_generic: Opening dataset: /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc
13:44:00 INFO    opendrift.readers.reader_netCDF_CF_generic: Opening dataset: /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/norkyst800_subset_16Nov2015.nc

Seeding some particles

lon = 4.2; lat = 60.0; # Outside Bergen
time = [reader_arome.start_time,
        reader_arome.start_time + timedelta(hours=30)]

Seed oil elements at defined position and time

o.seed_elements(lon, lat, radius=50, number=5000, time=time)

Using windspeed relative to moving ocean (current)

o.set_config('drift:relative_wind',  False)
o.set_config('drift:vertical_mixing', False)

o.run(steps=48*2, time_step=1800, time_step_output=3600*2)

Out:

13:44:00 INFO    opendrift.models.basemodel: Fallback values will be used for the following variables which have no readers:
13:44:00 INFO    opendrift.models.basemodel:    upward_sea_water_velocity: 0.000000
13:44:00 INFO    opendrift.models.basemodel:    ocean_vertical_diffusivity: 0.000000
13:44:00 INFO    opendrift.models.basemodel:    sea_surface_wave_significant_height: 0.000000
13:44:00 INFO    opendrift.models.basemodel:    sea_surface_wave_stokes_drift_x_velocity: 0.000000
13:44:00 INFO    opendrift.models.basemodel:    sea_surface_wave_stokes_drift_y_velocity: 0.000000
13:44:00 INFO    opendrift.models.basemodel:    sea_surface_wave_period_at_variance_spectral_density_maximum: 0.000000
13:44:00 INFO    opendrift.models.basemodel:    sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment: 0.000000
13:44:00 INFO    opendrift.models.basemodel:    surface_downward_x_stress: 0.000000
13:44:00 INFO    opendrift.models.basemodel:    surface_downward_y_stress: 0.000000
13:44:00 INFO    opendrift.models.basemodel:    turbulent_kinetic_energy: 0.000000
13:44:00 INFO    opendrift.models.basemodel:    turbulent_generic_length_scale: 0.000000
13:44:00 INFO    opendrift.models.basemodel:    sea_floor_depth_below_sea_level: 10000.000000
13:44:00 INFO    opendrift.models.basemodel: Adding a dynamical landmask with max. priority based on assumed maximum speed of 1 m/s. Adding a customised landmask may be faster...
13:44:00 INFO    opendrift_landmask_data.mask: locking landmask for generation..
13:44:00 INFO    opendrift_landmask_data.mask: decompressing memmap landmask to /tmp/landmask/mask.dat..
13:44:12 INFO    opendrift_landmask_data.mask: landmask generated
13:44:20 INFO    opendrift.models.basemodel: Using existing reader for land_binary_mask
13:44:20 INFO    opendrift.models.basemodel: All points are in ocean
13:44:20 INFO    opendrift.models.basemodel: 2015-11-16 00:00:00 - step 1 of 96 - 84 active elements (0 deactivated)
13:44:20 INFO    opendrift.models.basemodel: 2015-11-16 00:30:00 - step 2 of 96 - 167 active elements (0 deactivated)
13:44:20 INFO    opendrift.models.basemodel: 2015-11-16 01:00:00 - step 3 of 96 - 250 active elements (0 deactivated)
13:44:20 INFO    opendrift.models.basemodel: 2015-11-16 01:30:00 - step 4 of 96 - 334 active elements (0 deactivated)
13:44:20 INFO    opendrift.models.basemodel: 2015-11-16 02:00:00 - step 5 of 96 - 417 active elements (0 deactivated)
13:44:20 INFO    opendrift.models.basemodel: 2015-11-16 02:30:00 - step 6 of 96 - 500 active elements (0 deactivated)
13:44:20 INFO    opendrift.models.basemodel: 2015-11-16 03:00:00 - step 7 of 96 - 584 active elements (0 deactivated)
13:44:20 INFO    opendrift.models.basemodel: 2015-11-16 03:30:00 - step 8 of 96 - 667 active elements (0 deactivated)
13:44:21 INFO    opendrift.models.basemodel: 2015-11-16 04:00:00 - step 9 of 96 - 750 active elements (0 deactivated)
13:44:21 INFO    opendrift.models.basemodel: 2015-11-16 04:30:00 - step 10 of 96 - 834 active elements (0 deactivated)
13:44:21 INFO    opendrift.models.basemodel: 2015-11-16 05:00:00 - step 11 of 96 - 917 active elements (0 deactivated)
13:44:21 INFO    opendrift.models.basemodel: 2015-11-16 05:30:00 - step 12 of 96 - 1000 active elements (0 deactivated)
13:44:21 INFO    opendrift.models.basemodel: 2015-11-16 06:00:00 - step 13 of 96 - 1084 active elements (0 deactivated)
13:44:21 INFO    opendrift.models.basemodel: 2015-11-16 06:30:00 - step 14 of 96 - 1167 active elements (0 deactivated)
13:44:21 INFO    opendrift.models.basemodel: 2015-11-16 07:00:00 - step 15 of 96 - 1250 active elements (0 deactivated)
13:44:21 INFO    opendrift.models.basemodel: 2015-11-16 07:30:00 - step 16 of 96 - 1334 active elements (0 deactivated)
13:44:21 INFO    opendrift.models.basemodel: 2015-11-16 08:00:00 - step 17 of 96 - 1417 active elements (0 deactivated)
13:44:21 INFO    opendrift.models.basemodel: 2015-11-16 08:30:00 - step 18 of 96 - 1500 active elements (0 deactivated)
13:44:21 INFO    opendrift.models.basemodel: 2015-11-16 09:00:00 - step 19 of 96 - 1584 active elements (0 deactivated)
13:44:21 INFO    opendrift.models.basemodel: 2015-11-16 09:30:00 - step 20 of 96 - 1667 active elements (0 deactivated)
13:44:21 INFO    opendrift.models.basemodel: 2015-11-16 10:00:00 - step 21 of 96 - 1750 active elements (0 deactivated)
13:44:21 INFO    opendrift.models.basemodel: 2015-11-16 10:30:00 - step 22 of 96 - 1833 active elements (0 deactivated)
13:44:21 INFO    opendrift.models.basemodel: 2015-11-16 11:00:00 - step 23 of 96 - 1917 active elements (0 deactivated)
13:44:21 INFO    opendrift.models.basemodel: 2015-11-16 11:30:00 - step 24 of 96 - 2000 active elements (0 deactivated)
13:44:21 INFO    opendrift.models.basemodel: 2015-11-16 12:00:00 - step 25 of 96 - 2083 active elements (0 deactivated)
13:44:21 INFO    opendrift.models.basemodel: 2015-11-16 12:30:00 - step 26 of 96 - 2167 active elements (0 deactivated)
13:44:21 INFO    opendrift.models.basemodel: 2015-11-16 13:00:00 - step 27 of 96 - 2250 active elements (0 deactivated)
13:44:21 INFO    opendrift.models.basemodel: 2015-11-16 13:30:00 - step 28 of 96 - 2333 active elements (0 deactivated)
13:44:21 INFO    opendrift.models.basemodel: 2015-11-16 14:00:00 - step 29 of 96 - 2417 active elements (0 deactivated)
13:44:22 INFO    opendrift.models.basemodel: 2015-11-16 14:30:00 - step 30 of 96 - 2500 active elements (0 deactivated)
13:44:22 INFO    opendrift.models.basemodel: 2015-11-16 15:00:00 - step 31 of 96 - 2583 active elements (0 deactivated)
13:44:22 INFO    opendrift.models.basemodel: 2015-11-16 15:30:00 - step 32 of 96 - 2667 active elements (0 deactivated)
13:44:22 INFO    opendrift.models.basemodel: 2015-11-16 16:00:00 - step 33 of 96 - 2750 active elements (0 deactivated)
13:44:22 INFO    opendrift.models.basemodel: 2015-11-16 16:30:00 - step 34 of 96 - 2833 active elements (0 deactivated)
13:44:22 INFO    opendrift.models.basemodel: 2015-11-16 17:00:00 - step 35 of 96 - 2917 active elements (0 deactivated)
13:44:22 INFO    opendrift.models.basemodel: 2015-11-16 17:30:00 - step 36 of 96 - 3000 active elements (0 deactivated)
13:44:22 INFO    opendrift.models.basemodel: 2015-11-16 18:00:00 - step 37 of 96 - 3083 active elements (0 deactivated)
13:44:22 INFO    opendrift.models.basemodel: 2015-11-16 18:30:00 - step 38 of 96 - 3167 active elements (0 deactivated)
13:44:22 INFO    opendrift.models.basemodel: 2015-11-16 19:00:00 - step 39 of 96 - 3250 active elements (0 deactivated)
13:44:22 INFO    opendrift.models.basemodel: 2015-11-16 19:30:00 - step 40 of 96 - 3333 active elements (0 deactivated)
13:44:22 INFO    opendrift.models.basemodel: 2015-11-16 20:00:00 - step 41 of 96 - 3416 active elements (0 deactivated)
13:44:22 INFO    opendrift.models.basemodel: 2015-11-16 20:30:00 - step 42 of 96 - 3500 active elements (0 deactivated)
13:44:22 INFO    opendrift.models.basemodel: 2015-11-16 21:00:00 - step 43 of 96 - 3583 active elements (0 deactivated)
13:44:22 INFO    opendrift.models.basemodel: 2015-11-16 21:30:00 - step 44 of 96 - 3666 active elements (0 deactivated)
13:44:22 INFO    opendrift.models.basemodel: 2015-11-16 22:00:00 - step 45 of 96 - 3750 active elements (0 deactivated)
13:44:22 INFO    opendrift.models.basemodel: 2015-11-16 22:30:00 - step 46 of 96 - 3833 active elements (0 deactivated)
13:44:22 INFO    opendrift.models.basemodel: 2015-11-16 23:00:00 - step 47 of 96 - 3916 active elements (0 deactivated)
13:44:23 INFO    opendrift.models.basemodel: 2015-11-16 23:30:00 - step 48 of 96 - 4000 active elements (0 deactivated)
13:44:23 INFO    opendrift.models.basemodel: 2015-11-17 00:00:00 - step 49 of 96 - 4083 active elements (0 deactivated)
13:44:23 INFO    opendrift.models.basemodel: 2015-11-17 00:30:00 - step 50 of 96 - 4166 active elements (0 deactivated)
13:44:23 INFO    opendrift.models.basemodel: 2015-11-17 01:00:00 - step 51 of 96 - 4250 active elements (0 deactivated)
13:44:23 INFO    opendrift.models.basemodel: 2015-11-17 01:30:00 - step 52 of 96 - 4333 active elements (0 deactivated)
13:44:23 INFO    opendrift.models.basemodel: 2015-11-17 02:00:00 - step 53 of 96 - 4416 active elements (0 deactivated)
13:44:23 INFO    opendrift.models.basemodel: 2015-11-17 02:30:00 - step 54 of 96 - 4500 active elements (0 deactivated)
13:44:23 INFO    opendrift.models.basemodel: 2015-11-17 03:00:00 - step 55 of 96 - 4583 active elements (0 deactivated)
13:44:23 INFO    opendrift.models.basemodel: 2015-11-17 03:30:00 - step 56 of 96 - 4666 active elements (0 deactivated)
13:44:23 INFO    opendrift.models.basemodel: 2015-11-17 04:00:00 - step 57 of 96 - 4750 active elements (0 deactivated)
13:44:23 INFO    opendrift.models.basemodel: 2015-11-17 04:30:00 - step 58 of 96 - 4833 active elements (0 deactivated)
13:44:23 INFO    opendrift.models.basemodel: 2015-11-17 05:00:00 - step 59 of 96 - 4916 active elements (0 deactivated)
13:44:23 INFO    opendrift.models.basemodel: 2015-11-17 05:30:00 - step 60 of 96 - 4999 active elements (0 deactivated)
13:44:23 INFO    opendrift.models.basemodel: 2015-11-17 06:00:00 - step 61 of 96 - 5000 active elements (0 deactivated)
13:44:23 INFO    opendrift.models.basemodel: 2015-11-17 06:30:00 - step 62 of 96 - 5000 active elements (0 deactivated)
13:44:24 INFO    opendrift.models.basemodel: 2015-11-17 07:00:00 - step 63 of 96 - 5000 active elements (0 deactivated)
13:44:24 INFO    opendrift.models.basemodel: 2015-11-17 07:30:00 - step 64 of 96 - 5000 active elements (0 deactivated)
13:44:24 INFO    opendrift.models.basemodel: 2015-11-17 08:00:00 - step 65 of 96 - 5000 active elements (0 deactivated)
13:44:24 INFO    opendrift.models.basemodel: 2015-11-17 08:30:00 - step 66 of 96 - 5000 active elements (0 deactivated)
13:44:24 WARNING opendrift.readers.basereader.structured: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/norkyst800_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (7) must be increased. See `Variables.set_buffer_size`.
13:44:24 INFO    opendrift.models.basemodel: 2015-11-17 09:00:00 - step 67 of 96 - 5000 active elements (0 deactivated)
13:44:24 INFO    opendrift.models.basemodel: 2015-11-17 09:30:00 - step 68 of 96 - 5000 active elements (0 deactivated)
13:44:24 INFO    opendrift.models.basemodel: 2015-11-17 10:00:00 - step 69 of 96 - 5000 active elements (0 deactivated)
13:44:24 INFO    opendrift.models.basemodel: 2015-11-17 10:30:00 - step 70 of 96 - 5000 active elements (0 deactivated)
13:44:24 WARNING opendrift.readers.basereader.structured: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/norkyst800_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (7) must be increased. See `Variables.set_buffer_size`.
13:44:24 INFO    opendrift.models.basemodel: 2015-11-17 11:00:00 - step 71 of 96 - 5000 active elements (0 deactivated)
13:44:24 INFO    opendrift.models.basemodel: 2015-11-17 11:30:00 - step 72 of 96 - 5000 active elements (0 deactivated)
13:44:24 WARNING opendrift.readers.basereader.structured: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (4) must be increased. See `Variables.set_buffer_size`.
13:44:24 INFO    opendrift.models.basemodel: 2015-11-17 12:00:00 - step 73 of 96 - 5000 active elements (0 deactivated)
13:44:24 INFO    opendrift.models.basemodel: 2015-11-17 12:30:00 - step 74 of 96 - 5000 active elements (0 deactivated)
13:44:24 INFO    opendrift.models.basemodel: 2015-11-17 13:00:00 - step 75 of 96 - 5000 active elements (0 deactivated)
13:44:24 INFO    opendrift.models.basemodel: 2015-11-17 13:30:00 - step 76 of 96 - 5000 active elements (0 deactivated)
13:44:25 INFO    opendrift.models.basemodel: 2015-11-17 14:00:00 - step 77 of 96 - 5000 active elements (0 deactivated)
13:44:25 INFO    opendrift.models.basemodel: 2015-11-17 14:30:00 - step 78 of 96 - 5000 active elements (0 deactivated)
13:44:25 INFO    opendrift.models.basemodel: 2015-11-17 15:00:00 - step 79 of 96 - 5000 active elements (0 deactivated)
13:44:25 INFO    opendrift.models.basemodel: 2015-11-17 15:30:00 - step 80 of 96 - 5000 active elements (0 deactivated)
13:44:25 INFO    opendrift.models.basemodel: 2015-11-17 16:00:00 - step 81 of 96 - 4968 active elements (32 deactivated)
13:44:25 INFO    opendrift.models.basemodel: 2015-11-17 16:30:00 - step 82 of 96 - 4942 active elements (58 deactivated)
13:44:25 INFO    opendrift.models.basemodel: 2015-11-17 17:00:00 - step 83 of 96 - 4885 active elements (115 deactivated)
13:44:25 INFO    opendrift.models.basemodel: 2015-11-17 17:30:00 - step 84 of 96 - 4817 active elements (183 deactivated)
13:44:25 INFO    opendrift.models.basemodel: 2015-11-17 18:00:00 - step 85 of 96 - 4817 active elements (183 deactivated)
13:44:25 INFO    opendrift.models.basemodel: 2015-11-17 18:30:00 - step 86 of 96 - 4815 active elements (185 deactivated)
13:44:25 INFO    opendrift.models.basemodel: 2015-11-17 19:00:00 - step 87 of 96 - 4814 active elements (186 deactivated)
13:44:25 INFO    opendrift.models.basemodel: 2015-11-17 19:30:00 - step 88 of 96 - 4814 active elements (186 deactivated)
13:44:26 INFO    opendrift.models.basemodel: 2015-11-17 20:00:00 - step 89 of 96 - 4814 active elements (186 deactivated)
13:44:26 INFO    opendrift.models.basemodel: 2015-11-17 20:30:00 - step 90 of 96 - 4814 active elements (186 deactivated)
13:44:26 INFO    opendrift.models.basemodel: 2015-11-17 21:00:00 - step 91 of 96 - 4814 active elements (186 deactivated)
13:44:26 INFO    opendrift.models.basemodel: 2015-11-17 21:30:00 - step 92 of 96 - 4811 active elements (189 deactivated)
13:44:26 INFO    opendrift.models.basemodel: 2015-11-17 22:00:00 - step 93 of 96 - 4806 active elements (194 deactivated)
13:44:26 INFO    opendrift.models.basemodel: 2015-11-17 22:30:00 - step 94 of 96 - 4753 active elements (247 deactivated)
13:44:26 INFO    opendrift.models.basemodel: 2015-11-17 23:00:00 - step 95 of 96 - 4753 active elements (247 deactivated)
13:44:26 INFO    opendrift.models.basemodel: 2015-11-17 23:30:00 - step 96 of 96 - 4743 active elements (257 deactivated)

Second run, for comparison

o2 = OceanDrift(loglevel=20)  # Set loglevel to 0 for debug information
o2.add_reader([reader_norkyst, reader_arome])
o2.seed_elements(lon, lat, radius=50, number=5000, time=time)
o2.set_config('drift:relative_wind',  True)
o2.set_config('drift:vertical_mixing', False)
o2.run(steps=48*2, time_step=1800, time_step_output=3600*2)

Out:

13:44:26 INFO    opendrift.models.basemodel: OpenDriftSimulation initialised (version 1.7.1 / v1.7.1-87-g074c1d2)
13:44:26 INFO    opendrift.models.basemodel: Fallback values will be used for the following variables which have no readers:
13:44:26 INFO    opendrift.models.basemodel:    upward_sea_water_velocity: 0.000000
13:44:26 INFO    opendrift.models.basemodel:    ocean_vertical_diffusivity: 0.000000
13:44:26 INFO    opendrift.models.basemodel:    sea_surface_wave_significant_height: 0.000000
13:44:26 INFO    opendrift.models.basemodel:    sea_surface_wave_stokes_drift_x_velocity: 0.000000
13:44:26 INFO    opendrift.models.basemodel:    sea_surface_wave_stokes_drift_y_velocity: 0.000000
13:44:26 INFO    opendrift.models.basemodel:    sea_surface_wave_period_at_variance_spectral_density_maximum: 0.000000
13:44:26 INFO    opendrift.models.basemodel:    sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment: 0.000000
13:44:26 INFO    opendrift.models.basemodel:    surface_downward_x_stress: 0.000000
13:44:26 INFO    opendrift.models.basemodel:    surface_downward_y_stress: 0.000000
13:44:26 INFO    opendrift.models.basemodel:    turbulent_kinetic_energy: 0.000000
13:44:26 INFO    opendrift.models.basemodel:    turbulent_generic_length_scale: 0.000000
13:44:26 INFO    opendrift.models.basemodel:    sea_floor_depth_below_sea_level: 10000.000000
13:44:26 INFO    opendrift.models.basemodel: Adding a dynamical landmask with max. priority based on assumed maximum speed of 1 m/s. Adding a customised landmask may be faster...
13:44:35 INFO    opendrift.models.basemodel: Using existing reader for land_binary_mask
13:44:35 INFO    opendrift.models.basemodel: All points are in ocean
13:44:35 INFO    opendrift.models.basemodel: 2015-11-16 00:00:00 - step 1 of 96 - 84 active elements (0 deactivated)
13:44:35 WARNING opendrift.readers.basereader.structured: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/norkyst800_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (7) must be increased. See `Variables.set_buffer_size`.
13:44:35 WARNING opendrift.readers.basereader.structured: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (4) must be increased. See `Variables.set_buffer_size`.
13:44:35 INFO    opendrift.models.basemodel: 2015-11-16 00:30:00 - step 2 of 96 - 167 active elements (0 deactivated)
13:44:35 INFO    opendrift.models.basemodel: 2015-11-16 01:00:00 - step 3 of 96 - 250 active elements (0 deactivated)
13:44:35 INFO    opendrift.models.basemodel: 2015-11-16 01:30:00 - step 4 of 96 - 334 active elements (0 deactivated)
13:44:35 INFO    opendrift.models.basemodel: 2015-11-16 02:00:00 - step 5 of 96 - 417 active elements (0 deactivated)
13:44:35 INFO    opendrift.models.basemodel: 2015-11-16 02:30:00 - step 6 of 96 - 500 active elements (0 deactivated)
13:44:35 INFO    opendrift.models.basemodel: 2015-11-16 03:00:00 - step 7 of 96 - 584 active elements (0 deactivated)
13:44:35 INFO    opendrift.models.basemodel: 2015-11-16 03:30:00 - step 8 of 96 - 667 active elements (0 deactivated)
13:44:35 INFO    opendrift.models.basemodel: 2015-11-16 04:00:00 - step 9 of 96 - 750 active elements (0 deactivated)
13:44:35 INFO    opendrift.models.basemodel: 2015-11-16 04:30:00 - step 10 of 96 - 834 active elements (0 deactivated)
13:44:35 INFO    opendrift.models.basemodel: 2015-11-16 05:00:00 - step 11 of 96 - 917 active elements (0 deactivated)
13:44:35 INFO    opendrift.models.basemodel: 2015-11-16 05:30:00 - step 12 of 96 - 1000 active elements (0 deactivated)
13:44:35 INFO    opendrift.models.basemodel: 2015-11-16 06:00:00 - step 13 of 96 - 1084 active elements (0 deactivated)
13:44:35 INFO    opendrift.models.basemodel: 2015-11-16 06:30:00 - step 14 of 96 - 1167 active elements (0 deactivated)
13:44:35 INFO    opendrift.models.basemodel: 2015-11-16 07:00:00 - step 15 of 96 - 1250 active elements (0 deactivated)
13:44:35 INFO    opendrift.models.basemodel: 2015-11-16 07:30:00 - step 16 of 96 - 1334 active elements (0 deactivated)
13:44:35 INFO    opendrift.models.basemodel: 2015-11-16 08:00:00 - step 17 of 96 - 1417 active elements (0 deactivated)
13:44:35 INFO    opendrift.models.basemodel: 2015-11-16 08:30:00 - step 18 of 96 - 1500 active elements (0 deactivated)
13:44:35 INFO    opendrift.models.basemodel: 2015-11-16 09:00:00 - step 19 of 96 - 1584 active elements (0 deactivated)
13:44:35 INFO    opendrift.models.basemodel: 2015-11-16 09:30:00 - step 20 of 96 - 1667 active elements (0 deactivated)
13:44:35 INFO    opendrift.models.basemodel: 2015-11-16 10:00:00 - step 21 of 96 - 1750 active elements (0 deactivated)
13:44:35 INFO    opendrift.models.basemodel: 2015-11-16 10:30:00 - step 22 of 96 - 1833 active elements (0 deactivated)
13:44:36 INFO    opendrift.models.basemodel: 2015-11-16 11:00:00 - step 23 of 96 - 1917 active elements (0 deactivated)
13:44:36 INFO    opendrift.models.basemodel: 2015-11-16 11:30:00 - step 24 of 96 - 2000 active elements (0 deactivated)
13:44:36 INFO    opendrift.models.basemodel: 2015-11-16 12:00:00 - step 25 of 96 - 2083 active elements (0 deactivated)
13:44:36 INFO    opendrift.models.basemodel: 2015-11-16 12:30:00 - step 26 of 96 - 2167 active elements (0 deactivated)
13:44:36 INFO    opendrift.models.basemodel: 2015-11-16 13:00:00 - step 27 of 96 - 2250 active elements (0 deactivated)
13:44:36 INFO    opendrift.models.basemodel: 2015-11-16 13:30:00 - step 28 of 96 - 2333 active elements (0 deactivated)
13:44:36 INFO    opendrift.models.basemodel: 2015-11-16 14:00:00 - step 29 of 96 - 2417 active elements (0 deactivated)
13:44:36 INFO    opendrift.models.basemodel: 2015-11-16 14:30:00 - step 30 of 96 - 2500 active elements (0 deactivated)
13:44:36 INFO    opendrift.models.basemodel: 2015-11-16 15:00:00 - step 31 of 96 - 2583 active elements (0 deactivated)
13:44:36 INFO    opendrift.models.basemodel: 2015-11-16 15:30:00 - step 32 of 96 - 2667 active elements (0 deactivated)
13:44:36 INFO    opendrift.models.basemodel: 2015-11-16 16:00:00 - step 33 of 96 - 2750 active elements (0 deactivated)
13:44:36 INFO    opendrift.models.basemodel: 2015-11-16 16:30:00 - step 34 of 96 - 2833 active elements (0 deactivated)
13:44:36 INFO    opendrift.models.basemodel: 2015-11-16 17:00:00 - step 35 of 96 - 2917 active elements (0 deactivated)
13:44:36 INFO    opendrift.models.basemodel: 2015-11-16 17:30:00 - step 36 of 96 - 3000 active elements (0 deactivated)
13:44:36 INFO    opendrift.models.basemodel: 2015-11-16 18:00:00 - step 37 of 96 - 3083 active elements (0 deactivated)
13:44:36 INFO    opendrift.models.basemodel: 2015-11-16 18:30:00 - step 38 of 96 - 3167 active elements (0 deactivated)
13:44:36 INFO    opendrift.models.basemodel: 2015-11-16 19:00:00 - step 39 of 96 - 3250 active elements (0 deactivated)
13:44:36 INFO    opendrift.models.basemodel: 2015-11-16 19:30:00 - step 40 of 96 - 3333 active elements (0 deactivated)
13:44:36 INFO    opendrift.models.basemodel: 2015-11-16 20:00:00 - step 41 of 96 - 3416 active elements (0 deactivated)
13:44:37 INFO    opendrift.models.basemodel: 2015-11-16 20:30:00 - step 42 of 96 - 3500 active elements (0 deactivated)
13:44:37 INFO    opendrift.models.basemodel: 2015-11-16 21:00:00 - step 43 of 96 - 3583 active elements (0 deactivated)
13:44:37 INFO    opendrift.models.basemodel: 2015-11-16 21:30:00 - step 44 of 96 - 3666 active elements (0 deactivated)
13:44:37 INFO    opendrift.models.basemodel: 2015-11-16 22:00:00 - step 45 of 96 - 3750 active elements (0 deactivated)
13:44:37 INFO    opendrift.models.basemodel: 2015-11-16 22:30:00 - step 46 of 96 - 3833 active elements (0 deactivated)
13:44:37 INFO    opendrift.models.basemodel: 2015-11-16 23:00:00 - step 47 of 96 - 3916 active elements (0 deactivated)
13:44:37 INFO    opendrift.models.basemodel: 2015-11-16 23:30:00 - step 48 of 96 - 4000 active elements (0 deactivated)
13:44:37 INFO    opendrift.models.basemodel: 2015-11-17 00:00:00 - step 49 of 96 - 4083 active elements (0 deactivated)
13:44:37 INFO    opendrift.models.basemodel: 2015-11-17 00:30:00 - step 50 of 96 - 4166 active elements (0 deactivated)
13:44:37 INFO    opendrift.models.basemodel: 2015-11-17 01:00:00 - step 51 of 96 - 4250 active elements (0 deactivated)
13:44:37 INFO    opendrift.models.basemodel: 2015-11-17 01:30:00 - step 52 of 96 - 4333 active elements (0 deactivated)
13:44:37 INFO    opendrift.models.basemodel: 2015-11-17 02:00:00 - step 53 of 96 - 4416 active elements (0 deactivated)
13:44:37 INFO    opendrift.models.basemodel: 2015-11-17 02:30:00 - step 54 of 96 - 4500 active elements (0 deactivated)
13:44:37 INFO    opendrift.models.basemodel: 2015-11-17 03:00:00 - step 55 of 96 - 4583 active elements (0 deactivated)
13:44:37 INFO    opendrift.models.basemodel: 2015-11-17 03:30:00 - step 56 of 96 - 4666 active elements (0 deactivated)
13:44:37 INFO    opendrift.models.basemodel: 2015-11-17 04:00:00 - step 57 of 96 - 4750 active elements (0 deactivated)
13:44:38 INFO    opendrift.models.basemodel: 2015-11-17 04:30:00 - step 58 of 96 - 4833 active elements (0 deactivated)
13:44:38 INFO    opendrift.models.basemodel: 2015-11-17 05:00:00 - step 59 of 96 - 4916 active elements (0 deactivated)
13:44:38 INFO    opendrift.models.basemodel: 2015-11-17 05:30:00 - step 60 of 96 - 4999 active elements (0 deactivated)
13:44:38 INFO    opendrift.models.basemodel: 2015-11-17 06:00:00 - step 61 of 96 - 5000 active elements (0 deactivated)
13:44:38 INFO    opendrift.models.basemodel: 2015-11-17 06:30:00 - step 62 of 96 - 5000 active elements (0 deactivated)
13:44:38 INFO    opendrift.models.basemodel: 2015-11-17 07:00:00 - step 63 of 96 - 5000 active elements (0 deactivated)
13:44:38 INFO    opendrift.models.basemodel: 2015-11-17 07:30:00 - step 64 of 96 - 5000 active elements (0 deactivated)
13:44:38 INFO    opendrift.models.basemodel: 2015-11-17 08:00:00 - step 65 of 96 - 5000 active elements (0 deactivated)
13:44:38 INFO    opendrift.models.basemodel: 2015-11-17 08:30:00 - step 66 of 96 - 5000 active elements (0 deactivated)
13:44:38 INFO    opendrift.models.basemodel: 2015-11-17 09:00:00 - step 67 of 96 - 5000 active elements (0 deactivated)
13:44:38 INFO    opendrift.models.basemodel: 2015-11-17 09:30:00 - step 68 of 96 - 5000 active elements (0 deactivated)
13:44:38 WARNING opendrift.readers.basereader.structured: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/norkyst800_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (7) must be increased. See `Variables.set_buffer_size`.
13:44:38 INFO    opendrift.models.basemodel: 2015-11-17 10:00:00 - step 69 of 96 - 5000 active elements (0 deactivated)
13:44:38 INFO    opendrift.models.basemodel: 2015-11-17 10:30:00 - step 70 of 96 - 5000 active elements (0 deactivated)
13:44:39 INFO    opendrift.models.basemodel: 2015-11-17 11:00:00 - step 71 of 96 - 5000 active elements (0 deactivated)
13:44:39 INFO    opendrift.models.basemodel: 2015-11-17 11:30:00 - step 72 of 96 - 5000 active elements (0 deactivated)
13:44:39 WARNING opendrift.readers.basereader.structured: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/norkyst800_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (7) must be increased. See `Variables.set_buffer_size`.
13:44:39 INFO    opendrift.models.basemodel: 2015-11-17 12:00:00 - step 73 of 96 - 5000 active elements (0 deactivated)
13:44:39 INFO    opendrift.models.basemodel: 2015-11-17 12:30:00 - step 74 of 96 - 5000 active elements (0 deactivated)
13:44:39 INFO    opendrift.models.basemodel: 2015-11-17 13:00:00 - step 75 of 96 - 5000 active elements (0 deactivated)
13:44:39 INFO    opendrift.models.basemodel: 2015-11-17 13:30:00 - step 76 of 96 - 5000 active elements (0 deactivated)
13:44:39 INFO    opendrift.models.basemodel: 2015-11-17 14:00:00 - step 77 of 96 - 5000 active elements (0 deactivated)
13:44:39 INFO    opendrift.models.basemodel: 2015-11-17 14:30:00 - step 78 of 96 - 5000 active elements (0 deactivated)
13:44:39 INFO    opendrift.models.basemodel: 2015-11-17 15:00:00 - step 79 of 96 - 4993 active elements (7 deactivated)
13:44:39 INFO    opendrift.models.basemodel: 2015-11-17 15:30:00 - step 80 of 96 - 4993 active elements (7 deactivated)
13:44:39 INFO    opendrift.models.basemodel: 2015-11-17 16:00:00 - step 81 of 96 - 4969 active elements (31 deactivated)
13:44:39 INFO    opendrift.models.basemodel: 2015-11-17 16:30:00 - step 82 of 96 - 4969 active elements (31 deactivated)
13:44:40 INFO    opendrift.models.basemodel: 2015-11-17 17:00:00 - step 83 of 96 - 4967 active elements (33 deactivated)
13:44:40 INFO    opendrift.models.basemodel: 2015-11-17 17:30:00 - step 84 of 96 - 4965 active elements (35 deactivated)
13:44:40 INFO    opendrift.models.basemodel: 2015-11-17 18:00:00 - step 85 of 96 - 4960 active elements (40 deactivated)
13:44:40 INFO    opendrift.models.basemodel: 2015-11-17 18:30:00 - step 86 of 96 - 4902 active elements (98 deactivated)
13:44:40 INFO    opendrift.models.basemodel: 2015-11-17 19:00:00 - step 87 of 96 - 4887 active elements (113 deactivated)
13:44:40 INFO    opendrift.models.basemodel: 2015-11-17 19:30:00 - step 88 of 96 - 4869 active elements (131 deactivated)
13:44:40 INFO    opendrift.models.basemodel: 2015-11-17 20:00:00 - step 89 of 96 - 4867 active elements (133 deactivated)
13:44:40 INFO    opendrift.models.basemodel: 2015-11-17 20:30:00 - step 90 of 96 - 4846 active elements (154 deactivated)
13:44:40 INFO    opendrift.models.basemodel: 2015-11-17 21:00:00 - step 91 of 96 - 4818 active elements (182 deactivated)
13:44:40 INFO    opendrift.models.basemodel: 2015-11-17 21:30:00 - step 92 of 96 - 4818 active elements (182 deactivated)
13:44:40 INFO    opendrift.models.basemodel: 2015-11-17 22:00:00 - step 93 of 96 - 4808 active elements (192 deactivated)
13:44:40 INFO    opendrift.models.basemodel: 2015-11-17 22:30:00 - step 94 of 96 - 4785 active elements (215 deactivated)
13:44:40 INFO    opendrift.models.basemodel: 2015-11-17 23:00:00 - step 95 of 96 - 4783 active elements (217 deactivated)
13:44:40 INFO    opendrift.models.basemodel: 2015-11-17 23:30:00 - step 96 of 96 - 4734 active elements (266 deactivated)

Animate and compare the two runs

o.animation(compare=o2, legend=['Absolute wind', 'Relative wind'])

Out:

13:45:02 INFO    opendrift.models.basemodel: Saving animation to /root/project/docs/source/gallery/animations/example_relative_0.gif...
13:45:02 INFO    opendrift.models.basemodel: Making animated gif...
MovieWriter imagemagick unavailable; using Pillow instead.
../_images/example_relative_0.gif
o.plot(compare=o2, legend=['Absolute wind', 'Relative wind'], fast=True)
OpenDrift - OceanDrift 2015-11-16 00:00 to 2015-11-18 00:00 UTC (25 steps)

Out:

13:45:27 WARNING opendrift.models.basemodel: Plotting fast. This will make your plots less accurate.

(<GeoAxesSubplot:title={'center':'OpenDrift - OceanDrift\n2015-11-16 00:00 to 2015-11-18 00:00 UTC (25 steps)'}>, <module 'matplotlib.pyplot' from '/opt/conda/envs/opendrift/lib/python3.9/site-packages/matplotlib/pyplot.py'>)

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

Gallery generated by Sphinx-Gallery