Oil in ice

from datetime import datetime, timedelta
from opendrift.readers import reader_netCDF_CF_generic
from opendrift.models.openoil import OpenOil
import cmocean

o = OpenOil(loglevel=20)
18:15:22 INFO    opendrift:576: OpenDriftSimulation initialised (version 1.14.6 / v1.14.6-11-g8e92c12)

Using live data from Barents 2.5 km ocean model

o.add_readers_from_list(['https://thredds.met.no/thredds/dodsC/fou-hi/barents_eps_zdepth_be'])

Adjusting some configuration

o.set_config('processes:dispersion',  False)
o.set_config('processes:evaporation',  False)
o.set_config('processes:emulsification',  False)
o.set_config('drift:horizontal_diffusivity', 10)
o.set_config('drift:truncate_ocean_model_below_m', 3)

Imaginary oil spill in Hinlopen strait

o.seed_elements(lon=19.1909, lat=79.5986, radius=50,
                number=3000, time=datetime.now() - timedelta(days=7))
18:15:22 INFO    opendrift.models.openoil.openoil:1708: Oil type not specified, using default: GENERIC BUNKER C
18:15:22 INFO    opendrift.models.openoil.adios.dirjs:86: Querying ADIOS database for oil: GENERIC BUNKER C
18:15:22 INFO    opendrift.models.openoil.openoil:1717: Using density 988.1 and viscosity 0.02169233387797564 of oiltype GENERIC BUNKER C
18:15:22 INFO    opendrift.models.basemodel.environment:203: Adding a global landmask from GSHHG
18:15:27 INFO    opendrift.models.basemodel.environment:227: Fallback values will be used for the following variables which have no readers:
18:15:27 INFO    opendrift.models.basemodel.environment:230:    sea_surface_height: 0.000000
18:15:27 INFO    opendrift.models.basemodel.environment:230:    upward_sea_water_velocity: 0.000000
18:15:27 INFO    opendrift.models.basemodel.environment:230:    sea_surface_wave_significant_height: 0.000000
18:15:27 INFO    opendrift.models.basemodel.environment:230:    sea_surface_wave_stokes_drift_x_velocity: 0.000000
18:15:27 INFO    opendrift.models.basemodel.environment:230:    sea_surface_wave_stokes_drift_y_velocity: 0.000000
18:15:27 INFO    opendrift.models.basemodel.environment:230:    sea_surface_wave_period_at_variance_spectral_density_maximum: 0.000000
18:15:27 INFO    opendrift.models.basemodel.environment:230:    sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment: 0.000000
18:15:27 INFO    opendrift.models.basemodel.environment:230:    sea_ice_area_fraction: 0.000000
18:15:27 INFO    opendrift.models.basemodel.environment:230:    sea_ice_x_velocity: 0.000000
18:15:27 INFO    opendrift.models.basemodel.environment:230:    sea_ice_y_velocity: 0.000000
18:15:27 INFO    opendrift.models.basemodel.environment:230:    sea_water_temperature: 10.000000
18:15:27 INFO    opendrift.models.basemodel.environment:230:    sea_water_salinity: 34.000000
18:15:27 INFO    opendrift.models.basemodel.environment:230:    sea_floor_depth_below_sea_level: 10000.000000
18:15:27 INFO    opendrift.models.basemodel.environment:230:    ocean_vertical_diffusivity: 0.020000
18:15:27 INFO    opendrift.models.basemodel.environment:230:    ocean_mixed_layer_thickness: 50.000000

Running model

o.run(duration=timedelta(hours=48), time_step=1800, time_step_output=3600)
18:15:27 INFO    opendrift:1803: Skipping environment variable upward_sea_water_velocity because of condition ['drift:vertical_advection', 'is', False]
18:15:27 INFO    opendrift:1814: Storing previous values of element property lon because of condition (('general:coastline_action', 'in', ['stranding', 'previous']), 'or', ('general:seafloor_action', 'in', ['previous']))
18:15:27 INFO    opendrift:1814: Storing previous values of element property lat because of condition (('general:coastline_action', 'in', ['stranding', 'previous']), 'or', ('general:seafloor_action', 'in', ['previous']))
18:15:27 INFO    opendrift:952: Using existing reader for land_binary_mask to move elements to ocean
18:15:27 INFO    opendrift:982: All points are in ocean
18:15:27 INFO    opendrift.models.openoil.openoil:692: Oil-water surface tension is 0.035935 Nm
18:15:27 INFO    opendrift.models.openoil.openoil:705: Max water fraction not available for GENERIC BUNKER C, using default
18:15:27 INFO    opendrift:2110: 2025-11-03 18:15:22.922392 - step 1 of 96 - 3000 active elements (0 deactivated)
18:15:27 INFO    opendrift.readers:63: Opening file with xr.open_dataset
18:15:29 INFO    opendrift.readers.reader_netCDF_CF_generic:332: Detected dimensions: {'x': 'X', 'y': 'Y', 'z': 'depth', 'time': 'time'}
18:15:29 INFO    opendrift.readers.basereader:176: Variable x_sea_water_velocity will be rotated from eastward_sea_water_velocity
18:15:29 INFO    opendrift.readers.basereader:176: Variable y_sea_water_velocity will be rotated from northward_sea_water_velocity
18:15:32 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.020271001 to -0.0060307747) found for ocean_vertical_diffusivity, replacing with NaN
18:15:32 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:15:34 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.02012278 to -0.0074089444) found for ocean_vertical_diffusivity, replacing with NaN
18:15:34 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:15:34 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:34 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:34 INFO    opendrift:2110: 2025-11-03 18:45:22.922392 - step 2 of 96 - 3000 active elements (0 deactivated)
18:15:34 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:34 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:34 INFO    opendrift:2110: 2025-11-03 19:15:22.922392 - step 3 of 96 - 3000 active elements (0 deactivated)
18:15:36 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.016574644 to -0.005859155) found for ocean_vertical_diffusivity, replacing with NaN
18:15:36 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:15:36 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:36 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:38 INFO    opendrift:2110: 2025-11-03 19:45:22.922392 - step 4 of 96 - 3000 active elements (0 deactivated)
18:15:38 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:38 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:38 INFO    opendrift:2110: 2025-11-03 20:15:22.922392 - step 5 of 96 - 3000 active elements (0 deactivated)
18:15:40 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.012392502 to -0.0058359853) found for ocean_vertical_diffusivity, replacing with NaN
18:15:40 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:15:40 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:40 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:40 INFO    opendrift:2110: 2025-11-03 20:45:22.922392 - step 6 of 96 - 3000 active elements (0 deactivated)
18:15:40 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:40 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:41 INFO    opendrift:2110: 2025-11-03 21:15:22.922392 - step 7 of 96 - 3000 active elements (0 deactivated)
18:15:43 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.011059343 to -0.0042934553) found for ocean_vertical_diffusivity, replacing with NaN
18:15:43 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:15:43 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:43 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:44 INFO    opendrift:2110: 2025-11-03 21:45:22.922392 - step 8 of 96 - 3000 active elements (0 deactivated)
18:15:44 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:44 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:44 INFO    opendrift:2110: 2025-11-03 22:15:22.922392 - step 9 of 96 - 3000 active elements (0 deactivated)
18:15:46 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.011266944 to -0.0037417845) found for ocean_vertical_diffusivity, replacing with NaN
18:15:46 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:15:46 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:46 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:46 INFO    opendrift:2110: 2025-11-03 22:45:22.922392 - step 10 of 96 - 3000 active elements (0 deactivated)
18:15:46 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:46 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:46 INFO    opendrift:2110: 2025-11-03 23:15:22.922392 - step 11 of 96 - 3000 active elements (0 deactivated)
18:15:49 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.010776634 to -0.003608109) found for ocean_vertical_diffusivity, replacing with NaN
18:15:49 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:15:49 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:49 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:49 INFO    opendrift:2110: 2025-11-03 23:45:22.922392 - step 12 of 96 - 3000 active elements (0 deactivated)
18:15:49 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:49 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:50 INFO    opendrift:2110: 2025-11-04 00:15:22.922392 - step 13 of 96 - 3000 active elements (0 deactivated)
18:15:52 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.006449891 to -0.002392447) found for ocean_vertical_diffusivity, replacing with NaN
18:15:52 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:15:52 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:52 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:52 INFO    opendrift:2110: 2025-11-04 00:45:22.922392 - step 14 of 96 - 3000 active elements (0 deactivated)
18:15:52 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:52 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:52 INFO    opendrift:2110: 2025-11-04 01:15:22.922392 - step 15 of 96 - 3000 active elements (0 deactivated)
18:15:55 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.0035913845 to -0.0009257864) found for ocean_vertical_diffusivity, replacing with NaN
18:15:55 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:15:55 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:55 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:55 INFO    opendrift:2110: 2025-11-04 01:45:22.922392 - step 16 of 96 - 3000 active elements (0 deactivated)
18:15:55 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:55 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:55 INFO    opendrift:2110: 2025-11-04 02:15:22.922392 - step 17 of 96 - 3000 active elements (0 deactivated)
18:15:57 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.0046336465 to -0.0010365914) found for ocean_vertical_diffusivity, replacing with NaN
18:15:57 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:15:57 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:57 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:57 INFO    opendrift:2110: 2025-11-04 02:45:22.922392 - step 18 of 96 - 3000 active elements (0 deactivated)
18:15:57 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:57 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:15:58 INFO    opendrift:2110: 2025-11-04 03:15:22.922392 - step 19 of 96 - 3000 active elements (0 deactivated)
18:16:00 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.011461315 to -0.0020829947) found for ocean_vertical_diffusivity, replacing with NaN
18:16:00 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:16:00 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:00 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:00 INFO    opendrift:2110: 2025-11-04 03:45:22.922392 - step 20 of 96 - 3000 active elements (0 deactivated)
18:16:01 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:01 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:01 INFO    opendrift:2110: 2025-11-04 04:15:22.922392 - step 21 of 96 - 3000 active elements (0 deactivated)
18:16:04 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.020422034 to -0.0039842287) found for ocean_vertical_diffusivity, replacing with NaN
18:16:04 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:16:04 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:04 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:05 INFO    opendrift:2110: 2025-11-04 04:45:22.922392 - step 22 of 96 - 2997 active elements (3 deactivated)
18:16:05 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:05 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:05 INFO    opendrift:2110: 2025-11-04 05:15:22.922392 - step 23 of 96 - 2994 active elements (6 deactivated)
18:16:08 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.027706161 to -0.005421116) found for ocean_vertical_diffusivity, replacing with NaN
18:16:08 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:16:08 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:08 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:08 INFO    opendrift:2110: 2025-11-04 05:45:22.922392 - step 24 of 96 - 2966 active elements (34 deactivated)
18:16:08 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:08 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:08 INFO    opendrift:2110: 2025-11-04 06:15:22.922392 - step 25 of 96 - 2838 active elements (162 deactivated)
18:16:10 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.030435933 to -0.006021463) found for ocean_vertical_diffusivity, replacing with NaN
18:16:10 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:16:10 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:10 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:10 INFO    opendrift:2110: 2025-11-04 06:45:22.922392 - step 26 of 96 - 2459 active elements (541 deactivated)
18:16:10 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:10 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:10 INFO    opendrift:2110: 2025-11-04 07:15:22.922392 - step 27 of 96 - 1766 active elements (1234 deactivated)
18:16:13 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.028028445 to -0.0055782194) found for ocean_vertical_diffusivity, replacing with NaN
18:16:13 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:16:13 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:13 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:13 INFO    opendrift:2110: 2025-11-04 07:45:22.922392 - step 28 of 96 - 996 active elements (2004 deactivated)
18:16:13 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:13 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:13 INFO    opendrift:2110: 2025-11-04 08:15:22.922392 - step 29 of 96 - 473 active elements (2527 deactivated)
18:16:15 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.023309875 to -0.0044506597) found for ocean_vertical_diffusivity, replacing with NaN
18:16:15 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:16:15 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:15 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:15 INFO    opendrift:2110: 2025-11-04 08:45:22.922392 - step 30 of 96 - 222 active elements (2778 deactivated)
18:16:15 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:15 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:15 INFO    opendrift:2110: 2025-11-04 09:15:22.922392 - step 31 of 96 - 122 active elements (2878 deactivated)
18:16:18 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.023990924 to -0.0077052163) found for ocean_vertical_diffusivity, replacing with NaN
18:16:18 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:16:18 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:18 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:18 INFO    opendrift:2110: 2025-11-04 09:45:22.922392 - step 32 of 96 - 72 active elements (2928 deactivated)
18:16:18 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:18 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:18 INFO    opendrift:2110: 2025-11-04 10:15:22.922392 - step 33 of 96 - 59 active elements (2941 deactivated)
18:16:20 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.024497574 to -0.007936895) found for ocean_vertical_diffusivity, replacing with NaN
18:16:20 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:16:20 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:20 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:20 INFO    opendrift:2110: 2025-11-04 10:45:22.922392 - step 34 of 96 - 49 active elements (2951 deactivated)
18:16:20 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:20 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:20 INFO    opendrift:2110: 2025-11-04 11:15:22.922392 - step 35 of 96 - 45 active elements (2955 deactivated)
18:16:22 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.020803588 to -0.007730124) found for ocean_vertical_diffusivity, replacing with NaN
18:16:22 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:16:22 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:22 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:22 INFO    opendrift:2110: 2025-11-04 11:45:22.922392 - step 36 of 96 - 42 active elements (2958 deactivated)
18:16:22 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:22 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:22 INFO    opendrift:2110: 2025-11-04 12:15:22.922392 - step 37 of 96 - 38 active elements (2962 deactivated)
18:16:24 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.011463002 to -0.0054368475) found for ocean_vertical_diffusivity, replacing with NaN
18:16:24 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:16:24 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:24 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:24 INFO    opendrift:2110: 2025-11-04 12:45:22.922392 - step 38 of 96 - 31 active elements (2969 deactivated)
18:16:24 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:24 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:25 INFO    opendrift:2110: 2025-11-04 13:15:22.922392 - step 39 of 96 - 25 active elements (2975 deactivated)
18:16:27 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.00541299 to -0.002565092) found for ocean_vertical_diffusivity, replacing with NaN
18:16:27 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:16:27 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:27 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:27 INFO    opendrift:2110: 2025-11-04 13:45:22.922392 - step 40 of 96 - 21 active elements (2979 deactivated)
18:16:27 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:27 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:27 INFO    opendrift:2110: 2025-11-04 14:15:22.922392 - step 41 of 96 - 17 active elements (2983 deactivated)
18:16:29 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.005681581 to -0.0015626817) found for ocean_vertical_diffusivity, replacing with NaN
18:16:29 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:16:29 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:29 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:29 INFO    opendrift:2110: 2025-11-04 14:45:22.922392 - step 42 of 96 - 10 active elements (2990 deactivated)
18:16:29 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:29 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:29 INFO    opendrift:2110: 2025-11-04 15:15:22.922392 - step 43 of 96 - 5 active elements (2995 deactivated)
18:16:31 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.01460485 to -0.003742157) found for ocean_vertical_diffusivity, replacing with NaN
18:16:31 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:16:31 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:31 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:31 INFO    opendrift:2110: 2025-11-04 15:45:22.922392 - step 44 of 96 - 3 active elements (2997 deactivated)
18:16:31 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:31 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:31 INFO    opendrift:2110: 2025-11-04 16:15:22.922392 - step 45 of 96 - 3 active elements (2997 deactivated)
18:16:33 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.030641275 to -0.009490687) found for ocean_vertical_diffusivity, replacing with NaN
18:16:33 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:16:33 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:33 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:33 INFO    opendrift:2110: 2025-11-04 16:45:22.922392 - step 46 of 96 - 2 active elements (2998 deactivated)
18:16:33 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:33 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:33 INFO    opendrift:2110: 2025-11-04 17:15:22.922392 - step 47 of 96 - 2 active elements (2998 deactivated)
18:16:36 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.04476368 to -0.015064575) found for ocean_vertical_diffusivity, replacing with NaN
18:16:36 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:16:36 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:36 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:36 INFO    opendrift:2110: 2025-11-04 17:45:22.922392 - step 48 of 96 - 2 active elements (2998 deactivated)
18:16:36 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:36 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:36 INFO    opendrift:2110: 2025-11-04 18:15:22.922392 - step 49 of 96 - 1 active elements (2999 deactivated)
18:16:38 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.04169745 to -0.017800033) found for ocean_vertical_diffusivity, replacing with NaN
18:16:38 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:16:38 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:38 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:38 INFO    opendrift:2110: 2025-11-04 18:45:22.922392 - step 50 of 96 - 1 active elements (2999 deactivated)
18:16:38 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:38 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:38 INFO    opendrift:2110: 2025-11-04 19:15:22.922392 - step 51 of 96 - 1 active elements (2999 deactivated)
18:16:40 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.039280366 to -0.01842668) found for ocean_vertical_diffusivity, replacing with NaN
18:16:40 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:16:40 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:40 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:41 INFO    opendrift:2110: 2025-11-04 19:45:22.922392 - step 52 of 96 - 1 active elements (2999 deactivated)
18:16:41 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:41 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:41 INFO    opendrift:2110: 2025-11-04 20:15:22.922392 - step 53 of 96 - 1 active elements (2999 deactivated)
18:16:43 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.031750854 to -0.01479075) found for ocean_vertical_diffusivity, replacing with NaN
18:16:43 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:16:43 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:43 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:43 INFO    opendrift:2110: 2025-11-04 20:45:22.922392 - step 54 of 96 - 1 active elements (2999 deactivated)
18:16:43 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:43 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:43 INFO    opendrift:2110: 2025-11-04 21:15:22.922392 - step 55 of 96 - 1 active elements (2999 deactivated)
18:16:45 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.028864654 to -0.011377554) found for ocean_vertical_diffusivity, replacing with NaN
18:16:45 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:16:45 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:45 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:45 INFO    opendrift:2110: 2025-11-04 21:45:22.922392 - step 56 of 96 - 1 active elements (2999 deactivated)
18:16:45 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:45 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:45 INFO    opendrift:2110: 2025-11-04 22:15:22.922392 - step 57 of 96 - 1 active elements (2999 deactivated)
18:16:47 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.026930539 to -0.009594738) found for ocean_vertical_diffusivity, replacing with NaN
18:16:47 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:16:47 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:47 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:47 INFO    opendrift:2110: 2025-11-04 22:45:22.922392 - step 58 of 96 - 1 active elements (2999 deactivated)
18:16:47 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:47 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:47 INFO    opendrift:2110: 2025-11-04 23:15:22.922392 - step 59 of 96 - 1 active elements (2999 deactivated)
18:16:50 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.021633798 to -0.008642616) found for ocean_vertical_diffusivity, replacing with NaN
18:16:50 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:16:50 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:50 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:50 INFO    opendrift:2110: 2025-11-04 23:45:22.922392 - step 60 of 96 - 1 active elements (2999 deactivated)
18:16:50 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:50 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:50 INFO    opendrift:2110: 2025-11-05 00:15:22.922392 - step 61 of 96 - 1 active elements (2999 deactivated)
18:16:52 WARNING opendrift.readers.basereader.variables:656: Invalid values (-0.011108518 to -0.0065556387) found for ocean_vertical_diffusivity, replacing with NaN
18:16:52 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1])
18:16:52 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:52 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:52 INFO    opendrift:2110: 2025-11-05 00:45:22.922392 - step 62 of 96 - 1 active elements (2999 deactivated)
18:16:52 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:52 WARNING opendrift.readers.interpolation.interpolators:118: Only NaNs input to linearNDFast - returning
18:16:52 WARNING opendrift:2185: The simulation stopped before requested end time was reached.
18:16:52 INFO    opendrift:2187: ========================
18:16:52 INFO    opendrift:2188: End of simulation:
18:16:52 INFO    opendrift:2189: No more active or scheduled elements, quitting.
18:16:52 INFO    opendrift:2190: Traceback (most recent call last):
  File "/root/project/opendrift/models/basemodel/__init__.py", line 2172, in run
    raise ValueError('No more active or scheduled elements, quitting.')
ValueError: No more active or scheduled elements, quitting.

18:16:52 INFO    opendrift:2191: 'The simulation stopped before requested end time was reached.'

18:16:52 INFO    opendrift:2194: ========================
<xarray.Dataset> Size: 16MB
Dimensions:                                                                              (
                                                                                          trajectory: 3000,
                                                                                          time: 31)
Coordinates:
  * trajectory                                                                           (trajectory) int64 24kB ...
  * time                                                                                 (time) datetime64[ns] 248B ...
Data variables: (12/43)
    status                                                                               (trajectory, time) float32 372kB ...
    moving                                                                               (trajectory, time) float32 372kB ...
    age_seconds                                                                          (trajectory, time) float32 372kB ...
    origin_marker                                                                        (trajectory, time) float32 372kB ...
    lon                                                                                  (trajectory, time) float32 372kB ...
    lat                                                                                  (trajectory, time) float32 372kB ...
    ...                                                                                   ...
    sea_water_temperature                                                                (trajectory, time) float32 372kB ...
    sea_water_salinity                                                                   (trajectory, time) float32 372kB ...
    sea_floor_depth_below_sea_level                                                      (trajectory, time) float32 372kB ...
    ocean_vertical_diffusivity                                                           (trajectory, time) float32 372kB ...
    land_binary_mask                                                                     (trajectory, time) float32 372kB ...
    ocean_mixed_layer_thickness                                                          (trajectory, time) float32 372kB ...
Attributes: (12/165)
    Conventions:                                                             ...
    standard_name_vocabulary:                                                ...
    featureType:                                                             ...
    title:                                                                   ...
    summary:                                                                 ...
    keywords:                                                                ...
    ...                                                                                                               ...
    geospatial_lon_units:                                                    ...
    geospatial_lon_resolution:                                               ...
    runtime:                                                                 ...
    geospatial_vertical_min:                                                 ...
    geospatial_vertical_max:                                                 ...
    geospatial_vertical_positive:                                            ...


Print and plot results

print(o)
o.animation(background='sea_ice_area_fraction', cmap=cmocean.cm.ice,
            vmin=0, vmax=1, bgalpha=1, fast=False)
===========================
--------------------
Reader performance:
--------------------
global_landmask
 0:00:01.5  total
 0:00:00.0  preparing
 0:00:01.5  reading
 0:00:00.0  masking
--------------------
https://thredds.met.no/thredds/dodsC/fou-hi/barents_eps_zdepth_be
 0:01:11.0  total
 0:00:00.0  preparing
 0:01:10.6  reading
 0:00:00.5  interpolation
 0:00:00.0  interpolation_time
 0:00:00.4  rotating vectors
 0:00:00.0  masking
--------------------
Performance:
 1:29.7 total time
    4.2 configuration
    0.0 preparing main loop
      0.0 moving elements to ocean
 1:25.4 main loop
      6.4 updating elements
        0.0 oil weathering
          0.0 updating viscosities
          0.0 updating densities
        6.2 vertical mixing
    0.0 cleaning up
--------------------
===========================
Model:  OpenOil     (OpenDrift version 1.14.6)
        0 active Oil particles  (3000 deactivated, 0 scheduled)
-------------------
Environment variables:
  -----
  land_binary_mask
     1) global_landmask
  -----
  ocean_vertical_diffusivity
  sea_floor_depth_below_sea_level
  sea_ice_area_fraction
  sea_ice_x_velocity
  sea_ice_y_velocity
  sea_surface_height
  sea_water_salinity
  sea_water_temperature
  x_sea_water_velocity
  x_wind
  y_sea_water_velocity
  y_wind
     1) https://thredds.met.no/thredds/dodsC/fou-hi/barents_eps_zdepth_be
  -----
Readers not added for the following variables:
  ocean_mixed_layer_thickness
  sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment
  sea_surface_wave_period_at_variance_spectral_density_maximum
  sea_surface_wave_significant_height
  sea_surface_wave_stokes_drift_x_velocity
  sea_surface_wave_stokes_drift_y_velocity

Discarded readers:

Time:
        Start: 2025-11-03 18:15:22.922392 UTC
        Present: 2025-11-05 00:45:22.922392 UTC
        Calculation steps: 61 * 0:30:00 - total time: 1 day, 6:30:00
        Output steps: 31 * 1:00:00
-------------------
'The simulation stopped before requested end time was reached.'
===========================

18:17:03 INFO    opendrift:4645: Saving animation to /root/project/docs/source/gallery/animations/example_oil_ice_0.gif...
18:17:29 INFO    opendrift:3080: Time to make animation: 0:00:36.519802
../_images/example_oil_ice_0.gif
o.plot(background='sea_ice_area_fraction', cmap=cmocean.cm.ice,
       vmin=0, vmax=1, bgalpha=1, fast=False)
OpenDrift - OpenOil (GENERIC BUNKER C) 2025-11-03 18:15 to 2025-11-05 00:45 UTC (31 steps)
(<GeoAxes: title={'center': 'OpenDrift - OpenOil (GENERIC BUNKER C)\n2025-11-03 18:15 to 2025-11-05 00:45 UTC (31 steps)'}>, <Figure size 506.038x1100 with 2 Axes>)

Total running time of the script: (2 minutes 21.880 seconds)

Gallery generated by Sphinx-Gallery