.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/example_oil_thickness.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_oil_thickness.py: Oil film thickness ================================== .. GENERATED FROM PYTHON SOURCE LINES 6-21 .. code-block:: Python from datetime import datetime, timedelta import matplotlib.pyplot as plt import numpy as np from opendrift.models.openoil import OpenOil number = 10000 timestep = timedelta(minutes=10) timestep_output = timedelta(minutes=60) duration = timedelta(hours=20) mass_oil = 2000 # mass oil per particle oil_type = 'GENERIC DIESEL' #oil_type = 'GENERIC BUNKER C' .. GENERATED FROM PYTHON SOURCE LINES 22-23 First run, where surface oil thickness is updated .. GENERATED FROM PYTHON SOURCE LINES 23-24 .. code-block:: Python o1 = OpenOil(loglevel=20, weathering_model='noaa') .. rst-class:: sphx-glr-script-out .. code-block:: none 13:48:03 INFO opendrift:576: OpenDriftSimulation initialised (version 1.14.7 / v1.14.7-15-g2988cd4) .. GENERATED FROM PYTHON SOURCE LINES 25-26 Northwards wind, eastwards current .. GENERATED FROM PYTHON SOURCE LINES 26-33 .. code-block:: Python o1.set_config('environment:fallback:land_binary_mask', 0) o1.set_config('environment:fallback:x_wind', 0) o1.set_config('environment:fallback:y_wind', 7) o1.set_config('environment:fallback:sea_surface_wave_stokes_drift_x_velocity', 0) o1.set_config('environment:fallback:sea_surface_wave_stokes_drift_y_velocity', .3) o1.set_config('environment:fallback:x_sea_water_velocity', .1) o1.set_config('environment:fallback:y_sea_water_velocity', 0) .. GENERATED FROM PYTHON SOURCE LINES 34-35 Using Johansen droplet spectrum, which depends on oil film thickness .. GENERATED FROM PYTHON SOURCE LINES 35-49 .. code-block:: Python o1.set_config('wave_entrainment:droplet_size_distribution', 'Johansen et al. (2015)') o1.set_config('drift:wind_uncertainty', 2) o1.set_config('drift:current_uncertainty', .1) o1.set_config('processes:dispersion', False) o1.set_config('processes:update_oilfilm_thickness', True) o1.seed_elements(lon=4.5, lat=60, number=number, mass_oil=mass_oil, radius=1000, oil_type=oil_type, time=datetime.now()) o1.run(time_step=timestep, time_step_output=timestep_output, duration=duration) .. rst-class:: sphx-glr-script-out .. code-block:: none 13:48:03 INFO opendrift.models.openoil.adios.dirjs:86: Querying ADIOS database for oil: GENERIC DIESEL 13:48:03 INFO opendrift.models.openoil.openoil:1717: Using density 855.84763 and viscosity 8.644570579524623e-06 of oiltype GENERIC DIESEL 13:48:03 INFO opendrift.models.basemodel.environment:203: Adding a global landmask from GSHHG 13:48:08 INFO opendrift.models.basemodel.environment:227: Fallback values will be used for the following variables which have no readers: 13:48:08 INFO opendrift.models.basemodel.environment:230: x_sea_water_velocity: 0.100000 13:48:08 INFO opendrift.models.basemodel.environment:230: y_sea_water_velocity: 0.000000 13:48:08 INFO opendrift.models.basemodel.environment:230: x_wind: 0.000000 13:48:08 INFO opendrift.models.basemodel.environment:230: y_wind: 7.000000 13:48:08 INFO opendrift.models.basemodel.environment:230: sea_surface_height: 0.000000 13:48:08 INFO opendrift.models.basemodel.environment:230: upward_sea_water_velocity: 0.000000 13:48:08 INFO opendrift.models.basemodel.environment:230: sea_surface_wave_significant_height: 0.000000 13:48:08 INFO opendrift.models.basemodel.environment:230: sea_surface_wave_stokes_drift_x_velocity: 0.000000 13:48:08 INFO opendrift.models.basemodel.environment:230: sea_surface_wave_stokes_drift_y_velocity: 0.300000 13:48:08 INFO opendrift.models.basemodel.environment:230: sea_surface_wave_period_at_variance_spectral_density_maximum: 0.000000 13:48:08 INFO opendrift.models.basemodel.environment:230: sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment: 0.000000 13:48:08 INFO opendrift.models.basemodel.environment:230: sea_ice_area_fraction: 0.000000 13:48:08 INFO opendrift.models.basemodel.environment:230: sea_ice_x_velocity: 0.000000 13:48:08 INFO opendrift.models.basemodel.environment:230: sea_ice_y_velocity: 0.000000 13:48:08 INFO opendrift.models.basemodel.environment:230: sea_water_temperature: 10.000000 13:48:08 INFO opendrift.models.basemodel.environment:230: sea_water_salinity: 34.000000 13:48:08 INFO opendrift.models.basemodel.environment:230: sea_floor_depth_below_sea_level: 10000.000000 13:48:08 INFO opendrift.models.basemodel.environment:230: ocean_vertical_diffusivity: 0.020000 13:48:08 INFO opendrift.models.basemodel.environment:230: ocean_mixed_layer_thickness: 50.000000 13:48:08 INFO opendrift:1803: Skipping environment variable upward_sea_water_velocity because of condition ['drift:vertical_advection', 'is', False] 13:48:08 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'])) 13:48:08 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'])) 13:48:08 INFO opendrift:952: Using existing reader for land_binary_mask to move elements to ocean 13:48:08 INFO opendrift:982: All points are in ocean 13:48:08 INFO opendrift.models.openoil.openoil:692: Oil-water surface tension is 0.030314 Nm 13:48:08 INFO opendrift.models.openoil.openoil:705: Max water fraction not available for GENERIC DIESEL, using default 13:48:08 INFO opendrift:2111: 2025-12-16 13:48:03.797141 - step 1 of 120 - 10000 active elements (0 deactivated) 13:48:09 INFO opendrift:2111: 2025-12-16 13:58:03.797141 - step 2 of 120 - 10000 active elements (0 deactivated) 13:48:09 INFO opendrift:2111: 2025-12-16 14:08:03.797141 - step 3 of 120 - 10000 active elements (0 deactivated) 13:48:09 INFO opendrift:2111: 2025-12-16 14:18:03.797141 - step 4 of 120 - 10000 active elements (0 deactivated) 13:48:10 INFO opendrift:2111: 2025-12-16 14:28:03.797141 - step 5 of 120 - 10000 active elements (0 deactivated) 13:48:10 INFO opendrift:2111: 2025-12-16 14:38:03.797141 - step 6 of 120 - 10000 active elements (0 deactivated) 13:48:10 INFO opendrift:2111: 2025-12-16 14:48:03.797141 - step 7 of 120 - 10000 active elements (0 deactivated) 13:48:10 INFO opendrift:2111: 2025-12-16 14:58:03.797141 - step 8 of 120 - 10000 active elements (0 deactivated) 13:48:11 INFO opendrift:2111: 2025-12-16 15:08:03.797141 - step 9 of 120 - 10000 active elements (0 deactivated) 13:48:11 INFO opendrift:2111: 2025-12-16 15:18:03.797141 - step 10 of 120 - 10000 active elements (0 deactivated) 13:48:11 INFO opendrift:2111: 2025-12-16 15:28:03.797141 - step 11 of 120 - 10000 active elements (0 deactivated) 13:48:12 INFO opendrift:2111: 2025-12-16 15:38:03.797141 - step 12 of 120 - 10000 active elements (0 deactivated) 13:48:12 INFO opendrift:2111: 2025-12-16 15:48:03.797141 - step 13 of 120 - 10000 active elements (0 deactivated) 13:48:12 INFO opendrift:2111: 2025-12-16 15:58:03.797141 - step 14 of 120 - 10000 active elements (0 deactivated) 13:48:12 INFO opendrift:2111: 2025-12-16 16:08:03.797141 - step 15 of 120 - 10000 active elements (0 deactivated) 13:48:12 INFO opendrift:2111: 2025-12-16 16:18:03.797141 - step 16 of 120 - 10000 active elements (0 deactivated) 13:48:13 INFO opendrift:2111: 2025-12-16 16:28:03.797141 - step 17 of 120 - 10000 active elements (0 deactivated) 13:48:13 INFO opendrift:2111: 2025-12-16 16:38:03.797141 - step 18 of 120 - 10000 active elements (0 deactivated) 13:48:13 INFO opendrift:2111: 2025-12-16 16:48:03.797141 - step 19 of 120 - 10000 active elements (0 deactivated) 13:48:14 INFO opendrift:2111: 2025-12-16 16:58:03.797141 - step 20 of 120 - 10000 active elements (0 deactivated) 13:48:14 INFO opendrift:2111: 2025-12-16 17:08:03.797141 - step 21 of 120 - 10000 active elements (0 deactivated) 13:48:14 INFO opendrift:2111: 2025-12-16 17:18:03.797141 - step 22 of 120 - 10000 active elements (0 deactivated) 13:48:14 INFO opendrift:2111: 2025-12-16 17:28:03.797141 - step 23 of 120 - 10000 active elements (0 deactivated) 13:48:14 INFO opendrift:2111: 2025-12-16 17:38:03.797141 - step 24 of 120 - 10000 active elements (0 deactivated) 13:48:15 INFO opendrift:2111: 2025-12-16 17:48:03.797141 - step 25 of 120 - 10000 active elements (0 deactivated) 13:48:15 INFO opendrift:2111: 2025-12-16 17:58:03.797141 - step 26 of 120 - 10000 active elements (0 deactivated) 13:48:15 INFO opendrift:2111: 2025-12-16 18:08:03.797141 - step 27 of 120 - 10000 active elements (0 deactivated) 13:48:15 INFO opendrift:2111: 2025-12-16 18:18:03.797141 - step 28 of 120 - 10000 active elements (0 deactivated) 13:48:16 INFO opendrift:2111: 2025-12-16 18:28:03.797141 - step 29 of 120 - 10000 active elements (0 deactivated) 13:48:16 INFO opendrift:2111: 2025-12-16 18:38:03.797141 - step 30 of 120 - 10000 active elements (0 deactivated) 13:48:16 INFO opendrift:2111: 2025-12-16 18:48:03.797141 - step 31 of 120 - 10000 active elements (0 deactivated) 13:48:17 INFO opendrift:2111: 2025-12-16 18:58:03.797141 - step 32 of 120 - 10000 active elements (0 deactivated) 13:48:17 INFO opendrift:2111: 2025-12-16 19:08:03.797141 - step 33 of 120 - 10000 active elements (0 deactivated) 13:48:17 INFO opendrift:2111: 2025-12-16 19:18:03.797141 - step 34 of 120 - 10000 active elements (0 deactivated) 13:48:17 INFO opendrift:2111: 2025-12-16 19:28:03.797141 - step 35 of 120 - 10000 active elements (0 deactivated) 13:48:17 INFO opendrift:2111: 2025-12-16 19:38:03.797141 - step 36 of 120 - 10000 active elements (0 deactivated) 13:48:18 INFO opendrift:2111: 2025-12-16 19:48:03.797141 - step 37 of 120 - 10000 active elements (0 deactivated) 13:48:18 INFO opendrift:2111: 2025-12-16 19:58:03.797141 - step 38 of 120 - 10000 active elements (0 deactivated) 13:48:18 INFO opendrift:2111: 2025-12-16 20:08:03.797141 - step 39 of 120 - 10000 active elements (0 deactivated) 13:48:18 INFO opendrift:2111: 2025-12-16 20:18:03.797141 - step 40 of 120 - 10000 active elements (0 deactivated) 13:48:18 INFO opendrift:2111: 2025-12-16 20:28:03.797141 - step 41 of 120 - 10000 active elements (0 deactivated) 13:48:19 INFO opendrift:2111: 2025-12-16 20:38:03.797141 - step 42 of 120 - 10000 active elements (0 deactivated) 13:48:19 INFO opendrift:2111: 2025-12-16 20:48:03.797141 - step 43 of 120 - 10000 active elements (0 deactivated) 13:48:19 INFO opendrift:2111: 2025-12-16 20:58:03.797141 - step 44 of 120 - 10000 active elements (0 deactivated) 13:48:19 INFO opendrift:2111: 2025-12-16 21:08:03.797141 - step 45 of 120 - 10000 active elements (0 deactivated) 13:48:20 INFO opendrift:2111: 2025-12-16 21:18:03.797141 - step 46 of 120 - 10000 active elements (0 deactivated) 13:48:20 INFO opendrift:2111: 2025-12-16 21:28:03.797141 - step 47 of 120 - 10000 active elements (0 deactivated) 13:48:20 INFO opendrift:2111: 2025-12-16 21:38:03.797141 - step 48 of 120 - 10000 active elements (0 deactivated) 13:48:20 INFO opendrift:2111: 2025-12-16 21:48:03.797141 - step 49 of 120 - 10000 active elements (0 deactivated) 13:48:21 INFO opendrift:2111: 2025-12-16 21:58:03.797141 - step 50 of 120 - 10000 active elements (0 deactivated) 13:48:21 INFO opendrift:2111: 2025-12-16 22:08:03.797141 - step 51 of 120 - 10000 active elements (0 deactivated) 13:48:21 INFO opendrift:2111: 2025-12-16 22:18:03.797141 - step 52 of 120 - 10000 active elements (0 deactivated) 13:48:21 INFO opendrift:2111: 2025-12-16 22:28:03.797141 - step 53 of 120 - 10000 active elements (0 deactivated) 13:48:21 INFO opendrift:2111: 2025-12-16 22:38:03.797141 - step 54 of 120 - 10000 active elements (0 deactivated) 13:48:22 INFO opendrift:2111: 2025-12-16 22:48:03.797141 - step 55 of 120 - 10000 active elements (0 deactivated) 13:48:22 INFO opendrift:2111: 2025-12-16 22:58:03.797141 - step 56 of 120 - 10000 active elements (0 deactivated) 13:48:22 INFO opendrift:2111: 2025-12-16 23:08:03.797141 - step 57 of 120 - 10000 active elements (0 deactivated) 13:48:22 INFO opendrift:2111: 2025-12-16 23:18:03.797141 - step 58 of 120 - 10000 active elements (0 deactivated) 13:48:22 INFO opendrift:2111: 2025-12-16 23:28:03.797141 - step 59 of 120 - 10000 active elements (0 deactivated) 13:48:23 INFO opendrift:2111: 2025-12-16 23:38:03.797141 - step 60 of 120 - 10000 active elements (0 deactivated) 13:48:23 INFO opendrift:2111: 2025-12-16 23:48:03.797141 - step 61 of 120 - 10000 active elements (0 deactivated) 13:48:23 INFO opendrift:2111: 2025-12-16 23:58:03.797141 - step 62 of 120 - 10000 active elements (0 deactivated) 13:48:23 INFO opendrift:2111: 2025-12-17 00:08:03.797141 - step 63 of 120 - 10000 active elements (0 deactivated) 13:48:24 INFO opendrift:2111: 2025-12-17 00:18:03.797141 - step 64 of 120 - 10000 active elements (0 deactivated) 13:48:24 INFO opendrift:2111: 2025-12-17 00:28:03.797141 - step 65 of 120 - 10000 active elements (0 deactivated) 13:48:24 INFO opendrift:2111: 2025-12-17 00:38:03.797141 - step 66 of 120 - 10000 active elements (0 deactivated) 13:48:24 INFO opendrift:2111: 2025-12-17 00:48:03.797141 - step 67 of 120 - 10000 active elements (0 deactivated) 13:48:25 INFO opendrift:2111: 2025-12-17 00:58:03.797141 - step 68 of 120 - 10000 active elements (0 deactivated) 13:48:25 INFO opendrift:2111: 2025-12-17 01:08:03.797141 - step 69 of 120 - 10000 active elements (0 deactivated) 13:48:25 INFO opendrift:2111: 2025-12-17 01:18:03.797141 - step 70 of 120 - 10000 active elements (0 deactivated) 13:48:25 INFO opendrift:2111: 2025-12-17 01:28:03.797141 - step 71 of 120 - 10000 active elements (0 deactivated) 13:48:25 INFO opendrift:2111: 2025-12-17 01:38:03.797141 - step 72 of 120 - 10000 active elements (0 deactivated) 13:48:26 INFO opendrift:2111: 2025-12-17 01:48:03.797141 - step 73 of 120 - 10000 active elements (0 deactivated) 13:48:26 INFO opendrift:2111: 2025-12-17 01:58:03.797141 - step 74 of 120 - 10000 active elements (0 deactivated) 13:48:26 INFO opendrift:2111: 2025-12-17 02:08:03.797141 - step 75 of 120 - 10000 active elements (0 deactivated) 13:48:26 INFO opendrift:2111: 2025-12-17 02:18:03.797141 - step 76 of 120 - 10000 active elements (0 deactivated) 13:48:27 INFO opendrift:2111: 2025-12-17 02:28:03.797141 - step 77 of 120 - 10000 active elements (0 deactivated) 13:48:27 INFO opendrift:2111: 2025-12-17 02:38:03.797141 - step 78 of 120 - 10000 active elements (0 deactivated) 13:48:27 INFO opendrift:2111: 2025-12-17 02:48:03.797141 - step 79 of 120 - 10000 active elements (0 deactivated) 13:48:27 INFO opendrift:2111: 2025-12-17 02:58:03.797141 - step 80 of 120 - 10000 active elements (0 deactivated) 13:48:28 INFO opendrift:2111: 2025-12-17 03:08:03.797141 - step 81 of 120 - 10000 active elements (0 deactivated) 13:48:28 INFO opendrift:2111: 2025-12-17 03:18:03.797141 - step 82 of 120 - 10000 active elements (0 deactivated) 13:48:28 INFO opendrift:2111: 2025-12-17 03:28:03.797141 - step 83 of 120 - 10000 active elements (0 deactivated) 13:48:28 INFO opendrift:2111: 2025-12-17 03:38:03.797141 - step 84 of 120 - 10000 active elements (0 deactivated) 13:48:28 INFO opendrift:2111: 2025-12-17 03:48:03.797141 - step 85 of 120 - 10000 active elements (0 deactivated) 13:48:29 INFO opendrift:2111: 2025-12-17 03:58:03.797141 - step 86 of 120 - 10000 active elements (0 deactivated) 13:48:29 INFO opendrift:2111: 2025-12-17 04:08:03.797141 - step 87 of 120 - 10000 active elements (0 deactivated) 13:48:29 INFO opendrift:2111: 2025-12-17 04:18:03.797141 - step 88 of 120 - 10000 active elements (0 deactivated) 13:48:29 INFO opendrift:2111: 2025-12-17 04:28:03.797141 - step 89 of 120 - 10000 active elements (0 deactivated) 13:48:30 INFO opendrift:2111: 2025-12-17 04:38:03.797141 - step 90 of 120 - 10000 active elements (0 deactivated) 13:48:30 INFO opendrift:2111: 2025-12-17 04:48:03.797141 - step 91 of 120 - 10000 active elements (0 deactivated) 13:48:30 INFO opendrift:2111: 2025-12-17 04:58:03.797141 - step 92 of 120 - 10000 active elements (0 deactivated) 13:48:30 INFO opendrift:2111: 2025-12-17 05:08:03.797141 - step 93 of 120 - 10000 active elements (0 deactivated) 13:48:31 INFO opendrift:2111: 2025-12-17 05:18:03.797141 - step 94 of 120 - 10000 active elements (0 deactivated) 13:48:31 INFO opendrift:2111: 2025-12-17 05:28:03.797141 - step 95 of 120 - 10000 active elements (0 deactivated) 13:48:31 INFO opendrift:2111: 2025-12-17 05:38:03.797141 - step 96 of 120 - 10000 active elements (0 deactivated) 13:48:31 INFO opendrift:2111: 2025-12-17 05:48:03.797141 - step 97 of 120 - 10000 active elements (0 deactivated) 13:48:32 INFO opendrift:2111: 2025-12-17 05:58:03.797141 - step 98 of 120 - 10000 active elements (0 deactivated) 13:48:32 INFO opendrift:2111: 2025-12-17 06:08:03.797141 - step 99 of 120 - 10000 active elements (0 deactivated) 13:48:32 INFO opendrift:2111: 2025-12-17 06:18:03.797141 - step 100 of 120 - 10000 active elements (0 deactivated) 13:48:32 INFO opendrift:2111: 2025-12-17 06:28:03.797141 - step 101 of 120 - 10000 active elements (0 deactivated) 13:48:32 INFO opendrift:2111: 2025-12-17 06:38:03.797141 - step 102 of 120 - 10000 active elements (0 deactivated) 13:48:34 INFO opendrift:2111: 2025-12-17 06:48:03.797141 - step 103 of 120 - 10000 active elements (0 deactivated) 13:48:34 INFO opendrift:2111: 2025-12-17 06:58:03.797141 - step 104 of 120 - 10000 active elements (0 deactivated) 13:48:34 INFO opendrift:2111: 2025-12-17 07:08:03.797141 - step 105 of 120 - 10000 active elements (0 deactivated) 13:48:34 INFO opendrift:2111: 2025-12-17 07:18:03.797141 - step 106 of 120 - 10000 active elements (0 deactivated) 13:48:35 INFO opendrift:2111: 2025-12-17 07:28:03.797141 - step 107 of 120 - 10000 active elements (0 deactivated) 13:48:35 INFO opendrift:2111: 2025-12-17 07:38:03.797141 - step 108 of 120 - 10000 active elements (0 deactivated) 13:48:35 INFO opendrift:2111: 2025-12-17 07:48:03.797141 - step 109 of 120 - 10000 active elements (0 deactivated) 13:48:36 INFO opendrift:2111: 2025-12-17 07:58:03.797141 - step 110 of 120 - 10000 active elements (0 deactivated) 13:48:36 INFO opendrift:2111: 2025-12-17 08:08:03.797141 - step 111 of 120 - 10000 active elements (0 deactivated) 13:48:36 INFO opendrift:2111: 2025-12-17 08:18:03.797141 - step 112 of 120 - 10000 active elements (0 deactivated) 13:48:36 INFO opendrift:2111: 2025-12-17 08:28:03.797141 - step 113 of 120 - 10000 active elements (0 deactivated) 13:48:36 INFO opendrift:2111: 2025-12-17 08:38:03.797141 - step 114 of 120 - 10000 active elements (0 deactivated) 13:48:37 INFO opendrift:2111: 2025-12-17 08:48:03.797141 - step 115 of 120 - 10000 active elements (0 deactivated) 13:48:37 INFO opendrift:2111: 2025-12-17 08:58:03.797141 - step 116 of 120 - 10000 active elements (0 deactivated) 13:48:37 INFO opendrift:2111: 2025-12-17 09:08:03.797141 - step 117 of 120 - 10000 active elements (0 deactivated) 13:48:38 INFO opendrift:2111: 2025-12-17 09:18:03.797141 - step 118 of 120 - 10000 active elements (0 deactivated) 13:48:38 INFO opendrift:2111: 2025-12-17 09:28:03.797141 - step 119 of 120 - 10000 active elements (0 deactivated) 13:48:38 INFO opendrift:2111: 2025-12-17 09:38:03.797141 - step 120 of 120 - 10000 active elements (0 deactivated) .. raw:: html
<xarray.Dataset> Size: 36MB
    Dimensions:                                                                              (
                                                                                              trajectory: 10000,
                                                                                              time: 21)
    Coordinates:
      * trajectory                                                                           (trajectory) int64 80kB ...
      * time                                                                                 (time) datetime64[ns] 168B ...
    Data variables: (12/43)
        status                                                                               (trajectory, time) float32 840kB ...
        moving                                                                               (trajectory, time) float32 840kB ...
        age_seconds                                                                          (trajectory, time) float32 840kB ...
        origin_marker                                                                        (trajectory, time) float32 840kB ...
        lon                                                                                  (trajectory, time) float32 840kB ...
        lat                                                                                  (trajectory, time) float32 840kB ...
        ...                                                                                   ...
        sea_water_temperature                                                                (trajectory, time) float32 840kB ...
        sea_water_salinity                                                                   (trajectory, time) float32 840kB ...
        sea_floor_depth_below_sea_level                                                      (trajectory, time) float32 840kB ...
        ocean_vertical_diffusivity                                                           (trajectory, time) float32 840kB ...
        land_binary_mask                                                                     (trajectory, time) float32 840kB ...
        ocean_mixed_layer_thickness                                                          (trajectory, time) float32 840kB ...
    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:                                            ...


.. GENERATED FROM PYTHON SOURCE LINES 50-52 Animation shows how oil thickness evolves, and decreases due to evaporation and spreading .. GENERATED FROM PYTHON SOURCE LINES 52-57 .. code-block:: Python unitfactor=1e6 # show film thickness in micrometers o1.animation(color='oil_film_thickness', fast=True, vmin=1e-7*unitfactor, vmax=1e-4*unitfactor, unitfactor=unitfactor, surface_only=True) .. rst-class:: sphx-glr-script-out .. code-block:: none 13:48:38 WARNING opendrift:2473: Plotting fast. This will make your plots less accurate. 13:48:40 INFO opendrift:4660: Saving animation to /root/project/docs/source/gallery/animations/example_oil_thickness_0.gif... 13:48:57 INFO opendrift:3094: Time to make animation: 0:00:18.173395 .. GENERATED FROM PYTHON SOURCE LINES 58-59 .. image:: /gallery/animations/example_oil_thickness_0.gif .. GENERATED FROM PYTHON SOURCE LINES 61-62 Second run, identical but without updating surface oil thickness .. GENERATED FROM PYTHON SOURCE LINES 62-85 .. code-block:: Python o2 = OpenOil(loglevel=20, weathering_model='noaa') o2.set_config('environment:fallback:land_binary_mask', 0) o2.set_config('environment:fallback:x_wind', 0) o2.set_config('environment:fallback:y_wind', 7) o2.set_config('environment:fallback:sea_surface_wave_stokes_drift_x_velocity', 0) o2.set_config('environment:fallback:sea_surface_wave_stokes_drift_y_velocity', .3) o2.set_config('environment:fallback:x_sea_water_velocity', .1) o2.set_config('environment:fallback:y_sea_water_velocity', 0) o2.set_config('wave_entrainment:droplet_size_distribution', 'Johansen et al. (2015)') o2.set_config('drift:wind_uncertainty', 2) o2.set_config('drift:current_uncertainty', .1) o2.set_config('processes:dispersion', False) o2.set_config('processes:update_oilfilm_thickness', False) o2.seed_elements(lon=4.5, lat=60, number=number, mass_oil=mass_oil, radius=1000, oil_type=oil_type, time=datetime.now()) o2.run(time_step=timestep, time_step_output=timestep_output, duration=duration) .. rst-class:: sphx-glr-script-out .. code-block:: none 13:48:57 INFO opendrift:576: OpenDriftSimulation initialised (version 1.14.7 / v1.14.7-15-g2988cd4) 13:48:57 INFO opendrift.models.openoil.adios.dirjs:86: Querying ADIOS database for oil: GENERIC DIESEL 13:48:57 INFO opendrift.models.openoil.openoil:1717: Using density 855.84763 and viscosity 8.644570579524623e-06 of oiltype GENERIC DIESEL 13:48:57 INFO opendrift.models.basemodel.environment:203: Adding a global landmask from GSHHG 13:48:57 INFO opendrift.models.basemodel.environment:227: Fallback values will be used for the following variables which have no readers: 13:48:57 INFO opendrift.models.basemodel.environment:230: x_sea_water_velocity: 0.100000 13:48:57 INFO opendrift.models.basemodel.environment:230: y_sea_water_velocity: 0.000000 13:48:57 INFO opendrift.models.basemodel.environment:230: x_wind: 0.000000 13:48:57 INFO opendrift.models.basemodel.environment:230: y_wind: 7.000000 13:48:57 INFO opendrift.models.basemodel.environment:230: sea_surface_height: 0.000000 13:48:57 INFO opendrift.models.basemodel.environment:230: upward_sea_water_velocity: 0.000000 13:48:57 INFO opendrift.models.basemodel.environment:230: sea_surface_wave_significant_height: 0.000000 13:48:57 INFO opendrift.models.basemodel.environment:230: sea_surface_wave_stokes_drift_x_velocity: 0.000000 13:48:57 INFO opendrift.models.basemodel.environment:230: sea_surface_wave_stokes_drift_y_velocity: 0.300000 13:48:57 INFO opendrift.models.basemodel.environment:230: sea_surface_wave_period_at_variance_spectral_density_maximum: 0.000000 13:48:57 INFO opendrift.models.basemodel.environment:230: sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment: 0.000000 13:48:57 INFO opendrift.models.basemodel.environment:230: sea_ice_area_fraction: 0.000000 13:48:57 INFO opendrift.models.basemodel.environment:230: sea_ice_x_velocity: 0.000000 13:48:57 INFO opendrift.models.basemodel.environment:230: sea_ice_y_velocity: 0.000000 13:48:57 INFO opendrift.models.basemodel.environment:230: sea_water_temperature: 10.000000 13:48:57 INFO opendrift.models.basemodel.environment:230: sea_water_salinity: 34.000000 13:48:57 INFO opendrift.models.basemodel.environment:230: sea_floor_depth_below_sea_level: 10000.000000 13:48:57 INFO opendrift.models.basemodel.environment:230: ocean_vertical_diffusivity: 0.020000 13:48:57 INFO opendrift.models.basemodel.environment:230: ocean_mixed_layer_thickness: 50.000000 13:48:57 INFO opendrift:1803: Skipping environment variable upward_sea_water_velocity because of condition ['drift:vertical_advection', 'is', False] 13:48:57 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'])) 13:48:57 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'])) 13:48:57 INFO opendrift:952: Using existing reader for land_binary_mask to move elements to ocean 13:48:57 INFO opendrift:982: All points are in ocean 13:48:57 INFO opendrift.models.openoil.openoil:692: Oil-water surface tension is 0.030314 Nm 13:48:57 INFO opendrift.models.openoil.openoil:705: Max water fraction not available for GENERIC DIESEL, using default 13:48:57 INFO opendrift:2111: 2025-12-16 13:48:57.208907 - step 1 of 120 - 10000 active elements (0 deactivated) 13:48:57 INFO opendrift:2111: 2025-12-16 13:58:57.208907 - step 2 of 120 - 10000 active elements (0 deactivated) 13:48:57 INFO opendrift:2111: 2025-12-16 14:08:57.208907 - step 3 of 120 - 10000 active elements (0 deactivated) 13:48:58 INFO opendrift:2111: 2025-12-16 14:18:57.208907 - step 4 of 120 - 10000 active elements (0 deactivated) 13:48:58 INFO opendrift:2111: 2025-12-16 14:28:57.208907 - step 5 of 120 - 10000 active elements (0 deactivated) 13:48:58 INFO opendrift:2111: 2025-12-16 14:38:57.208907 - step 6 of 120 - 10000 active elements (0 deactivated) 13:48:59 INFO opendrift:2111: 2025-12-16 14:48:57.208907 - step 7 of 120 - 10000 active elements (0 deactivated) 13:48:59 INFO opendrift:2111: 2025-12-16 14:58:57.208907 - step 8 of 120 - 10000 active elements (0 deactivated) 13:48:59 INFO opendrift:2111: 2025-12-16 15:08:57.208907 - step 9 of 120 - 10000 active elements (0 deactivated) 13:48:59 INFO opendrift:2111: 2025-12-16 15:18:57.208907 - step 10 of 120 - 10000 active elements (0 deactivated) 13:49:00 INFO opendrift:2111: 2025-12-16 15:28:57.208907 - step 11 of 120 - 10000 active elements (0 deactivated) 13:49:00 INFO opendrift:2111: 2025-12-16 15:38:57.208907 - step 12 of 120 - 10000 active elements (0 deactivated) 13:49:00 INFO opendrift:2111: 2025-12-16 15:48:57.208907 - step 13 of 120 - 10000 active elements (0 deactivated) 13:49:00 INFO opendrift:2111: 2025-12-16 15:58:57.208907 - step 14 of 120 - 10000 active elements (0 deactivated) 13:49:00 INFO opendrift:2111: 2025-12-16 16:08:57.208907 - step 15 of 120 - 10000 active elements (0 deactivated) 13:49:01 INFO opendrift:2111: 2025-12-16 16:18:57.208907 - step 16 of 120 - 10000 active elements (0 deactivated) 13:49:01 INFO opendrift:2111: 2025-12-16 16:28:57.208907 - step 17 of 120 - 10000 active elements (0 deactivated) 13:49:01 INFO opendrift:2111: 2025-12-16 16:38:57.208907 - step 18 of 120 - 10000 active elements (0 deactivated) 13:49:01 INFO opendrift:2111: 2025-12-16 16:48:57.208907 - step 19 of 120 - 10000 active elements (0 deactivated) 13:49:02 INFO opendrift:2111: 2025-12-16 16:58:57.208907 - step 20 of 120 - 10000 active elements (0 deactivated) 13:49:02 INFO opendrift:2111: 2025-12-16 17:08:57.208907 - step 21 of 120 - 10000 active elements (0 deactivated) 13:49:02 INFO opendrift:2111: 2025-12-16 17:18:57.208907 - step 22 of 120 - 10000 active elements (0 deactivated) 13:49:02 INFO opendrift:2111: 2025-12-16 17:28:57.208907 - step 23 of 120 - 10000 active elements (0 deactivated) 13:49:02 INFO opendrift:2111: 2025-12-16 17:38:57.208907 - step 24 of 120 - 10000 active elements (0 deactivated) 13:49:03 INFO opendrift:2111: 2025-12-16 17:48:57.208907 - step 25 of 120 - 10000 active elements (0 deactivated) 13:49:03 INFO opendrift:2111: 2025-12-16 17:58:57.208907 - step 26 of 120 - 10000 active elements (0 deactivated) 13:49:03 INFO opendrift:2111: 2025-12-16 18:08:57.208907 - step 27 of 120 - 10000 active elements (0 deactivated) 13:49:03 INFO opendrift:2111: 2025-12-16 18:18:57.208907 - step 28 of 120 - 10000 active elements (0 deactivated) 13:49:03 INFO opendrift:2111: 2025-12-16 18:28:57.208907 - step 29 of 120 - 10000 active elements (0 deactivated) 13:49:04 INFO opendrift:2111: 2025-12-16 18:38:57.208907 - step 30 of 120 - 10000 active elements (0 deactivated) 13:49:04 INFO opendrift:2111: 2025-12-16 18:48:57.208907 - step 31 of 120 - 10000 active elements (0 deactivated) 13:49:04 INFO opendrift:2111: 2025-12-16 18:58:57.208907 - step 32 of 120 - 10000 active elements (0 deactivated) 13:49:04 INFO opendrift:2111: 2025-12-16 19:08:57.208907 - step 33 of 120 - 10000 active elements (0 deactivated) 13:49:04 INFO opendrift:2111: 2025-12-16 19:18:57.208907 - step 34 of 120 - 10000 active elements (0 deactivated) 13:49:05 INFO opendrift:2111: 2025-12-16 19:28:57.208907 - step 35 of 120 - 10000 active elements (0 deactivated) 13:49:05 INFO opendrift:2111: 2025-12-16 19:38:57.208907 - step 36 of 120 - 10000 active elements (0 deactivated) 13:49:05 INFO opendrift:2111: 2025-12-16 19:48:57.208907 - step 37 of 120 - 10000 active elements (0 deactivated) 13:49:05 INFO opendrift:2111: 2025-12-16 19:58:57.208907 - step 38 of 120 - 10000 active elements (0 deactivated) 13:49:05 INFO opendrift:2111: 2025-12-16 20:08:57.208907 - step 39 of 120 - 10000 active elements (0 deactivated) 13:49:06 INFO opendrift:2111: 2025-12-16 20:18:57.208907 - step 40 of 120 - 10000 active elements (0 deactivated) 13:49:06 INFO opendrift:2111: 2025-12-16 20:28:57.208907 - step 41 of 120 - 10000 active elements (0 deactivated) 13:49:06 INFO opendrift:2111: 2025-12-16 20:38:57.208907 - step 42 of 120 - 10000 active elements (0 deactivated) 13:49:06 INFO opendrift:2111: 2025-12-16 20:48:57.208907 - step 43 of 120 - 10000 active elements (0 deactivated) 13:49:06 INFO opendrift:2111: 2025-12-16 20:58:57.208907 - step 44 of 120 - 10000 active elements (0 deactivated) 13:49:07 INFO opendrift:2111: 2025-12-16 21:08:57.208907 - step 45 of 120 - 10000 active elements (0 deactivated) 13:49:07 INFO opendrift:2111: 2025-12-16 21:18:57.208907 - step 46 of 120 - 10000 active elements (0 deactivated) 13:49:07 INFO opendrift:2111: 2025-12-16 21:28:57.208907 - step 47 of 120 - 10000 active elements (0 deactivated) 13:49:07 INFO opendrift:2111: 2025-12-16 21:38:57.208907 - step 48 of 120 - 10000 active elements (0 deactivated) 13:49:07 INFO opendrift:2111: 2025-12-16 21:48:57.208907 - step 49 of 120 - 10000 active elements (0 deactivated) 13:49:08 INFO opendrift:2111: 2025-12-16 21:58:57.208907 - step 50 of 120 - 10000 active elements (0 deactivated) 13:49:08 INFO opendrift:2111: 2025-12-16 22:08:57.208907 - step 51 of 120 - 10000 active elements (0 deactivated) 13:49:08 INFO opendrift:2111: 2025-12-16 22:18:57.208907 - step 52 of 120 - 10000 active elements (0 deactivated) 13:49:08 INFO opendrift:2111: 2025-12-16 22:28:57.208907 - step 53 of 120 - 10000 active elements (0 deactivated) 13:49:08 INFO opendrift:2111: 2025-12-16 22:38:57.208907 - step 54 of 120 - 10000 active elements (0 deactivated) 13:49:09 INFO opendrift:2111: 2025-12-16 22:48:57.208907 - step 55 of 120 - 10000 active elements (0 deactivated) 13:49:09 INFO opendrift:2111: 2025-12-16 22:58:57.208907 - step 56 of 120 - 10000 active elements (0 deactivated) 13:49:09 INFO opendrift:2111: 2025-12-16 23:08:57.208907 - step 57 of 120 - 10000 active elements (0 deactivated) 13:49:09 INFO opendrift:2111: 2025-12-16 23:18:57.208907 - step 58 of 120 - 10000 active elements (0 deactivated) 13:49:09 INFO opendrift:2111: 2025-12-16 23:28:57.208907 - step 59 of 120 - 10000 active elements (0 deactivated) 13:49:10 INFO opendrift:2111: 2025-12-16 23:38:57.208907 - step 60 of 120 - 10000 active elements (0 deactivated) 13:49:10 INFO opendrift:2111: 2025-12-16 23:48:57.208907 - step 61 of 120 - 10000 active elements (0 deactivated) 13:49:10 INFO opendrift:2111: 2025-12-16 23:58:57.208907 - step 62 of 120 - 10000 active elements (0 deactivated) 13:49:10 INFO opendrift:2111: 2025-12-17 00:08:57.208907 - step 63 of 120 - 10000 active elements (0 deactivated) 13:49:10 INFO opendrift:2111: 2025-12-17 00:18:57.208907 - step 64 of 120 - 10000 active elements (0 deactivated) 13:49:11 INFO opendrift:2111: 2025-12-17 00:28:57.208907 - step 65 of 120 - 10000 active elements (0 deactivated) 13:49:11 INFO opendrift:2111: 2025-12-17 00:38:57.208907 - step 66 of 120 - 10000 active elements (0 deactivated) 13:49:11 INFO opendrift:2111: 2025-12-17 00:48:57.208907 - step 67 of 120 - 10000 active elements (0 deactivated) 13:49:11 INFO opendrift:2111: 2025-12-17 00:58:57.208907 - step 68 of 120 - 10000 active elements (0 deactivated) 13:49:12 INFO opendrift:2111: 2025-12-17 01:08:57.208907 - step 69 of 120 - 10000 active elements (0 deactivated) 13:49:12 INFO opendrift:2111: 2025-12-17 01:18:57.208907 - step 70 of 120 - 10000 active elements (0 deactivated) 13:49:12 INFO opendrift:2111: 2025-12-17 01:28:57.208907 - step 71 of 120 - 10000 active elements (0 deactivated) 13:49:12 INFO opendrift:2111: 2025-12-17 01:38:57.208907 - step 72 of 120 - 10000 active elements (0 deactivated) 13:49:12 INFO opendrift:2111: 2025-12-17 01:48:57.208907 - step 73 of 120 - 10000 active elements (0 deactivated) 13:49:12 INFO opendrift:2111: 2025-12-17 01:58:57.208907 - step 74 of 120 - 10000 active elements (0 deactivated) 13:49:13 INFO opendrift:2111: 2025-12-17 02:08:57.208907 - step 75 of 120 - 10000 active elements (0 deactivated) 13:49:13 INFO opendrift:2111: 2025-12-17 02:18:57.208907 - step 76 of 120 - 10000 active elements (0 deactivated) 13:49:13 INFO opendrift:2111: 2025-12-17 02:28:57.208907 - step 77 of 120 - 10000 active elements (0 deactivated) 13:49:13 INFO opendrift:2111: 2025-12-17 02:38:57.208907 - step 78 of 120 - 10000 active elements (0 deactivated) 13:49:13 INFO opendrift:2111: 2025-12-17 02:48:57.208907 - step 79 of 120 - 10000 active elements (0 deactivated) 13:49:14 INFO opendrift:2111: 2025-12-17 02:58:57.208907 - step 80 of 120 - 10000 active elements (0 deactivated) 13:49:14 INFO opendrift:2111: 2025-12-17 03:08:57.208907 - step 81 of 120 - 10000 active elements (0 deactivated) 13:49:14 INFO opendrift:2111: 2025-12-17 03:18:57.208907 - step 82 of 120 - 10000 active elements (0 deactivated) 13:49:14 INFO opendrift:2111: 2025-12-17 03:28:57.208907 - step 83 of 120 - 10000 active elements (0 deactivated) 13:49:14 INFO opendrift:2111: 2025-12-17 03:38:57.208907 - step 84 of 120 - 10000 active elements (0 deactivated) 13:49:15 INFO opendrift:2111: 2025-12-17 03:48:57.208907 - step 85 of 120 - 10000 active elements (0 deactivated) 13:49:15 INFO opendrift:2111: 2025-12-17 03:58:57.208907 - step 86 of 120 - 10000 active elements (0 deactivated) 13:49:15 INFO opendrift:2111: 2025-12-17 04:08:57.208907 - step 87 of 120 - 10000 active elements (0 deactivated) 13:49:15 INFO opendrift:2111: 2025-12-17 04:18:57.208907 - step 88 of 120 - 10000 active elements (0 deactivated) 13:49:15 INFO opendrift:2111: 2025-12-17 04:28:57.208907 - step 89 of 120 - 10000 active elements (0 deactivated) 13:49:16 INFO opendrift:2111: 2025-12-17 04:38:57.208907 - step 90 of 120 - 10000 active elements (0 deactivated) 13:49:16 INFO opendrift:2111: 2025-12-17 04:48:57.208907 - step 91 of 120 - 10000 active elements (0 deactivated) 13:49:16 INFO opendrift:2111: 2025-12-17 04:58:57.208907 - step 92 of 120 - 10000 active elements (0 deactivated) 13:49:16 INFO opendrift:2111: 2025-12-17 05:08:57.208907 - step 93 of 120 - 10000 active elements (0 deactivated) 13:49:17 INFO opendrift:2111: 2025-12-17 05:18:57.208907 - step 94 of 120 - 10000 active elements (0 deactivated) 13:49:17 INFO opendrift:2111: 2025-12-17 05:28:57.208907 - step 95 of 120 - 10000 active elements (0 deactivated) 13:49:17 INFO opendrift:2111: 2025-12-17 05:38:57.208907 - step 96 of 120 - 10000 active elements (0 deactivated) 13:49:17 INFO opendrift:2111: 2025-12-17 05:48:57.208907 - step 97 of 120 - 10000 active elements (0 deactivated) 13:49:17 INFO opendrift:2111: 2025-12-17 05:58:57.208907 - step 98 of 120 - 10000 active elements (0 deactivated) 13:49:18 INFO opendrift:2111: 2025-12-17 06:08:57.208907 - step 99 of 120 - 10000 active elements (0 deactivated) 13:49:18 INFO opendrift:2111: 2025-12-17 06:18:57.208907 - step 100 of 120 - 10000 active elements (0 deactivated) 13:49:18 INFO opendrift:2111: 2025-12-17 06:28:57.208907 - step 101 of 120 - 10000 active elements (0 deactivated) 13:49:18 INFO opendrift:2111: 2025-12-17 06:38:57.208907 - step 102 of 120 - 10000 active elements (0 deactivated) 13:49:18 INFO opendrift:2111: 2025-12-17 06:48:57.208907 - step 103 of 120 - 10000 active elements (0 deactivated) 13:49:19 INFO opendrift:2111: 2025-12-17 06:58:57.208907 - step 104 of 120 - 10000 active elements (0 deactivated) 13:49:19 INFO opendrift:2111: 2025-12-17 07:08:57.208907 - step 105 of 120 - 10000 active elements (0 deactivated) 13:49:19 INFO opendrift:2111: 2025-12-17 07:18:57.208907 - step 106 of 120 - 10000 active elements (0 deactivated) 13:49:19 INFO opendrift:2111: 2025-12-17 07:28:57.208907 - step 107 of 120 - 10000 active elements (0 deactivated) 13:49:19 INFO opendrift:2111: 2025-12-17 07:38:57.208907 - step 108 of 120 - 10000 active elements (0 deactivated) 13:49:20 INFO opendrift:2111: 2025-12-17 07:48:57.208907 - step 109 of 120 - 10000 active elements (0 deactivated) 13:49:20 INFO opendrift:2111: 2025-12-17 07:58:57.208907 - step 110 of 120 - 10000 active elements (0 deactivated) 13:49:20 INFO opendrift:2111: 2025-12-17 08:08:57.208907 - step 111 of 120 - 10000 active elements (0 deactivated) 13:49:20 INFO opendrift:2111: 2025-12-17 08:18:57.208907 - step 112 of 120 - 10000 active elements (0 deactivated) 13:49:20 INFO opendrift:2111: 2025-12-17 08:28:57.208907 - step 113 of 120 - 10000 active elements (0 deactivated) 13:49:21 INFO opendrift:2111: 2025-12-17 08:38:57.208907 - step 114 of 120 - 10000 active elements (0 deactivated) 13:49:21 INFO opendrift:2111: 2025-12-17 08:48:57.208907 - step 115 of 120 - 10000 active elements (0 deactivated) 13:49:21 INFO opendrift:2111: 2025-12-17 08:58:57.208907 - step 116 of 120 - 10000 active elements (0 deactivated) 13:49:21 INFO opendrift:2111: 2025-12-17 09:08:57.208907 - step 117 of 120 - 10000 active elements (0 deactivated) 13:49:22 INFO opendrift:2111: 2025-12-17 09:18:57.208907 - step 118 of 120 - 10000 active elements (0 deactivated) 13:49:22 INFO opendrift:2111: 2025-12-17 09:28:57.208907 - step 119 of 120 - 10000 active elements (0 deactivated) 13:49:22 INFO opendrift:2111: 2025-12-17 09:38:57.208907 - step 120 of 120 - 10000 active elements (0 deactivated) .. raw:: html
<xarray.Dataset> Size: 36MB
    Dimensions:                                                                              (
                                                                                              trajectory: 10000,
                                                                                              time: 21)
    Coordinates:
      * trajectory                                                                           (trajectory) int64 80kB ...
      * time                                                                                 (time) datetime64[ns] 168B ...
    Data variables: (12/43)
        status                                                                               (trajectory, time) float32 840kB ...
        moving                                                                               (trajectory, time) float32 840kB ...
        age_seconds                                                                          (trajectory, time) float32 840kB ...
        origin_marker                                                                        (trajectory, time) float32 840kB ...
        lon                                                                                  (trajectory, time) float32 840kB ...
        lat                                                                                  (trajectory, time) float32 840kB ...
        ...                                                                                   ...
        sea_water_temperature                                                                (trajectory, time) float32 840kB ...
        sea_water_salinity                                                                   (trajectory, time) float32 840kB ...
        sea_floor_depth_below_sea_level                                                      (trajectory, time) float32 840kB ...
        ocean_vertical_diffusivity                                                           (trajectory, time) float32 840kB ...
        land_binary_mask                                                                     (trajectory, time) float32 840kB ...
        ocean_mixed_layer_thickness                                                          (trajectory, time) float32 840kB ...
    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:                                            ...


.. GENERATED FROM PYTHON SOURCE LINES 86-87 Comparison plots .. GENERATED FROM PYTHON SOURCE LINES 87-90 .. code-block:: Python o1.plot_oil_budget() o2.plot_oil_budget() .. rst-class:: sphx-glr-horizontal * .. image-sg:: /gallery/images/sphx_glr_example_oil_thickness_001.png :alt: GENERIC DIESEL (855.8 kg/m3) - 2025-12-16 13:48 to 2025-12-17 09:48 :srcset: /gallery/images/sphx_glr_example_oil_thickness_001.png :class: sphx-glr-multi-img * .. image-sg:: /gallery/images/sphx_glr_example_oil_thickness_002.png :alt: GENERIC DIESEL (855.8 kg/m3) - 2025-12-16 13:48 to 2025-12-17 09:48 :srcset: /gallery/images/sphx_glr_example_oil_thickness_002.png :class: sphx-glr-multi-img .. GENERATED FROM PYTHON SOURCE LINES 91-92 Entrainment .. GENERATED FROM PYTHON SOURCE LINES 92-110 .. code-block:: Python b1 = o1.get_oil_budget() b2 = o2.get_oil_budget() plt.plot(b1['mass_surface'], '-r', linewidth=2, label='Surface, updated thickness') plt.plot(b1['mass_submerged'], '--r', linewidth=2, label='Submerged, updated thickness') plt.plot(b1['mass_evaporated'], '-.r', linewidth=2, label='Evaporated, updated thickness') plt.plot(b2['mass_surface'], '-b', linewidth=2, label='Surface, constant thickness') plt.plot(b2['mass_submerged'], '--b', linewidth=2, label='Submerged, constant thickness') plt.plot(b2['mass_evaporated'], '-.b', linewidth=2, label='Evaporated, constant thickness') plt.legend() plt.xlabel('Time step') plt.show() .. image-sg:: /gallery/images/sphx_glr_example_oil_thickness_003.png :alt: example oil thickness :srcset: /gallery/images/sphx_glr_example_oil_thickness_003.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 111-113 We see that with the updated film thickness, the droplets are getting gradually smaller .. GENERATED FROM PYTHON SOURCE LINES 113-120 .. code-block:: Python plt.plot(1e6*o1.result.diameter.median(dim='trajectory')) plt.plot(1e6*o2.result.diameter.median(dim='trajectory')) plt.legend(['With updated film thickness', 'With constant film thickness']) plt.xlabel('Time step') plt.ylabel('Median droplet diameter [micrometer]') plt.show() .. image-sg:: /gallery/images/sphx_glr_example_oil_thickness_004.png :alt: example oil thickness :srcset: /gallery/images/sphx_glr_example_oil_thickness_004.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 121-122 We see that oil film thickness has virtually no impact on horizontal drift .. GENERATED FROM PYTHON SOURCE LINES 122-126 .. code-block:: Python o1.animation(compare=o2, fast=True, legend=['Updated film thickness', 'Constant/default film thickness']) .. rst-class:: sphx-glr-script-out .. code-block:: none 13:49:24 WARNING opendrift:2473: Plotting fast. This will make your plots less accurate. 13:49:25 INFO opendrift:4660: Saving animation to /root/project/docs/source/gallery/animations/example_oil_thickness_1.gif... 13:49:43 INFO opendrift:3094: Time to make animation: 0:00:18.691674 .. GENERATED FROM PYTHON SOURCE LINES 127-128 .. image:: /gallery/animations/example_oil_thickness_1.gif .. rst-class:: sphx-glr-timing **Total running time of the script:** (1 minutes 48.483 seconds) .. _sphx_glr_download_gallery_example_oil_thickness.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: example_oil_thickness.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: example_oil_thickness.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: example_oil_thickness.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_