Note
Go to the end to download the full example code.
Oil film thickness
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'
First run, where surface oil thickness is updated
o1 = OpenOil(loglevel=20, weathering_model='noaa')
09:39:22 INFO opendrift.models.basemodel:515: OpenDriftSimulation initialised (version 1.11.13 / v1.11.13-48-g5bea84b)
Northwards wind, eastwards current
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)
Using Johansen droplet spectrum, which depends on oil film thickness
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.utcnow())
o1.run(time_step=timestep, time_step_output=timestep_output,
duration=duration)
09:39:22 INFO opendrift.models.openoil.adios.dirjs:90: Querying ADIOS database for oil: GENERIC DIESEL
09:39:22 INFO opendrift.models.openoil.openoil:1719: Using density 841.2 and viscosity 6.3404392151148136e-06 of oiltype GENERIC DIESEL
09:39:22 INFO opendrift.models.basemodel.environment:218: Adding a dynamical landmask with max. priority based on assumed maximum speed of 1.3 m/s. Adding a customised landmask may be faster...
09:39:28 INFO opendrift.models.basemodel.environment:245: Fallback values will be used for the following variables which have no readers:
09:39:28 INFO opendrift.models.basemodel.environment:248: x_sea_water_velocity: 0.100000
09:39:28 INFO opendrift.models.basemodel.environment:248: y_sea_water_velocity: 0.000000
09:39:28 INFO opendrift.models.basemodel.environment:248: x_wind: 0.000000
09:39:28 INFO opendrift.models.basemodel.environment:248: y_wind: 7.000000
09:39:28 INFO opendrift.models.basemodel.environment:248: sea_surface_height: 0.000000
09:39:28 INFO opendrift.models.basemodel.environment:248: upward_sea_water_velocity: 0.000000
09:39:28 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_significant_height: 0.000000
09:39:28 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_stokes_drift_x_velocity: 0.000000
09:39:28 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_stokes_drift_y_velocity: 0.300000
09:39:28 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_period_at_variance_spectral_density_maximum: 0.000000
09:39:28 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment: 0.000000
09:39:28 INFO opendrift.models.basemodel.environment:248: sea_ice_area_fraction: 0.000000
09:39:28 INFO opendrift.models.basemodel.environment:248: sea_ice_x_velocity: 0.000000
09:39:28 INFO opendrift.models.basemodel.environment:248: sea_ice_y_velocity: 0.000000
09:39:28 INFO opendrift.models.basemodel.environment:248: sea_water_temperature: 10.000000
09:39:28 INFO opendrift.models.basemodel.environment:248: sea_water_salinity: 34.000000
09:39:28 INFO opendrift.models.basemodel.environment:248: sea_floor_depth_below_sea_level: 10000.000000
09:39:28 INFO opendrift.models.basemodel.environment:248: ocean_vertical_diffusivity: 0.020000
09:39:28 INFO opendrift.models.basemodel.environment:248: ocean_mixed_layer_thickness: 50.000000
09:39:28 INFO opendrift.models.basemodel:936: Using existing reader for land_binary_mask
09:39:28 INFO opendrift.models.basemodel:947: All points are in ocean
09:39:28 INFO opendrift.models.openoil.openoil:687: Oil-water surface tension is 0.029464 Nm
09:39:28 INFO opendrift.models.openoil.openoil:700: Max water fraction not available for GENERIC DIESEL, using default
09:39:28 INFO opendrift.models.basemodel:2038: 2024-10-01 09:39:22.733190 - step 1 of 120 - 10000 active elements (0 deactivated)
09:39:29 INFO opendrift.models.basemodel:2038: 2024-10-01 09:49:22.733190 - step 2 of 120 - 10000 active elements (0 deactivated)
09:39:29 INFO opendrift.models.basemodel:2038: 2024-10-01 09:59:22.733190 - step 3 of 120 - 10000 active elements (0 deactivated)
09:39:29 INFO opendrift.models.basemodel:2038: 2024-10-01 10:09:22.733190 - step 4 of 120 - 10000 active elements (0 deactivated)
09:39:29 INFO opendrift.models.basemodel:2038: 2024-10-01 10:19:22.733190 - step 5 of 120 - 10000 active elements (0 deactivated)
09:39:29 INFO opendrift.models.basemodel:2038: 2024-10-01 10:29:22.733190 - step 6 of 120 - 10000 active elements (0 deactivated)
09:39:30 INFO opendrift.models.basemodel:2038: 2024-10-01 10:39:22.733190 - step 7 of 120 - 10000 active elements (0 deactivated)
09:39:30 INFO opendrift.models.basemodel:2038: 2024-10-01 10:49:22.733190 - step 8 of 120 - 10000 active elements (0 deactivated)
09:39:30 INFO opendrift.models.basemodel:2038: 2024-10-01 10:59:22.733190 - step 9 of 120 - 10000 active elements (0 deactivated)
09:39:30 INFO opendrift.models.basemodel:2038: 2024-10-01 11:09:22.733190 - step 10 of 120 - 10000 active elements (0 deactivated)
09:39:30 INFO opendrift.models.basemodel:2038: 2024-10-01 11:19:22.733190 - step 11 of 120 - 10000 active elements (0 deactivated)
09:39:30 INFO opendrift.models.basemodel:2038: 2024-10-01 11:29:22.733190 - step 12 of 120 - 10000 active elements (0 deactivated)
09:39:31 INFO opendrift.models.basemodel:2038: 2024-10-01 11:39:22.733190 - step 13 of 120 - 10000 active elements (0 deactivated)
09:39:31 INFO opendrift.models.basemodel:2038: 2024-10-01 11:49:22.733190 - step 14 of 120 - 10000 active elements (0 deactivated)
09:39:31 INFO opendrift.models.basemodel:2038: 2024-10-01 11:59:22.733190 - step 15 of 120 - 10000 active elements (0 deactivated)
09:39:31 INFO opendrift.models.basemodel:2038: 2024-10-01 12:09:22.733190 - step 16 of 120 - 10000 active elements (0 deactivated)
09:39:31 INFO opendrift.models.basemodel:2038: 2024-10-01 12:19:22.733190 - step 17 of 120 - 10000 active elements (0 deactivated)
09:39:31 INFO opendrift.models.basemodel:2038: 2024-10-01 12:29:22.733190 - step 18 of 120 - 10000 active elements (0 deactivated)
09:39:31 INFO opendrift.models.basemodel:2038: 2024-10-01 12:39:22.733190 - step 19 of 120 - 10000 active elements (0 deactivated)
09:39:32 INFO opendrift.models.basemodel:2038: 2024-10-01 12:49:22.733190 - step 20 of 120 - 10000 active elements (0 deactivated)
09:39:32 INFO opendrift.models.basemodel:2038: 2024-10-01 12:59:22.733190 - step 21 of 120 - 10000 active elements (0 deactivated)
09:39:32 INFO opendrift.models.basemodel:2038: 2024-10-01 13:09:22.733190 - step 22 of 120 - 10000 active elements (0 deactivated)
09:39:32 INFO opendrift.models.basemodel:2038: 2024-10-01 13:19:22.733190 - step 23 of 120 - 10000 active elements (0 deactivated)
09:39:32 INFO opendrift.models.basemodel:2038: 2024-10-01 13:29:22.733190 - step 24 of 120 - 10000 active elements (0 deactivated)
09:39:32 INFO opendrift.models.basemodel:2038: 2024-10-01 13:39:22.733190 - step 25 of 120 - 10000 active elements (0 deactivated)
09:39:32 INFO opendrift.models.basemodel:2038: 2024-10-01 13:49:22.733190 - step 26 of 120 - 10000 active elements (0 deactivated)
09:39:32 INFO opendrift.models.basemodel:2038: 2024-10-01 13:59:22.733190 - step 27 of 120 - 10000 active elements (0 deactivated)
09:39:33 INFO opendrift.models.basemodel:2038: 2024-10-01 14:09:22.733190 - step 28 of 120 - 10000 active elements (0 deactivated)
09:39:33 INFO opendrift.models.basemodel:2038: 2024-10-01 14:19:22.733190 - step 29 of 120 - 10000 active elements (0 deactivated)
09:39:33 INFO opendrift.models.basemodel:2038: 2024-10-01 14:29:22.733190 - step 30 of 120 - 10000 active elements (0 deactivated)
09:39:33 INFO opendrift.models.basemodel:2038: 2024-10-01 14:39:22.733190 - step 31 of 120 - 10000 active elements (0 deactivated)
09:39:33 INFO opendrift.models.basemodel:2038: 2024-10-01 14:49:22.733190 - step 32 of 120 - 10000 active elements (0 deactivated)
09:39:33 INFO opendrift.models.basemodel:2038: 2024-10-01 14:59:22.733190 - step 33 of 120 - 10000 active elements (0 deactivated)
09:39:33 INFO opendrift.models.basemodel:2038: 2024-10-01 15:09:22.733190 - step 34 of 120 - 10000 active elements (0 deactivated)
09:39:33 INFO opendrift.models.basemodel:2038: 2024-10-01 15:19:22.733190 - step 35 of 120 - 10000 active elements (0 deactivated)
09:39:34 INFO opendrift.models.basemodel:2038: 2024-10-01 15:29:22.733190 - step 36 of 120 - 10000 active elements (0 deactivated)
09:39:34 INFO opendrift.models.basemodel:2038: 2024-10-01 15:39:22.733190 - step 37 of 120 - 10000 active elements (0 deactivated)
09:39:34 INFO opendrift.models.basemodel:2038: 2024-10-01 15:49:22.733190 - step 38 of 120 - 10000 active elements (0 deactivated)
09:39:34 INFO opendrift.models.basemodel:2038: 2024-10-01 15:59:22.733190 - step 39 of 120 - 10000 active elements (0 deactivated)
09:39:34 INFO opendrift.models.basemodel:2038: 2024-10-01 16:09:22.733190 - step 40 of 120 - 10000 active elements (0 deactivated)
09:39:34 INFO opendrift.models.basemodel:2038: 2024-10-01 16:19:22.733190 - step 41 of 120 - 10000 active elements (0 deactivated)
09:39:34 INFO opendrift.models.basemodel:2038: 2024-10-01 16:29:22.733190 - step 42 of 120 - 10000 active elements (0 deactivated)
09:39:34 INFO opendrift.models.basemodel:2038: 2024-10-01 16:39:22.733190 - step 43 of 120 - 10000 active elements (0 deactivated)
09:39:35 INFO opendrift.models.basemodel:2038: 2024-10-01 16:49:22.733190 - step 44 of 120 - 10000 active elements (0 deactivated)
09:39:35 INFO opendrift.models.basemodel:2038: 2024-10-01 16:59:22.733190 - step 45 of 120 - 10000 active elements (0 deactivated)
09:39:35 INFO opendrift.models.basemodel:2038: 2024-10-01 17:09:22.733190 - step 46 of 120 - 10000 active elements (0 deactivated)
09:39:35 INFO opendrift.models.basemodel:2038: 2024-10-01 17:19:22.733190 - step 47 of 120 - 10000 active elements (0 deactivated)
09:39:35 INFO opendrift.models.basemodel:2038: 2024-10-01 17:29:22.733190 - step 48 of 120 - 10000 active elements (0 deactivated)
09:39:35 INFO opendrift.models.basemodel:2038: 2024-10-01 17:39:22.733190 - step 49 of 120 - 10000 active elements (0 deactivated)
09:39:35 INFO opendrift.models.basemodel:2038: 2024-10-01 17:49:22.733190 - step 50 of 120 - 10000 active elements (0 deactivated)
09:39:36 INFO opendrift.models.basemodel:2038: 2024-10-01 17:59:22.733190 - step 51 of 120 - 10000 active elements (0 deactivated)
09:39:36 INFO opendrift.models.basemodel:2038: 2024-10-01 18:09:22.733190 - step 52 of 120 - 10000 active elements (0 deactivated)
09:39:36 INFO opendrift.models.basemodel:2038: 2024-10-01 18:19:22.733190 - step 53 of 120 - 10000 active elements (0 deactivated)
09:39:36 INFO opendrift.models.basemodel:2038: 2024-10-01 18:29:22.733190 - step 54 of 120 - 10000 active elements (0 deactivated)
09:39:36 INFO opendrift.models.basemodel:2038: 2024-10-01 18:39:22.733190 - step 55 of 120 - 10000 active elements (0 deactivated)
09:39:36 INFO opendrift.models.basemodel:2038: 2024-10-01 18:49:22.733190 - step 56 of 120 - 10000 active elements (0 deactivated)
09:39:36 INFO opendrift.models.basemodel:2038: 2024-10-01 18:59:22.733190 - step 57 of 120 - 10000 active elements (0 deactivated)
09:39:36 INFO opendrift.models.basemodel:2038: 2024-10-01 19:09:22.733190 - step 58 of 120 - 10000 active elements (0 deactivated)
09:39:37 INFO opendrift.models.basemodel:2038: 2024-10-01 19:19:22.733190 - step 59 of 120 - 10000 active elements (0 deactivated)
09:39:37 INFO opendrift.models.basemodel:2038: 2024-10-01 19:29:22.733190 - step 60 of 120 - 10000 active elements (0 deactivated)
09:39:37 INFO opendrift.models.basemodel:2038: 2024-10-01 19:39:22.733190 - step 61 of 120 - 10000 active elements (0 deactivated)
09:39:37 INFO opendrift.models.basemodel:2038: 2024-10-01 19:49:22.733190 - step 62 of 120 - 10000 active elements (0 deactivated)
09:39:37 INFO opendrift.models.basemodel:2038: 2024-10-01 19:59:22.733190 - step 63 of 120 - 10000 active elements (0 deactivated)
09:39:37 INFO opendrift.models.basemodel:2038: 2024-10-01 20:09:22.733190 - step 64 of 120 - 10000 active elements (0 deactivated)
09:39:37 INFO opendrift.models.basemodel:2038: 2024-10-01 20:19:22.733190 - step 65 of 120 - 10000 active elements (0 deactivated)
09:39:37 INFO opendrift.models.basemodel:2038: 2024-10-01 20:29:22.733190 - step 66 of 120 - 10000 active elements (0 deactivated)
09:39:38 INFO opendrift.models.basemodel:2038: 2024-10-01 20:39:22.733190 - step 67 of 120 - 10000 active elements (0 deactivated)
09:39:38 INFO opendrift.models.basemodel:2038: 2024-10-01 20:49:22.733190 - step 68 of 120 - 10000 active elements (0 deactivated)
09:39:38 INFO opendrift.models.basemodel:2038: 2024-10-01 20:59:22.733190 - step 69 of 120 - 10000 active elements (0 deactivated)
09:39:38 INFO opendrift.models.basemodel:2038: 2024-10-01 21:09:22.733190 - step 70 of 120 - 10000 active elements (0 deactivated)
09:39:38 INFO opendrift.models.basemodel:2038: 2024-10-01 21:19:22.733190 - step 71 of 120 - 10000 active elements (0 deactivated)
09:39:38 INFO opendrift.models.basemodel:2038: 2024-10-01 21:29:22.733190 - step 72 of 120 - 10000 active elements (0 deactivated)
09:39:38 INFO opendrift.models.basemodel:2038: 2024-10-01 21:39:22.733190 - step 73 of 120 - 10000 active elements (0 deactivated)
09:39:39 INFO opendrift.models.basemodel:2038: 2024-10-01 21:49:22.733190 - step 74 of 120 - 10000 active elements (0 deactivated)
09:39:39 INFO opendrift.models.basemodel:2038: 2024-10-01 21:59:22.733190 - step 75 of 120 - 10000 active elements (0 deactivated)
09:39:39 INFO opendrift.models.basemodel:2038: 2024-10-01 22:09:22.733190 - step 76 of 120 - 10000 active elements (0 deactivated)
09:39:39 INFO opendrift.models.basemodel:2038: 2024-10-01 22:19:22.733190 - step 77 of 120 - 10000 active elements (0 deactivated)
09:39:39 INFO opendrift.models.basemodel:2038: 2024-10-01 22:29:22.733190 - step 78 of 120 - 10000 active elements (0 deactivated)
09:39:39 INFO opendrift.models.basemodel:2038: 2024-10-01 22:39:22.733190 - step 79 of 120 - 10000 active elements (0 deactivated)
09:39:39 INFO opendrift.models.basemodel:2038: 2024-10-01 22:49:22.733190 - step 80 of 120 - 10000 active elements (0 deactivated)
09:39:39 INFO opendrift.models.basemodel:2038: 2024-10-01 22:59:22.733190 - step 81 of 120 - 10000 active elements (0 deactivated)
09:39:40 INFO opendrift.models.basemodel:2038: 2024-10-01 23:09:22.733190 - step 82 of 120 - 10000 active elements (0 deactivated)
09:39:40 INFO opendrift.models.basemodel:2038: 2024-10-01 23:19:22.733190 - step 83 of 120 - 10000 active elements (0 deactivated)
09:39:40 INFO opendrift.models.basemodel:2038: 2024-10-01 23:29:22.733190 - step 84 of 120 - 10000 active elements (0 deactivated)
09:39:40 INFO opendrift.models.basemodel:2038: 2024-10-01 23:39:22.733190 - step 85 of 120 - 10000 active elements (0 deactivated)
09:39:40 INFO opendrift.models.basemodel:2038: 2024-10-01 23:49:22.733190 - step 86 of 120 - 10000 active elements (0 deactivated)
09:39:40 INFO opendrift.models.basemodel:2038: 2024-10-01 23:59:22.733190 - step 87 of 120 - 10000 active elements (0 deactivated)
09:39:40 INFO opendrift.models.basemodel:2038: 2024-10-02 00:09:22.733190 - step 88 of 120 - 10000 active elements (0 deactivated)
09:39:40 INFO opendrift.models.basemodel:2038: 2024-10-02 00:19:22.733190 - step 89 of 120 - 10000 active elements (0 deactivated)
09:39:41 INFO opendrift.models.basemodel:2038: 2024-10-02 00:29:22.733190 - step 90 of 120 - 10000 active elements (0 deactivated)
09:39:41 INFO opendrift.models.basemodel:2038: 2024-10-02 00:39:22.733190 - step 91 of 120 - 10000 active elements (0 deactivated)
09:39:41 INFO opendrift.models.basemodel:2038: 2024-10-02 00:49:22.733190 - step 92 of 120 - 10000 active elements (0 deactivated)
09:39:41 INFO opendrift.models.basemodel:2038: 2024-10-02 00:59:22.733190 - step 93 of 120 - 10000 active elements (0 deactivated)
09:39:41 INFO opendrift.models.basemodel:2038: 2024-10-02 01:09:22.733190 - step 94 of 120 - 10000 active elements (0 deactivated)
09:39:41 INFO opendrift.models.basemodel:2038: 2024-10-02 01:19:22.733190 - step 95 of 120 - 10000 active elements (0 deactivated)
09:39:41 INFO opendrift.models.basemodel:2038: 2024-10-02 01:29:22.733190 - step 96 of 120 - 10000 active elements (0 deactivated)
09:39:41 INFO opendrift.models.basemodel:2038: 2024-10-02 01:39:22.733190 - step 97 of 120 - 10000 active elements (0 deactivated)
09:39:42 INFO opendrift.models.basemodel:2038: 2024-10-02 01:49:22.733190 - step 98 of 120 - 10000 active elements (0 deactivated)
09:39:42 INFO opendrift.models.basemodel:2038: 2024-10-02 01:59:22.733190 - step 99 of 120 - 10000 active elements (0 deactivated)
09:39:42 INFO opendrift.models.basemodel:2038: 2024-10-02 02:09:22.733190 - step 100 of 120 - 10000 active elements (0 deactivated)
09:39:42 INFO opendrift.models.basemodel:2038: 2024-10-02 02:19:22.733190 - step 101 of 120 - 10000 active elements (0 deactivated)
09:39:42 INFO opendrift.models.basemodel:2038: 2024-10-02 02:29:22.733190 - step 102 of 120 - 10000 active elements (0 deactivated)
09:39:42 INFO opendrift.models.basemodel:2038: 2024-10-02 02:39:22.733190 - step 103 of 120 - 10000 active elements (0 deactivated)
09:39:42 INFO opendrift.models.basemodel:2038: 2024-10-02 02:49:22.733190 - step 104 of 120 - 10000 active elements (0 deactivated)
09:39:43 INFO opendrift.models.basemodel:2038: 2024-10-02 02:59:22.733190 - step 105 of 120 - 10000 active elements (0 deactivated)
09:39:43 INFO opendrift.models.basemodel:2038: 2024-10-02 03:09:22.733190 - step 106 of 120 - 10000 active elements (0 deactivated)
09:39:43 INFO opendrift.models.basemodel:2038: 2024-10-02 03:19:22.733190 - step 107 of 120 - 10000 active elements (0 deactivated)
09:39:43 INFO opendrift.models.basemodel:2038: 2024-10-02 03:29:22.733190 - step 108 of 120 - 10000 active elements (0 deactivated)
09:39:43 INFO opendrift.models.basemodel:2038: 2024-10-02 03:39:22.733190 - step 109 of 120 - 10000 active elements (0 deactivated)
09:39:43 INFO opendrift.models.basemodel:2038: 2024-10-02 03:49:22.733190 - step 110 of 120 - 10000 active elements (0 deactivated)
09:39:43 INFO opendrift.models.basemodel:2038: 2024-10-02 03:59:22.733190 - step 111 of 120 - 10000 active elements (0 deactivated)
09:39:43 INFO opendrift.models.basemodel:2038: 2024-10-02 04:09:22.733190 - step 112 of 120 - 10000 active elements (0 deactivated)
09:39:44 INFO opendrift.models.basemodel:2038: 2024-10-02 04:19:22.733190 - step 113 of 120 - 10000 active elements (0 deactivated)
09:39:44 INFO opendrift.models.basemodel:2038: 2024-10-02 04:29:22.733190 - step 114 of 120 - 10000 active elements (0 deactivated)
09:39:44 INFO opendrift.models.basemodel:2038: 2024-10-02 04:39:22.733190 - step 115 of 120 - 10000 active elements (0 deactivated)
09:39:44 INFO opendrift.models.basemodel:2038: 2024-10-02 04:49:22.733190 - step 116 of 120 - 10000 active elements (0 deactivated)
09:39:44 INFO opendrift.models.basemodel:2038: 2024-10-02 04:59:22.733190 - step 117 of 120 - 10000 active elements (0 deactivated)
09:39:44 INFO opendrift.models.basemodel:2038: 2024-10-02 05:09:22.733190 - step 118 of 120 - 10000 active elements (0 deactivated)
09:39:44 INFO opendrift.models.basemodel:2038: 2024-10-02 05:19:22.733190 - step 119 of 120 - 10000 active elements (0 deactivated)
09:39:44 INFO opendrift.models.basemodel:2038: 2024-10-02 05:29:22.733190 - step 120 of 120 - 10000 active elements (0 deactivated)
Animation shows how oil thickness evolves, and decreases due to evaporation and spreading
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)
09:39:45 WARNING opendrift.models.basemodel:2411: Plotting fast. This will make your plots less accurate.
09:39:47 INFO opendrift.models.basemodel:4608: Saving animation to /root/project/docs/source/gallery/animations/example_oil_thickness_0.gif...
09:39:59 INFO opendrift.models.basemodel:3037: Time to make animation: 0:00:13.800357
Second run, identical but without updating surface oil thickness
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.utcnow())
o2.run(time_step=timestep, time_step_output=timestep_output,
duration=duration)
09:39:59 INFO opendrift.models.basemodel:515: OpenDriftSimulation initialised (version 1.11.13 / v1.11.13-48-g5bea84b)
09:39:59 INFO opendrift.models.openoil.adios.dirjs:90: Querying ADIOS database for oil: GENERIC DIESEL
09:39:59 INFO opendrift.models.openoil.openoil:1719: Using density 841.2 and viscosity 6.3404392151148136e-06 of oiltype GENERIC DIESEL
09:39:59 INFO opendrift.models.basemodel.environment:218: Adding a dynamical landmask with max. priority based on assumed maximum speed of 1.3 m/s. Adding a customised landmask may be faster...
09:39:59 INFO opendrift.models.basemodel.environment:245: Fallback values will be used for the following variables which have no readers:
09:39:59 INFO opendrift.models.basemodel.environment:248: x_sea_water_velocity: 0.100000
09:39:59 INFO opendrift.models.basemodel.environment:248: y_sea_water_velocity: 0.000000
09:39:59 INFO opendrift.models.basemodel.environment:248: x_wind: 0.000000
09:39:59 INFO opendrift.models.basemodel.environment:248: y_wind: 7.000000
09:39:59 INFO opendrift.models.basemodel.environment:248: sea_surface_height: 0.000000
09:39:59 INFO opendrift.models.basemodel.environment:248: upward_sea_water_velocity: 0.000000
09:39:59 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_significant_height: 0.000000
09:39:59 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_stokes_drift_x_velocity: 0.000000
09:39:59 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_stokes_drift_y_velocity: 0.300000
09:39:59 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_period_at_variance_spectral_density_maximum: 0.000000
09:39:59 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment: 0.000000
09:39:59 INFO opendrift.models.basemodel.environment:248: sea_ice_area_fraction: 0.000000
09:39:59 INFO opendrift.models.basemodel.environment:248: sea_ice_x_velocity: 0.000000
09:39:59 INFO opendrift.models.basemodel.environment:248: sea_ice_y_velocity: 0.000000
09:39:59 INFO opendrift.models.basemodel.environment:248: sea_water_temperature: 10.000000
09:39:59 INFO opendrift.models.basemodel.environment:248: sea_water_salinity: 34.000000
09:39:59 INFO opendrift.models.basemodel.environment:248: sea_floor_depth_below_sea_level: 10000.000000
09:39:59 INFO opendrift.models.basemodel.environment:248: ocean_vertical_diffusivity: 0.020000
09:39:59 INFO opendrift.models.basemodel.environment:248: ocean_mixed_layer_thickness: 50.000000
09:39:59 INFO opendrift.models.basemodel:936: Using existing reader for land_binary_mask
09:39:59 INFO opendrift.models.basemodel:947: All points are in ocean
09:39:59 INFO opendrift.models.openoil.openoil:687: Oil-water surface tension is 0.029464 Nm
09:39:59 INFO opendrift.models.openoil.openoil:700: Max water fraction not available for GENERIC DIESEL, using default
09:39:59 INFO opendrift.models.basemodel:2038: 2024-10-01 09:39:59.040201 - step 1 of 120 - 10000 active elements (0 deactivated)
09:39:59 INFO opendrift.models.basemodel:2038: 2024-10-01 09:49:59.040201 - step 2 of 120 - 10000 active elements (0 deactivated)
09:39:59 INFO opendrift.models.basemodel:2038: 2024-10-01 09:59:59.040201 - step 3 of 120 - 10000 active elements (0 deactivated)
09:39:59 INFO opendrift.models.basemodel:2038: 2024-10-01 10:09:59.040201 - step 4 of 120 - 10000 active elements (0 deactivated)
09:40:00 INFO opendrift.models.basemodel:2038: 2024-10-01 10:19:59.040201 - step 5 of 120 - 10000 active elements (0 deactivated)
09:40:00 INFO opendrift.models.basemodel:2038: 2024-10-01 10:29:59.040201 - step 6 of 120 - 10000 active elements (0 deactivated)
09:40:00 INFO opendrift.models.basemodel:2038: 2024-10-01 10:39:59.040201 - step 7 of 120 - 10000 active elements (0 deactivated)
09:40:00 INFO opendrift.models.basemodel:2038: 2024-10-01 10:49:59.040201 - step 8 of 120 - 10000 active elements (0 deactivated)
09:40:00 INFO opendrift.models.basemodel:2038: 2024-10-01 10:59:59.040201 - step 9 of 120 - 10000 active elements (0 deactivated)
09:40:01 INFO opendrift.models.basemodel:2038: 2024-10-01 11:09:59.040201 - step 10 of 120 - 10000 active elements (0 deactivated)
09:40:01 INFO opendrift.models.basemodel:2038: 2024-10-01 11:19:59.040201 - step 11 of 120 - 10000 active elements (0 deactivated)
09:40:01 INFO opendrift.models.basemodel:2038: 2024-10-01 11:29:59.040201 - step 12 of 120 - 10000 active elements (0 deactivated)
09:40:01 INFO opendrift.models.basemodel:2038: 2024-10-01 11:39:59.040201 - step 13 of 120 - 10000 active elements (0 deactivated)
09:40:01 INFO opendrift.models.basemodel:2038: 2024-10-01 11:49:59.040201 - step 14 of 120 - 10000 active elements (0 deactivated)
09:40:02 INFO opendrift.models.basemodel:2038: 2024-10-01 11:59:59.040201 - step 15 of 120 - 10000 active elements (0 deactivated)
09:40:02 INFO opendrift.models.basemodel:2038: 2024-10-01 12:09:59.040201 - step 16 of 120 - 10000 active elements (0 deactivated)
09:40:02 INFO opendrift.models.basemodel:2038: 2024-10-01 12:19:59.040201 - step 17 of 120 - 10000 active elements (0 deactivated)
09:40:02 INFO opendrift.models.basemodel:2038: 2024-10-01 12:29:59.040201 - step 18 of 120 - 10000 active elements (0 deactivated)
09:40:02 INFO opendrift.models.basemodel:2038: 2024-10-01 12:39:59.040201 - step 19 of 120 - 10000 active elements (0 deactivated)
09:40:02 INFO opendrift.models.basemodel:2038: 2024-10-01 12:49:59.040201 - step 20 of 120 - 10000 active elements (0 deactivated)
09:40:03 INFO opendrift.models.basemodel:2038: 2024-10-01 12:59:59.040201 - step 21 of 120 - 10000 active elements (0 deactivated)
09:40:03 INFO opendrift.models.basemodel:2038: 2024-10-01 13:09:59.040201 - step 22 of 120 - 10000 active elements (0 deactivated)
09:40:03 INFO opendrift.models.basemodel:2038: 2024-10-01 13:19:59.040201 - step 23 of 120 - 10000 active elements (0 deactivated)
09:40:03 INFO opendrift.models.basemodel:2038: 2024-10-01 13:29:59.040201 - step 24 of 120 - 10000 active elements (0 deactivated)
09:40:03 INFO opendrift.models.basemodel:2038: 2024-10-01 13:39:59.040201 - step 25 of 120 - 10000 active elements (0 deactivated)
09:40:04 INFO opendrift.models.basemodel:2038: 2024-10-01 13:49:59.040201 - step 26 of 120 - 10000 active elements (0 deactivated)
09:40:04 INFO opendrift.models.basemodel:2038: 2024-10-01 13:59:59.040201 - step 27 of 120 - 10000 active elements (0 deactivated)
09:40:04 INFO opendrift.models.basemodel:2038: 2024-10-01 14:09:59.040201 - step 28 of 120 - 10000 active elements (0 deactivated)
09:40:04 INFO opendrift.models.basemodel:2038: 2024-10-01 14:19:59.040201 - step 29 of 120 - 10000 active elements (0 deactivated)
09:40:04 INFO opendrift.models.basemodel:2038: 2024-10-01 14:29:59.040201 - step 30 of 120 - 10000 active elements (0 deactivated)
09:40:04 INFO opendrift.models.basemodel:2038: 2024-10-01 14:39:59.040201 - step 31 of 120 - 10000 active elements (0 deactivated)
09:40:05 INFO opendrift.models.basemodel:2038: 2024-10-01 14:49:59.040201 - step 32 of 120 - 10000 active elements (0 deactivated)
09:40:05 INFO opendrift.models.basemodel:2038: 2024-10-01 14:59:59.040201 - step 33 of 120 - 10000 active elements (0 deactivated)
09:40:05 INFO opendrift.models.basemodel:2038: 2024-10-01 15:09:59.040201 - step 34 of 120 - 10000 active elements (0 deactivated)
09:40:05 INFO opendrift.models.basemodel:2038: 2024-10-01 15:19:59.040201 - step 35 of 120 - 10000 active elements (0 deactivated)
09:40:05 INFO opendrift.models.basemodel:2038: 2024-10-01 15:29:59.040201 - step 36 of 120 - 10000 active elements (0 deactivated)
09:40:05 INFO opendrift.models.basemodel:2038: 2024-10-01 15:39:59.040201 - step 37 of 120 - 10000 active elements (0 deactivated)
09:40:06 INFO opendrift.models.basemodel:2038: 2024-10-01 15:49:59.040201 - step 38 of 120 - 10000 active elements (0 deactivated)
09:40:06 INFO opendrift.models.basemodel:2038: 2024-10-01 15:59:59.040201 - step 39 of 120 - 10000 active elements (0 deactivated)
09:40:06 INFO opendrift.models.basemodel:2038: 2024-10-01 16:09:59.040201 - step 40 of 120 - 10000 active elements (0 deactivated)
09:40:06 INFO opendrift.models.basemodel:2038: 2024-10-01 16:19:59.040201 - step 41 of 120 - 10000 active elements (0 deactivated)
09:40:06 INFO opendrift.models.basemodel:2038: 2024-10-01 16:29:59.040201 - step 42 of 120 - 10000 active elements (0 deactivated)
09:40:06 INFO opendrift.models.basemodel:2038: 2024-10-01 16:39:59.040201 - step 43 of 120 - 10000 active elements (0 deactivated)
09:40:07 INFO opendrift.models.basemodel:2038: 2024-10-01 16:49:59.040201 - step 44 of 120 - 10000 active elements (0 deactivated)
09:40:07 INFO opendrift.models.basemodel:2038: 2024-10-01 16:59:59.040201 - step 45 of 120 - 10000 active elements (0 deactivated)
09:40:07 INFO opendrift.models.basemodel:2038: 2024-10-01 17:09:59.040201 - step 46 of 120 - 10000 active elements (0 deactivated)
09:40:07 INFO opendrift.models.basemodel:2038: 2024-10-01 17:19:59.040201 - step 47 of 120 - 10000 active elements (0 deactivated)
09:40:07 INFO opendrift.models.basemodel:2038: 2024-10-01 17:29:59.040201 - step 48 of 120 - 10000 active elements (0 deactivated)
09:40:07 INFO opendrift.models.basemodel:2038: 2024-10-01 17:39:59.040201 - step 49 of 120 - 10000 active elements (0 deactivated)
09:40:08 INFO opendrift.models.basemodel:2038: 2024-10-01 17:49:59.040201 - step 50 of 120 - 10000 active elements (0 deactivated)
09:40:08 INFO opendrift.models.basemodel:2038: 2024-10-01 17:59:59.040201 - step 51 of 120 - 10000 active elements (0 deactivated)
09:40:08 INFO opendrift.models.basemodel:2038: 2024-10-01 18:09:59.040201 - step 52 of 120 - 10000 active elements (0 deactivated)
09:40:08 INFO opendrift.models.basemodel:2038: 2024-10-01 18:19:59.040201 - step 53 of 120 - 10000 active elements (0 deactivated)
09:40:08 INFO opendrift.models.basemodel:2038: 2024-10-01 18:29:59.040201 - step 54 of 120 - 10000 active elements (0 deactivated)
09:40:08 INFO opendrift.models.basemodel:2038: 2024-10-01 18:39:59.040201 - step 55 of 120 - 10000 active elements (0 deactivated)
09:40:09 INFO opendrift.models.basemodel:2038: 2024-10-01 18:49:59.040201 - step 56 of 120 - 10000 active elements (0 deactivated)
09:40:09 INFO opendrift.models.basemodel:2038: 2024-10-01 18:59:59.040201 - step 57 of 120 - 10000 active elements (0 deactivated)
09:40:09 INFO opendrift.models.basemodel:2038: 2024-10-01 19:09:59.040201 - step 58 of 120 - 10000 active elements (0 deactivated)
09:40:09 INFO opendrift.models.basemodel:2038: 2024-10-01 19:19:59.040201 - step 59 of 120 - 10000 active elements (0 deactivated)
09:40:09 INFO opendrift.models.basemodel:2038: 2024-10-01 19:29:59.040201 - step 60 of 120 - 10000 active elements (0 deactivated)
09:40:09 INFO opendrift.models.basemodel:2038: 2024-10-01 19:39:59.040201 - step 61 of 120 - 10000 active elements (0 deactivated)
09:40:10 INFO opendrift.models.basemodel:2038: 2024-10-01 19:49:59.040201 - step 62 of 120 - 10000 active elements (0 deactivated)
09:40:10 INFO opendrift.models.basemodel:2038: 2024-10-01 19:59:59.040201 - step 63 of 120 - 10000 active elements (0 deactivated)
09:40:10 INFO opendrift.models.basemodel:2038: 2024-10-01 20:09:59.040201 - step 64 of 120 - 10000 active elements (0 deactivated)
09:40:10 INFO opendrift.models.basemodel:2038: 2024-10-01 20:19:59.040201 - step 65 of 120 - 10000 active elements (0 deactivated)
09:40:10 INFO opendrift.models.basemodel:2038: 2024-10-01 20:29:59.040201 - step 66 of 120 - 10000 active elements (0 deactivated)
09:40:10 INFO opendrift.models.basemodel:2038: 2024-10-01 20:39:59.040201 - step 67 of 120 - 10000 active elements (0 deactivated)
09:40:11 INFO opendrift.models.basemodel:2038: 2024-10-01 20:49:59.040201 - step 68 of 120 - 10000 active elements (0 deactivated)
09:40:11 INFO opendrift.models.basemodel:2038: 2024-10-01 20:59:59.040201 - step 69 of 120 - 10000 active elements (0 deactivated)
09:40:11 INFO opendrift.models.basemodel:2038: 2024-10-01 21:09:59.040201 - step 70 of 120 - 10000 active elements (0 deactivated)
09:40:11 INFO opendrift.models.basemodel:2038: 2024-10-01 21:19:59.040201 - step 71 of 120 - 10000 active elements (0 deactivated)
09:40:11 INFO opendrift.models.basemodel:2038: 2024-10-01 21:29:59.040201 - step 72 of 120 - 10000 active elements (0 deactivated)
09:40:11 INFO opendrift.models.basemodel:2038: 2024-10-01 21:39:59.040201 - step 73 of 120 - 10000 active elements (0 deactivated)
09:40:12 INFO opendrift.models.basemodel:2038: 2024-10-01 21:49:59.040201 - step 74 of 120 - 10000 active elements (0 deactivated)
09:40:12 INFO opendrift.models.basemodel:2038: 2024-10-01 21:59:59.040201 - step 75 of 120 - 10000 active elements (0 deactivated)
09:40:12 INFO opendrift.models.basemodel:2038: 2024-10-01 22:09:59.040201 - step 76 of 120 - 10000 active elements (0 deactivated)
09:40:12 INFO opendrift.models.basemodel:2038: 2024-10-01 22:19:59.040201 - step 77 of 120 - 10000 active elements (0 deactivated)
09:40:12 INFO opendrift.models.basemodel:2038: 2024-10-01 22:29:59.040201 - step 78 of 120 - 10000 active elements (0 deactivated)
09:40:12 INFO opendrift.models.basemodel:2038: 2024-10-01 22:39:59.040201 - step 79 of 120 - 10000 active elements (0 deactivated)
09:40:13 INFO opendrift.models.basemodel:2038: 2024-10-01 22:49:59.040201 - step 80 of 120 - 10000 active elements (0 deactivated)
09:40:13 INFO opendrift.models.basemodel:2038: 2024-10-01 22:59:59.040201 - step 81 of 120 - 10000 active elements (0 deactivated)
09:40:13 INFO opendrift.models.basemodel:2038: 2024-10-01 23:09:59.040201 - step 82 of 120 - 10000 active elements (0 deactivated)
09:40:13 INFO opendrift.models.basemodel:2038: 2024-10-01 23:19:59.040201 - step 83 of 120 - 10000 active elements (0 deactivated)
09:40:13 INFO opendrift.models.basemodel:2038: 2024-10-01 23:29:59.040201 - step 84 of 120 - 10000 active elements (0 deactivated)
09:40:13 INFO opendrift.models.basemodel:2038: 2024-10-01 23:39:59.040201 - step 85 of 120 - 10000 active elements (0 deactivated)
09:40:14 INFO opendrift.models.basemodel:2038: 2024-10-01 23:49:59.040201 - step 86 of 120 - 10000 active elements (0 deactivated)
09:40:14 INFO opendrift.models.basemodel:2038: 2024-10-01 23:59:59.040201 - step 87 of 120 - 10000 active elements (0 deactivated)
09:40:14 INFO opendrift.models.basemodel:2038: 2024-10-02 00:09:59.040201 - step 88 of 120 - 10000 active elements (0 deactivated)
09:40:14 INFO opendrift.models.basemodel:2038: 2024-10-02 00:19:59.040201 - step 89 of 120 - 10000 active elements (0 deactivated)
09:40:14 INFO opendrift.models.basemodel:2038: 2024-10-02 00:29:59.040201 - step 90 of 120 - 10000 active elements (0 deactivated)
09:40:14 INFO opendrift.models.basemodel:2038: 2024-10-02 00:39:59.040201 - step 91 of 120 - 10000 active elements (0 deactivated)
09:40:14 INFO opendrift.models.basemodel:2038: 2024-10-02 00:49:59.040201 - step 92 of 120 - 10000 active elements (0 deactivated)
09:40:15 INFO opendrift.models.basemodel:2038: 2024-10-02 00:59:59.040201 - step 93 of 120 - 10000 active elements (0 deactivated)
09:40:15 INFO opendrift.models.basemodel:2038: 2024-10-02 01:09:59.040201 - step 94 of 120 - 10000 active elements (0 deactivated)
09:40:15 INFO opendrift.models.basemodel:2038: 2024-10-02 01:19:59.040201 - step 95 of 120 - 10000 active elements (0 deactivated)
09:40:15 INFO opendrift.models.basemodel:2038: 2024-10-02 01:29:59.040201 - step 96 of 120 - 10000 active elements (0 deactivated)
09:40:15 INFO opendrift.models.basemodel:2038: 2024-10-02 01:39:59.040201 - step 97 of 120 - 10000 active elements (0 deactivated)
09:40:15 INFO opendrift.models.basemodel:2038: 2024-10-02 01:49:59.040201 - step 98 of 120 - 10000 active elements (0 deactivated)
09:40:16 INFO opendrift.models.basemodel:2038: 2024-10-02 01:59:59.040201 - step 99 of 120 - 10000 active elements (0 deactivated)
09:40:16 INFO opendrift.models.basemodel:2038: 2024-10-02 02:09:59.040201 - step 100 of 120 - 10000 active elements (0 deactivated)
09:40:16 INFO opendrift.models.basemodel:2038: 2024-10-02 02:19:59.040201 - step 101 of 120 - 10000 active elements (0 deactivated)
09:40:16 INFO opendrift.models.basemodel:2038: 2024-10-02 02:29:59.040201 - step 102 of 120 - 10000 active elements (0 deactivated)
09:40:16 INFO opendrift.models.basemodel:2038: 2024-10-02 02:39:59.040201 - step 103 of 120 - 10000 active elements (0 deactivated)
09:40:16 INFO opendrift.models.basemodel:2038: 2024-10-02 02:49:59.040201 - step 104 of 120 - 10000 active elements (0 deactivated)
09:40:16 INFO opendrift.models.basemodel:2038: 2024-10-02 02:59:59.040201 - step 105 of 120 - 10000 active elements (0 deactivated)
09:40:17 INFO opendrift.models.basemodel:2038: 2024-10-02 03:09:59.040201 - step 106 of 120 - 10000 active elements (0 deactivated)
09:40:17 INFO opendrift.models.basemodel:2038: 2024-10-02 03:19:59.040201 - step 107 of 120 - 10000 active elements (0 deactivated)
09:40:17 INFO opendrift.models.basemodel:2038: 2024-10-02 03:29:59.040201 - step 108 of 120 - 10000 active elements (0 deactivated)
09:40:17 INFO opendrift.models.basemodel:2038: 2024-10-02 03:39:59.040201 - step 109 of 120 - 10000 active elements (0 deactivated)
09:40:17 INFO opendrift.models.basemodel:2038: 2024-10-02 03:49:59.040201 - step 110 of 120 - 10000 active elements (0 deactivated)
09:40:17 INFO opendrift.models.basemodel:2038: 2024-10-02 03:59:59.040201 - step 111 of 120 - 10000 active elements (0 deactivated)
09:40:18 INFO opendrift.models.basemodel:2038: 2024-10-02 04:09:59.040201 - step 112 of 120 - 10000 active elements (0 deactivated)
09:40:18 INFO opendrift.models.basemodel:2038: 2024-10-02 04:19:59.040201 - step 113 of 120 - 10000 active elements (0 deactivated)
09:40:18 INFO opendrift.models.basemodel:2038: 2024-10-02 04:29:59.040201 - step 114 of 120 - 10000 active elements (0 deactivated)
09:40:18 INFO opendrift.models.basemodel:2038: 2024-10-02 04:39:59.040201 - step 115 of 120 - 10000 active elements (0 deactivated)
09:40:18 INFO opendrift.models.basemodel:2038: 2024-10-02 04:49:59.040201 - step 116 of 120 - 10000 active elements (0 deactivated)
09:40:18 INFO opendrift.models.basemodel:2038: 2024-10-02 04:59:59.040201 - step 117 of 120 - 10000 active elements (0 deactivated)
09:40:18 INFO opendrift.models.basemodel:2038: 2024-10-02 05:09:59.040201 - step 118 of 120 - 10000 active elements (0 deactivated)
09:40:19 INFO opendrift.models.basemodel:2038: 2024-10-02 05:19:59.040201 - step 119 of 120 - 10000 active elements (0 deactivated)
09:40:19 INFO opendrift.models.basemodel:2038: 2024-10-02 05:29:59.040201 - step 120 of 120 - 10000 active elements (0 deactivated)
Comparison plots
o1.plot_oil_budget()
o2.plot_oil_budget()
Entrainment
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()
We see that with the updated film thickness, the droplets are getting gradually smaller
r1 = o1.get_property('diameter')[0]
r2 = o2.get_property('diameter')[0]
plt.plot(np.median(r1*1e6, 1))
plt.plot(np.median(r2*1e6, 1))
plt.legend(['With updated film thickness', 'With constant film thickness'])
plt.xlabel('Time step')
plt.ylabel('Median droplet diameter [micrometer]')
plt.show()
/opt/conda/envs/opendrift/lib/python3.11/site-packages/numpy/core/fromnumeric.py:771: UserWarning: Warning: 'partition' will ignore the 'mask' of the MaskedArray.
a.partition(kth, axis=axis, kind=kind, order=order)
We see that oil film thickness has virtually no impact on horizontal drift
o1.animation(compare=o2, fast=True,
legend=['Updated film thickness',
'Constant/default film thickness'])
09:40:27 WARNING opendrift.models.basemodel:2411: Plotting fast. This will make your plots less accurate.
/opt/conda/envs/opendrift/lib/python3.11/site-packages/cartopy/mpl/geoaxes.py:1683: UserWarning: No data for colormapping provided via 'c'. Parameters 'cmap' will be ignored
result = super().scatter(*args, **kwargs)
09:40:29 INFO opendrift.models.basemodel:4608: Saving animation to /root/project/docs/source/gallery/animations/example_oil_thickness_1.gif...
09:40:43 INFO opendrift.models.basemodel:3037: Time to make animation: 0:00:15.849129
Total running time of the script: (1 minutes 27.949 seconds)