.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/example_cone.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_example_cone.py: Cone seeding ===================== .. GENERATED FROM PYTHON SOURCE LINES 6-13 .. code-block:: Python from datetime import datetime, timedelta from opendrift.readers import reader_netCDF_CF_generic from opendrift.models.openoil import OpenOil o = OpenOil(loglevel=20) # Set loglevel to 0 for debug information .. rst-class:: sphx-glr-script-out .. code-block:: none 14:11:34 INFO opendrift:568: OpenDriftSimulation initialised (version 1.14.9 / v1.14.9-43-g22dbf7d) .. GENERATED FROM PYTHON SOURCE LINES 14-15 Using live data from Thredds .. GENERATED FROM PYTHON SOURCE LINES 15-18 .. code-block:: Python o.add_readers_from_list([ 'https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be']) .. GENERATED FROM PYTHON SOURCE LINES 19-20 Adjusting some configuration .. GENERATED FROM PYTHON SOURCE LINES 20-24 .. code-block:: Python o.set_config('processes:dispersion', True) o.set_config('processes:evaporation', False) o.set_config('processes:emulsification', True) .. GENERATED FROM PYTHON SOURCE LINES 25-27 Seed elements along cone, e.g. ship track with increasing uncertainty in position .. GENERATED FROM PYTHON SOURCE LINES 27-37 .. code-block:: Python latstart = 68.988911 lonstart = 16.040701 latend = 69.991446 lonend = 17.760061 time = [datetime.utcnow(), datetime.utcnow() + timedelta(hours=12)] o.seed_cone(lon=[lonstart, lonend], lat=[latstart, latend], oil_type='EKOFISK', radius=[100, 800], number=10000, time=[time]) print(o) .. rst-class:: sphx-glr-script-out .. code-block:: none /root/project/examples/example_cone.py:31: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC). time = [datetime.utcnow(), datetime.utcnow() + timedelta(hours=12)] 14:11:34 INFO opendrift.models.basemodel.environment:203: Adding a global landmask from GSHHG 14:11:39 INFO opendrift.models.basemodel.environment:227: Fallback values will be used for the following variables which have no readers: 14:11:39 INFO opendrift.models.basemodel.environment:230: sea_surface_height: 0.000000 14:11:39 INFO opendrift.models.basemodel.environment:230: upward_sea_water_velocity: 0.000000 14:11:39 INFO opendrift.models.basemodel.environment:230: sea_surface_wave_significant_height: 0.000000 14:11:39 INFO opendrift.models.basemodel.environment:230: sea_surface_wave_stokes_drift_x_velocity: 0.000000 14:11:39 INFO opendrift.models.basemodel.environment:230: sea_surface_wave_stokes_drift_y_velocity: 0.000000 14:11:39 INFO opendrift.models.basemodel.environment:230: sea_surface_wave_period_at_variance_spectral_density_maximum: 0.000000 14:11:39 INFO opendrift.models.basemodel.environment:230: sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment: 0.000000 14:11:39 INFO opendrift.models.basemodel.environment:230: sea_ice_area_fraction: 0.000000 14:11:39 INFO opendrift.models.basemodel.environment:230: sea_ice_x_velocity: 0.000000 14:11:39 INFO opendrift.models.basemodel.environment:230: sea_ice_y_velocity: 0.000000 14:11:39 INFO opendrift.models.basemodel.environment:230: sea_water_temperature: 10.000000 14:11:39 INFO opendrift.models.basemodel.environment:230: sea_water_salinity: 34.000000 14:11:39 INFO opendrift.models.basemodel.environment:230: sea_floor_depth_below_sea_level: 10000.000000 14:11:39 INFO opendrift.models.basemodel.environment:230: horizontal_diffusivity: 0.000000 14:11:39 INFO opendrift.models.basemodel.environment:230: ocean_vertical_diffusivity: 0.020000 14:11:39 INFO opendrift.models.basemodel.environment:230: ocean_mixed_layer_thickness: 50.000000 14:11:39 INFO opendrift.models.openoil.adios.dirjs:86: Querying ADIOS database for oil: EKOFISK 14:11:39 WARNING opendrift.models.openoil.adios.dirjs:90: Several oils found with name: EKOFISK: ['AD00328', 'AD00329', 'AD00332', 'AD00333', 'AD01944', 'AD02094', 'AD02463', 'AD02558', 'NO00013', 'NO00014', 'NO00015', 'NO00016'], using first. 14:11:39 INFO opendrift.models.openoil.openoil:1731: Using density 809.002835 and viscosity 3.3498550728972226e-06 of oiltype EKOFISK =========================== Model: OpenOil (OpenDrift version 1.14.9) 0 active Oil particles (0 deactivated, 10000 scheduled) ------------------- Environment variables: ----- land_binary_mask 1) global_landmask ----- Readers not added for the following variables: horizontal_diffusivity ocean_mixed_layer_thickness 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_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 sea_water_salinity sea_water_temperature upward_sea_water_velocity x_sea_water_velocity x_wind y_sea_water_velocity y_wind --- Lazy readers: LazyReader: https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be Discarded readers: =========================== .. GENERATED FROM PYTHON SOURCE LINES 38-39 Running model for 24 hours .. GENERATED FROM PYTHON SOURCE LINES 39-41 .. code-block:: Python o.run(steps=24*2, time_step=1800, time_step_output=3600) .. rst-class:: sphx-glr-script-out .. code-block:: none 14:11:39 INFO opendrift:1894: Skipping environment variable upward_sea_water_velocity because of condition ['drift:vertical_advection', 'is', False] 14:11:39 INFO opendrift:1905: Storing previous values of element property lon because of condition (('general:coastline_action', 'in', ['stranding', 'previous']), 'or', ('general:seafloor_action', 'in', ['previous'])) 14:11:39 INFO opendrift:1905: Storing previous values of element property lat because of condition (('general:coastline_action', 'in', ['stranding', 'previous']), 'or', ('general:seafloor_action', 'in', ['previous'])) 14:11:39 INFO opendrift:947: Using existing reader for land_binary_mask to move elements to ocean 14:11:39 INFO opendrift:978: All points are in ocean 14:11:39 INFO opendrift.models.openoil.openoil:697: Oil-water surface tension is 0.027884 Nm 14:11:39 INFO opendrift.models.openoil.openoil:710: Max water fraction not available for EKOFISK, using default 14:11:39 INFO opendrift:2202: 2026-04-21 14:11:34.983345 - step 1 of 48 - 417 active elements (0 deactivated) 14:11:39 INFO opendrift.readers:64: Opening file with xr.open_dataset 14:11:43 INFO opendrift.readers.reader_netCDF_CF_generic:340: Detected dimensions: {'x': 'X', 'y': 'Y', 'z': 'depth', 'time': 'time'} 14:11:43 INFO opendrift.readers.basereader:178: Variable x_sea_water_velocity will be rotated from eastward_sea_water_velocity 14:11:43 INFO opendrift.readers.basereader:178: Variable y_sea_water_velocity will be rotated from northward_sea_water_velocity 14:11:43 INFO opendrift.readers.basereader:178: Variable x_wind will be rotated from eastward_wind 14:11:43 INFO opendrift.readers.basereader:178: Variable y_wind will be rotated from northward_wind 14:11:46 INFO opendrift:2202: 2026-04-21 14:41:34.983345 - step 2 of 48 - 834 active elements (0 deactivated) 14:11:46 INFO opendrift:2202: 2026-04-21 15:11:34.983345 - step 3 of 48 - 1250 active elements (0 deactivated) 14:11:48 WARNING opendrift.readers.basereader.structured:324: Data block from https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`. 14:11:48 INFO opendrift:2202: 2026-04-21 15:41:34.983345 - step 4 of 48 - 1667 active elements (0 deactivated) 14:11:48 WARNING opendrift.readers.basereader.structured:324: Data block from https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`. 14:11:48 INFO opendrift:2202: 2026-04-21 16:11:34.983345 - step 5 of 48 - 2084 active elements (0 deactivated) 14:11:50 WARNING opendrift.readers.basereader.structured:324: Data block from https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`. 14:11:50 INFO opendrift:2202: 2026-04-21 16:41:34.983345 - step 6 of 48 - 2500 active elements (0 deactivated) 14:11:50 WARNING opendrift.readers.basereader.structured:324: Data block from https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`. 14:11:50 INFO opendrift:2202: 2026-04-21 17:11:34.983345 - step 7 of 48 - 2917 active elements (0 deactivated) 14:11:52 WARNING opendrift.readers.basereader.structured:324: Data block from https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`. 14:11:52 INFO opendrift:2202: 2026-04-21 17:41:34.983345 - step 8 of 48 - 3334 active elements (0 deactivated) 14:11:52 WARNING opendrift.readers.basereader.structured:324: Data block from https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`. 14:11:52 INFO opendrift:2202: 2026-04-21 18:11:34.983345 - step 9 of 48 - 3750 active elements (0 deactivated) 14:11:54 WARNING opendrift.readers.basereader.structured:324: Data block from https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`. 14:11:54 INFO opendrift:2202: 2026-04-21 18:41:34.983345 - step 10 of 48 - 4167 active elements (0 deactivated) 14:11:54 WARNING opendrift.readers.basereader.structured:324: Data block from https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`. 14:11:55 INFO opendrift:2202: 2026-04-21 19:11:34.983345 - step 11 of 48 - 4583 active elements (0 deactivated) 14:11:57 WARNING opendrift.readers.basereader.structured:324: Data block from https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`. 14:11:57 INFO opendrift:2202: 2026-04-21 19:41:34.983345 - step 12 of 48 - 5000 active elements (0 deactivated) 14:11:57 WARNING opendrift.readers.basereader.structured:324: Data block from https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`. 14:11:57 INFO opendrift:2202: 2026-04-21 20:11:34.983345 - step 13 of 48 - 5417 active elements (0 deactivated) 14:11:59 WARNING opendrift.readers.basereader.structured:324: Data block from https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`. 14:11:59 INFO opendrift:2202: 2026-04-21 20:41:34.983345 - step 14 of 48 - 5833 active elements (0 deactivated) 14:11:59 WARNING opendrift.readers.basereader.structured:324: Data block from https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`. 14:12:00 INFO opendrift:2202: 2026-04-21 21:11:34.983345 - step 15 of 48 - 6250 active elements (0 deactivated) 14:12:02 WARNING opendrift.readers.basereader.variables:656: Invalid values (1.2276344 to 1.891377) found for ocean_vertical_diffusivity, replacing with NaN 14:12:02 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1]) 14:12:02 WARNING opendrift.readers.basereader.structured:324: Data block from https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`. 14:12:02 INFO opendrift:2202: 2026-04-21 21:41:34.983345 - step 16 of 48 - 6667 active elements (0 deactivated) 14:12:02 WARNING opendrift.readers.basereader.structured:324: Data block from https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`. 14:12:02 INFO opendrift:2202: 2026-04-21 22:11:34.983345 - step 17 of 48 - 7083 active elements (0 deactivated) 14:12:05 WARNING opendrift.readers.basereader.variables:656: Invalid values (1.0054145 to 4.348076) found for ocean_vertical_diffusivity, replacing with NaN 14:12:05 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1]) 14:12:05 WARNING opendrift.readers.basereader.structured:324: Data block from https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`. 14:12:05 INFO opendrift:2202: 2026-04-21 22:41:34.983345 - step 18 of 48 - 7500 active elements (0 deactivated) 14:12:05 WARNING opendrift.readers.basereader.structured:324: Data block from https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`. 14:12:05 INFO opendrift:2202: 2026-04-21 23:11:34.983345 - step 19 of 48 - 7916 active elements (0 deactivated) 14:12:08 WARNING opendrift.readers.basereader.variables:656: Invalid values (1.0010883 to 4.4902453) found for ocean_vertical_diffusivity, replacing with NaN 14:12:08 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1]) 14:12:08 WARNING opendrift.readers.basereader.structured:324: Data block from https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`. 14:12:09 INFO opendrift:2202: 2026-04-21 23:41:34.983345 - step 20 of 48 - 8333 active elements (0 deactivated) 14:12:09 WARNING opendrift.readers.basereader.structured:324: Data block from https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`. 14:12:09 INFO opendrift:2202: 2026-04-22 00:11:34.983345 - step 21 of 48 - 8750 active elements (0 deactivated) 14:12:11 WARNING opendrift.readers.basereader.variables:656: Invalid values (1.0048816 to 4.8375344) found for ocean_vertical_diffusivity, replacing with NaN 14:12:11 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1]) 14:12:11 WARNING opendrift.readers.basereader.structured:324: Data block from https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`. 14:12:12 INFO opendrift:2202: 2026-04-22 00:41:34.983345 - step 22 of 48 - 9166 active elements (0 deactivated) 14:12:12 WARNING opendrift.readers.basereader.structured:324: Data block from https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`. 14:12:12 INFO opendrift:2202: 2026-04-22 01:11:34.983345 - step 23 of 48 - 9583 active elements (0 deactivated) 14:12:15 WARNING opendrift.readers.basereader.variables:656: Invalid values (1.0024091 to 4.9663577) found for ocean_vertical_diffusivity, replacing with NaN 14:12:15 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1]) 14:12:15 WARNING opendrift.readers.basereader.structured:324: Data block from https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`. 14:12:15 INFO opendrift:2202: 2026-04-22 01:41:34.983345 - step 24 of 48 - 10000 active elements (0 deactivated) 14:12:15 WARNING opendrift.readers.basereader.structured:324: Data block from https://thredds.met.no/thredds/dodsC/fou-hi/norkystv3_800m_m00_be not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`. 14:12:15 INFO opendrift:2202: 2026-04-22 02:11:34.983345 - step 25 of 48 - 10000 active elements (0 deactivated) 14:12:19 WARNING opendrift.readers.basereader.variables:656: Invalid values (1.0357416 to 3.6619706) found for ocean_vertical_diffusivity, replacing with NaN 14:12:19 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1]) 14:12:20 INFO opendrift:2202: 2026-04-22 02:41:34.983345 - step 26 of 48 - 9999 active elements (1 deactivated) 14:12:20 INFO opendrift:2202: 2026-04-22 03:11:34.983345 - step 27 of 48 - 9999 active elements (1 deactivated) 14:12:22 WARNING opendrift.readers.basereader.variables:656: Invalid values (1.0383663 to 2.7993119) found for ocean_vertical_diffusivity, replacing with NaN 14:12:22 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1]) 14:12:23 INFO opendrift:2202: 2026-04-22 03:41:34.983345 - step 28 of 48 - 9999 active elements (1 deactivated) 14:12:23 INFO opendrift:2202: 2026-04-22 04:11:34.983345 - step 29 of 48 - 9999 active elements (1 deactivated) 14:12:25 WARNING opendrift.readers.basereader.variables:656: Invalid values (1.0053824 to 1.819308) found for ocean_vertical_diffusivity, replacing with NaN 14:12:25 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1]) 14:12:26 INFO opendrift:2202: 2026-04-22 04:41:34.983345 - step 30 of 48 - 9999 active elements (1 deactivated) 14:12:28 INFO opendrift:2202: 2026-04-22 05:11:34.983345 - step 31 of 48 - 9998 active elements (2 deactivated) 14:12:31 INFO opendrift:2202: 2026-04-22 05:41:34.983345 - step 32 of 48 - 9996 active elements (4 deactivated) 14:12:31 INFO opendrift:2202: 2026-04-22 06:11:34.983345 - step 33 of 48 - 9994 active elements (6 deactivated) 14:12:34 INFO opendrift:2202: 2026-04-22 06:41:34.983345 - step 34 of 48 - 9988 active elements (12 deactivated) 14:12:35 INFO opendrift:2202: 2026-04-22 07:11:34.983345 - step 35 of 48 - 9983 active elements (17 deactivated) 14:12:38 WARNING opendrift.readers.basereader.variables:656: Invalid values (1.0275645 to 1.617379) found for ocean_vertical_diffusivity, replacing with NaN 14:12:38 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1]) 14:12:38 INFO opendrift:2202: 2026-04-22 07:41:34.983345 - step 36 of 48 - 9976 active elements (24 deactivated) 14:12:39 INFO opendrift:2202: 2026-04-22 08:11:34.983345 - step 37 of 48 - 9971 active elements (29 deactivated) 14:12:41 WARNING opendrift.readers.basereader.variables:656: Invalid values (1.000332 to 2.1569529) found for ocean_vertical_diffusivity, replacing with NaN 14:12:41 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1]) 14:12:41 INFO opendrift:2202: 2026-04-22 08:41:34.983345 - step 38 of 48 - 9967 active elements (33 deactivated) 14:12:42 INFO opendrift:2202: 2026-04-22 09:11:34.983345 - step 39 of 48 - 9959 active elements (41 deactivated) 14:12:44 WARNING opendrift.readers.basereader.variables:656: Invalid values (1.0002112 to 2.6406155) found for ocean_vertical_diffusivity, replacing with NaN 14:12:44 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1]) 14:12:44 INFO opendrift:2202: 2026-04-22 09:41:34.983345 - step 40 of 48 - 9952 active elements (48 deactivated) 14:12:45 INFO opendrift:2202: 2026-04-22 10:11:34.983345 - step 41 of 48 - 9946 active elements (54 deactivated) 14:12:48 WARNING opendrift.readers.basereader.variables:656: Invalid values (1.0149927 to 3.3423388) found for ocean_vertical_diffusivity, replacing with NaN 14:12:48 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1]) 14:12:48 INFO opendrift:2202: 2026-04-22 10:41:34.983345 - step 42 of 48 - 9938 active elements (62 deactivated) 14:12:48 INFO opendrift:2202: 2026-04-22 11:11:34.983345 - step 43 of 48 - 9928 active elements (72 deactivated) 14:12:51 WARNING opendrift.readers.basereader.variables:656: Invalid values (1.0005492 to 3.247237) found for ocean_vertical_diffusivity, replacing with NaN 14:12:51 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1]) 14:12:51 INFO opendrift:2202: 2026-04-22 11:41:34.983345 - step 44 of 48 - 9916 active elements (84 deactivated) 14:12:52 INFO opendrift:2202: 2026-04-22 12:11:34.983345 - step 45 of 48 - 9909 active elements (91 deactivated) 14:12:54 WARNING opendrift.readers.basereader.variables:656: Invalid values (1.0247489 to 3.6775112) found for ocean_vertical_diffusivity, replacing with NaN 14:12:54 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1]) 14:12:54 INFO opendrift:2202: 2026-04-22 12:41:34.983345 - step 46 of 48 - 9904 active elements (96 deactivated) 14:12:55 INFO opendrift:2202: 2026-04-22 13:11:34.983345 - step 47 of 48 - 9890 active elements (110 deactivated) 14:12:57 WARNING opendrift.readers.basereader.variables:656: Invalid values (1.026576 to 3.2557485) found for ocean_vertical_diffusivity, replacing with NaN 14:12:57 WARNING opendrift.readers.basereader.variables:659: (allowed range: [0, 1]) 14:12:57 INFO opendrift:2202: 2026-04-22 13:41:34.983345 - step 48 of 48 - 9878 active elements (122 deactivated) .. raw:: html
<xarray.Dataset> Size: 44MB
    Dimensions:                                                                              (
                                                                                              trajectory: 10000,
                                                                                              time: 25)
    Coordinates:
      * trajectory                                                                           (trajectory) int64 80kB ...
      * time                                                                                 (time) datetime64[ns] 200B ...
    Data variables: (12/44)
        status                                                                               (trajectory, time) float32 1MB ...
        moving                                                                               (trajectory, time) float32 1MB ...
        age_seconds                                                                          (trajectory, time) float32 1MB ...
        origin_marker                                                                        (trajectory, time) float32 1MB ...
        lon                                                                                  (trajectory, time) float32 1MB ...
        lat                                                                                  (trajectory, time) float32 1MB ...
        ...                                                                                   ...
        sea_water_salinity                                                                   (trajectory, time) float32 1MB ...
        sea_floor_depth_below_sea_level                                                      (trajectory, time) float32 1MB ...
        horizontal_diffusivity                                                               (trajectory, time) float32 1MB ...
        ocean_vertical_diffusivity                                                           (trajectory, time) float32 1MB ...
        land_binary_mask                                                                     (trajectory, time) float32 1MB ...
        ocean_mixed_layer_thickness                                                          (trajectory, time) float32 1MB ...
    Attributes: (12/167)
        Conventions:                                                             ...
        standard_name_vocabulary:                                                ...
        featureType:                                                             ...
        title:                                                                   ...
        summary:                                                                 ...
        keywords:                                                                ...
        ...                                                                                                               ...
        geospatial_lon_units:                                                    ...
        geospatial_lon_resolution:                                               ...
        runtime:                                                                 ...
        geospatial_vertical_min:                                                 ...
        geospatial_vertical_max:                                                 ...
        geospatial_vertical_positive:                                            ...


.. GENERATED FROM PYTHON SOURCE LINES 42-43 Print and plot results .. GENERATED FROM PYTHON SOURCE LINES 43-45 .. code-block:: Python print(o) .. rst-class:: sphx-glr-script-out .. code-block:: none =========================== -------------------- 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/norkystv3_800m_m00_be 0:01:02.3 total 0:00:00.0 preparing 0:01:01.1 reading 0:00:05.5 interpolation 0:00:00.1 interpolation_time 0:00:01.1 rotating vectors 0:00:00.0 masking -------------------- Performance: 1:23.3 total time 4.2 configuration 0.0 preparing main loop 0.0 moving elements to ocean 1:19.0 main loop 6.4 updating elements 0.0 oil weathering 0.0 updating viscosities 0.0 updating densities 0.0 emulsification 0.0 dispersion 5.7 vertical mixing 0.0 cleaning up -------------------- =========================== Model: OpenOil (OpenDrift version 1.14.9) 9856 active Oil particles (144 deactivated, 0 scheduled) ------------------- Environment variables: ----- land_binary_mask 1) global_landmask ----- ocean_vertical_diffusivity sea_floor_depth_below_sea_level 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/norkystv3_800m_m00_be ----- Readers not added for the following variables: horizontal_diffusivity ocean_mixed_layer_thickness sea_ice_area_fraction sea_ice_x_velocity sea_ice_y_velocity 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: 2026-04-21 14:11:34.983345 UTC Present: 2026-04-22 14:11:34.983345 UTC Calculation steps: 48 * 0:30:00 - total time: 1 day, 0:00:00 Output steps: 25 * 1:00:00 =========================== .. GENERATED FROM PYTHON SOURCE LINES 46-47 Add text label on the map .. GENERATED FROM PYTHON SOURCE LINES 47-52 .. code-block:: Python text = [{'s': 'Senja', 'x': 17.3, 'y': 69.3, 'fontsize': 20, 'color': 'g', 'backgroundcolor': 'white', 'bbox': dict(facecolor='white', alpha=0.8), 'zorder': 1000}] o.animation(fast=False, ocean_color='skyblue', land_color='burlywood', text=text) .. rst-class:: sphx-glr-script-out .. code-block:: none 14:13:09 INFO opendrift:4768: Saving animation to /root/project/docs/source/gallery/animations/example_cone_0.gif... 14:13:25 INFO opendrift:3191: Time to make animation: 0:00:27.279253 .. GENERATED FROM PYTHON SOURCE LINES 53-54 .. image:: /gallery/animations/example_cone_0.gif .. GENERATED FROM PYTHON SOURCE LINES 54-56 .. code-block:: Python o.plot(fast=True, ocean_color='skyblue', land_color='dimgray', text=text) .. image-sg:: /gallery/images/sphx_glr_example_cone_001.png :alt: OpenDrift - OpenOil (EKOFISK) 2026-04-21 14:11 to 2026-04-22 14:11 UTC (25 steps) :srcset: /gallery/images/sphx_glr_example_cone_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none 14:13:25 WARNING opendrift:2565: Plotting fast. This will make your plots less accurate. (,
) .. rst-class:: sphx-glr-timing **Total running time of the script:** (2 minutes 17.146 seconds) .. _sphx_glr_download_gallery_example_cone.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: example_cone.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: example_cone.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: example_cone.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_