Entrainment rate for light and heavy oils

from datetime import datetime, timedelta
from opendrift.models.openoil import OpenOil
import matplotlib.pyplot as plt
import numpy as np

Li et al. (2017) entrainment rate (light vs. heavy oil)

o2 = OpenOil(loglevel=20, weathering_model='noaa')
o2.set_config('environment:fallback:land_binary_mask', 0)
o2.set_config('environment:fallback:x_sea_water_velocity', -.2)
o2.set_config('environment:fallback:y_sea_water_velocity', 0)
o2.set_config('environment:fallback:x_wind', 10)
o2.set_config('environment:fallback:y_wind', 0)
o2.set_config('environment:fallback:sea_surface_wave_stokes_drift_x_velocity', .3)
o2.set_config('environment:fallback:sea_surface_wave_stokes_drift_y_velocity', 0)
o2.set_config('wave_entrainment:entrainment_rate', 'Li et al. (2017)')
o2.set_config('wave_entrainment:droplet_size_distribution', 'Johansen et al. (2015)')
o2.set_config('processes:evaporation', False)
o2.set_config('processes:dispersion', False)
o2.seed_elements(lon=4, lat=60, time=datetime.utcnow(), number=1000,
                radius=100, z=0, oil_type='TIA JUANA HEAVY')
o2.run(duration=timedelta(hours=12), time_step=900, time_step_output=3600)

o3 = OpenOil(loglevel=20, weathering_model='noaa')
o3.set_config('environment:fallback:land_binary_mask', 0)
o3.set_config('environment:fallback:x_sea_water_velocity', -.2)
o3.set_config('environment:fallback:y_sea_water_velocity', 0)
o3.set_config('environment:fallback:x_wind', 10)
o3.set_config('environment:fallback:y_wind', 0)
o3.set_config('environment:fallback:sea_surface_wave_stokes_drift_x_velocity', .3)
o3.set_config('environment:fallback:sea_surface_wave_stokes_drift_y_velocity', 0)
o3.set_config('wave_entrainment:entrainment_rate', 'Li et al. (2017)')
o3.set_config('wave_entrainment:droplet_size_distribution', 'Johansen et al. (2015)')
o3.set_config('processes:evaporation', False)
o3.set_config('processes:dispersion', False)
o3.seed_elements(lon=4, lat=60, time=datetime.utcnow(), number=1000,
                 radius=100, z=0, oil_type='TIA JUANA LIGHT') #'EKOFISK BLEND, STATOIL' similar ent.
o3.run(duration=timedelta(hours=12), time_step=900, time_step_output=3600)
09:35:53 INFO    opendrift.models.basemodel:515: OpenDriftSimulation initialised (version 1.11.13 / v1.11.13-48-g5bea84b)
09:35:53 INFO    opendrift.models.openoil.adios.dirjs:90: Querying ADIOS database for oil: TIA JUANA HEAVY
09:35:53 INFO    opendrift.models.openoil.openoil:1719: Using density 984.522528 and viscosity 0.007112218477811797 of oiltype TIA JUANA HEAVY
09:35:53 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:35:59 INFO    opendrift.models.basemodel.environment:245: Fallback values will be used for the following variables which have no readers:
09:35:59 INFO    opendrift.models.basemodel.environment:248:    x_sea_water_velocity: -0.200000
09:35:59 INFO    opendrift.models.basemodel.environment:248:    y_sea_water_velocity: 0.000000
09:35:59 INFO    opendrift.models.basemodel.environment:248:    x_wind: 10.000000
09:35:59 INFO    opendrift.models.basemodel.environment:248:    y_wind: 0.000000
09:35:59 INFO    opendrift.models.basemodel.environment:248:    sea_surface_height: 0.000000
09:35:59 INFO    opendrift.models.basemodel.environment:248:    upward_sea_water_velocity: 0.000000
09:35:59 INFO    opendrift.models.basemodel.environment:248:    sea_surface_wave_significant_height: 0.000000
09:35:59 INFO    opendrift.models.basemodel.environment:248:    sea_surface_wave_stokes_drift_x_velocity: 0.300000
09:35:59 INFO    opendrift.models.basemodel.environment:248:    sea_surface_wave_stokes_drift_y_velocity: 0.000000
09:35:59 INFO    opendrift.models.basemodel.environment:248:    sea_surface_wave_period_at_variance_spectral_density_maximum: 0.000000
09:35:59 INFO    opendrift.models.basemodel.environment:248:    sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment: 0.000000
09:35:59 INFO    opendrift.models.basemodel.environment:248:    sea_ice_area_fraction: 0.000000
09:35:59 INFO    opendrift.models.basemodel.environment:248:    sea_ice_x_velocity: 0.000000
09:35:59 INFO    opendrift.models.basemodel.environment:248:    sea_ice_y_velocity: 0.000000
09:35:59 INFO    opendrift.models.basemodel.environment:248:    sea_water_temperature: 10.000000
09:35:59 INFO    opendrift.models.basemodel.environment:248:    sea_water_salinity: 34.000000
09:35:59 INFO    opendrift.models.basemodel.environment:248:    sea_floor_depth_below_sea_level: 10000.000000
09:35:59 INFO    opendrift.models.basemodel.environment:248:    ocean_vertical_diffusivity: 0.020000
09:35:59 INFO    opendrift.models.basemodel.environment:248:    ocean_mixed_layer_thickness: 50.000000
09:35:59 INFO    opendrift.models.basemodel:936: Using existing reader for land_binary_mask
09:35:59 INFO    opendrift.models.basemodel:947: All points are in ocean
09:35:59 INFO    opendrift.models.openoil.openoil:687: Oil-water surface tension is 0.035893 Nm
09:35:59 INFO    opendrift.models.openoil.openoil:700: Max water fraction not available for TIA JUANA HEAVY, using default
09:35:59 INFO    opendrift.models.basemodel:2038: 2024-10-01 09:35:53.530937 - step 1 of 48 - 1000 active elements (0 deactivated)
09:35:59 INFO    opendrift.models.basemodel:2038: 2024-10-01 09:50:53.530937 - step 2 of 48 - 1000 active elements (0 deactivated)
09:35:59 INFO    opendrift.models.basemodel:2038: 2024-10-01 10:05:53.530937 - step 3 of 48 - 1000 active elements (0 deactivated)
09:35:59 INFO    opendrift.models.basemodel:2038: 2024-10-01 10:20:53.530937 - step 4 of 48 - 1000 active elements (0 deactivated)
09:35:59 INFO    opendrift.models.basemodel:2038: 2024-10-01 10:35:53.530937 - step 5 of 48 - 1000 active elements (0 deactivated)
09:35:59 INFO    opendrift.models.basemodel:2038: 2024-10-01 10:50:53.530937 - step 6 of 48 - 1000 active elements (0 deactivated)
09:35:59 INFO    opendrift.models.basemodel:2038: 2024-10-01 11:05:53.530937 - step 7 of 48 - 1000 active elements (0 deactivated)
09:36:00 INFO    opendrift.models.basemodel:2038: 2024-10-01 11:20:53.530937 - step 8 of 48 - 1000 active elements (0 deactivated)
09:36:00 INFO    opendrift.models.basemodel:2038: 2024-10-01 11:35:53.530937 - step 9 of 48 - 1000 active elements (0 deactivated)
09:36:00 INFO    opendrift.models.basemodel:2038: 2024-10-01 11:50:53.530937 - step 10 of 48 - 1000 active elements (0 deactivated)
09:36:00 INFO    opendrift.models.basemodel:2038: 2024-10-01 12:05:53.530937 - step 11 of 48 - 1000 active elements (0 deactivated)
09:36:00 INFO    opendrift.models.basemodel:2038: 2024-10-01 12:20:53.530937 - step 12 of 48 - 1000 active elements (0 deactivated)
09:36:00 INFO    opendrift.models.basemodel:2038: 2024-10-01 12:35:53.530937 - step 13 of 48 - 1000 active elements (0 deactivated)
09:36:00 INFO    opendrift.models.basemodel:2038: 2024-10-01 12:50:53.530937 - step 14 of 48 - 1000 active elements (0 deactivated)
09:36:00 INFO    opendrift.models.basemodel:2038: 2024-10-01 13:05:53.530937 - step 15 of 48 - 1000 active elements (0 deactivated)
09:36:00 INFO    opendrift.models.basemodel:2038: 2024-10-01 13:20:53.530937 - step 16 of 48 - 1000 active elements (0 deactivated)
09:36:00 INFO    opendrift.models.basemodel:2038: 2024-10-01 13:35:53.530937 - step 17 of 48 - 1000 active elements (0 deactivated)
09:36:00 INFO    opendrift.models.basemodel:2038: 2024-10-01 13:50:53.530937 - step 18 of 48 - 1000 active elements (0 deactivated)
09:36:00 INFO    opendrift.models.basemodel:2038: 2024-10-01 14:05:53.530937 - step 19 of 48 - 1000 active elements (0 deactivated)
09:36:00 INFO    opendrift.models.basemodel:2038: 2024-10-01 14:20:53.530937 - step 20 of 48 - 1000 active elements (0 deactivated)
09:36:00 INFO    opendrift.models.basemodel:2038: 2024-10-01 14:35:53.530937 - step 21 of 48 - 1000 active elements (0 deactivated)
09:36:00 INFO    opendrift.models.basemodel:2038: 2024-10-01 14:50:53.530937 - step 22 of 48 - 1000 active elements (0 deactivated)
09:36:00 INFO    opendrift.models.basemodel:2038: 2024-10-01 15:05:53.530937 - step 23 of 48 - 1000 active elements (0 deactivated)
09:36:00 INFO    opendrift.models.basemodel:2038: 2024-10-01 15:20:53.530937 - step 24 of 48 - 1000 active elements (0 deactivated)
09:36:00 INFO    opendrift.models.basemodel:2038: 2024-10-01 15:35:53.530937 - step 25 of 48 - 1000 active elements (0 deactivated)
09:36:00 INFO    opendrift.models.basemodel:2038: 2024-10-01 15:50:53.530937 - step 26 of 48 - 1000 active elements (0 deactivated)
09:36:00 INFO    opendrift.models.basemodel:2038: 2024-10-01 16:05:53.530937 - step 27 of 48 - 1000 active elements (0 deactivated)
09:36:00 INFO    opendrift.models.basemodel:2038: 2024-10-01 16:20:53.530937 - step 28 of 48 - 1000 active elements (0 deactivated)
09:36:01 INFO    opendrift.models.basemodel:2038: 2024-10-01 16:35:53.530937 - step 29 of 48 - 1000 active elements (0 deactivated)
09:36:01 INFO    opendrift.models.basemodel:2038: 2024-10-01 16:50:53.530937 - step 30 of 48 - 1000 active elements (0 deactivated)
09:36:01 INFO    opendrift.models.basemodel:2038: 2024-10-01 17:05:53.530937 - step 31 of 48 - 1000 active elements (0 deactivated)
09:36:01 INFO    opendrift.models.basemodel:2038: 2024-10-01 17:20:53.530937 - step 32 of 48 - 1000 active elements (0 deactivated)
09:36:01 INFO    opendrift.models.basemodel:2038: 2024-10-01 17:35:53.530937 - step 33 of 48 - 1000 active elements (0 deactivated)
09:36:01 INFO    opendrift.models.basemodel:2038: 2024-10-01 17:50:53.530937 - step 34 of 48 - 1000 active elements (0 deactivated)
09:36:01 INFO    opendrift.models.basemodel:2038: 2024-10-01 18:05:53.530937 - step 35 of 48 - 1000 active elements (0 deactivated)
09:36:01 INFO    opendrift.models.basemodel:2038: 2024-10-01 18:20:53.530937 - step 36 of 48 - 1000 active elements (0 deactivated)
09:36:01 INFO    opendrift.models.basemodel:2038: 2024-10-01 18:35:53.530937 - step 37 of 48 - 1000 active elements (0 deactivated)
09:36:01 INFO    opendrift.models.basemodel:2038: 2024-10-01 18:50:53.530937 - step 38 of 48 - 1000 active elements (0 deactivated)
09:36:01 INFO    opendrift.models.basemodel:2038: 2024-10-01 19:05:53.530937 - step 39 of 48 - 1000 active elements (0 deactivated)
09:36:01 INFO    opendrift.models.basemodel:2038: 2024-10-01 19:20:53.530937 - step 40 of 48 - 1000 active elements (0 deactivated)
09:36:01 INFO    opendrift.models.basemodel:2038: 2024-10-01 19:35:53.530937 - step 41 of 48 - 1000 active elements (0 deactivated)
09:36:01 INFO    opendrift.models.basemodel:2038: 2024-10-01 19:50:53.530937 - step 42 of 48 - 1000 active elements (0 deactivated)
09:36:01 INFO    opendrift.models.basemodel:2038: 2024-10-01 20:05:53.530937 - step 43 of 48 - 1000 active elements (0 deactivated)
09:36:01 INFO    opendrift.models.basemodel:2038: 2024-10-01 20:20:53.530937 - step 44 of 48 - 1000 active elements (0 deactivated)
09:36:01 INFO    opendrift.models.basemodel:2038: 2024-10-01 20:35:53.530937 - step 45 of 48 - 1000 active elements (0 deactivated)
09:36:01 INFO    opendrift.models.basemodel:2038: 2024-10-01 20:50:53.530937 - step 46 of 48 - 1000 active elements (0 deactivated)
09:36:01 INFO    opendrift.models.basemodel:2038: 2024-10-01 21:05:53.530937 - step 47 of 48 - 1000 active elements (0 deactivated)
09:36:01 INFO    opendrift.models.basemodel:2038: 2024-10-01 21:20:53.530937 - step 48 of 48 - 1000 active elements (0 deactivated)
09:36:02 INFO    opendrift.models.basemodel:515: OpenDriftSimulation initialised (version 1.11.13 / v1.11.13-48-g5bea84b)
09:36:02 INFO    opendrift.models.openoil.adios.dirjs:90: Querying ADIOS database for oil: TIA JUANA LIGHT
09:36:02 WARNING opendrift.models.openoil.adios.dirjs:94: Several oils found with name: TIA JUANA LIGHT: ['AD01094', 'AD01490', 'AD02371'], using first.
09:36:02 INFO    opendrift.models.openoil.openoil:1719: Using density 866.282844 and viscosity 2.4802709645439323e-05 of oiltype TIA JUANA LIGHT
09:36:02 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:36:02 INFO    opendrift.models.basemodel.environment:245: Fallback values will be used for the following variables which have no readers:
09:36:02 INFO    opendrift.models.basemodel.environment:248:    x_sea_water_velocity: -0.200000
09:36:02 INFO    opendrift.models.basemodel.environment:248:    y_sea_water_velocity: 0.000000
09:36:02 INFO    opendrift.models.basemodel.environment:248:    x_wind: 10.000000
09:36:02 INFO    opendrift.models.basemodel.environment:248:    y_wind: 0.000000
09:36:02 INFO    opendrift.models.basemodel.environment:248:    sea_surface_height: 0.000000
09:36:02 INFO    opendrift.models.basemodel.environment:248:    upward_sea_water_velocity: 0.000000
09:36:02 INFO    opendrift.models.basemodel.environment:248:    sea_surface_wave_significant_height: 0.000000
09:36:02 INFO    opendrift.models.basemodel.environment:248:    sea_surface_wave_stokes_drift_x_velocity: 0.300000
09:36:02 INFO    opendrift.models.basemodel.environment:248:    sea_surface_wave_stokes_drift_y_velocity: 0.000000
09:36:02 INFO    opendrift.models.basemodel.environment:248:    sea_surface_wave_period_at_variance_spectral_density_maximum: 0.000000
09:36:02 INFO    opendrift.models.basemodel.environment:248:    sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment: 0.000000
09:36:02 INFO    opendrift.models.basemodel.environment:248:    sea_ice_area_fraction: 0.000000
09:36:02 INFO    opendrift.models.basemodel.environment:248:    sea_ice_x_velocity: 0.000000
09:36:02 INFO    opendrift.models.basemodel.environment:248:    sea_ice_y_velocity: 0.000000
09:36:02 INFO    opendrift.models.basemodel.environment:248:    sea_water_temperature: 10.000000
09:36:02 INFO    opendrift.models.basemodel.environment:248:    sea_water_salinity: 34.000000
09:36:02 INFO    opendrift.models.basemodel.environment:248:    sea_floor_depth_below_sea_level: 10000.000000
09:36:02 INFO    opendrift.models.basemodel.environment:248:    ocean_vertical_diffusivity: 0.020000
09:36:02 INFO    opendrift.models.basemodel.environment:248:    ocean_mixed_layer_thickness: 50.000000
09:36:02 INFO    opendrift.models.basemodel:936: Using existing reader for land_binary_mask
09:36:02 INFO    opendrift.models.basemodel:947: All points are in ocean
09:36:02 INFO    opendrift.models.openoil.openoil:687: Oil-water surface tension is 0.030855 Nm
09:36:02 INFO    opendrift.models.openoil.openoil:700: Max water fraction not available for TIA JUANA LIGHT, using default
09:36:02 INFO    opendrift.models.basemodel:2038: 2024-10-01 09:36:02.026808 - step 1 of 48 - 1000 active elements (0 deactivated)
09:36:02 INFO    opendrift.models.basemodel:2038: 2024-10-01 09:51:02.026808 - step 2 of 48 - 1000 active elements (0 deactivated)
09:36:02 INFO    opendrift.models.basemodel:2038: 2024-10-01 10:06:02.026808 - step 3 of 48 - 1000 active elements (0 deactivated)
09:36:02 INFO    opendrift.models.basemodel:2038: 2024-10-01 10:21:02.026808 - step 4 of 48 - 1000 active elements (0 deactivated)
09:36:02 INFO    opendrift.models.basemodel:2038: 2024-10-01 10:36:02.026808 - step 5 of 48 - 1000 active elements (0 deactivated)
09:36:02 INFO    opendrift.models.basemodel:2038: 2024-10-01 10:51:02.026808 - step 6 of 48 - 1000 active elements (0 deactivated)
09:36:02 INFO    opendrift.models.basemodel:2038: 2024-10-01 11:06:02.026808 - step 7 of 48 - 1000 active elements (0 deactivated)
09:36:02 INFO    opendrift.models.basemodel:2038: 2024-10-01 11:21:02.026808 - step 8 of 48 - 1000 active elements (0 deactivated)
09:36:02 INFO    opendrift.models.basemodel:2038: 2024-10-01 11:36:02.026808 - step 9 of 48 - 1000 active elements (0 deactivated)
09:36:02 INFO    opendrift.models.basemodel:2038: 2024-10-01 11:51:02.026808 - step 10 of 48 - 1000 active elements (0 deactivated)
09:36:02 INFO    opendrift.models.basemodel:2038: 2024-10-01 12:06:02.026808 - step 11 of 48 - 1000 active elements (0 deactivated)
09:36:02 INFO    opendrift.models.basemodel:2038: 2024-10-01 12:21:02.026808 - step 12 of 48 - 1000 active elements (0 deactivated)
09:36:02 INFO    opendrift.models.basemodel:2038: 2024-10-01 12:36:02.026808 - step 13 of 48 - 1000 active elements (0 deactivated)
09:36:02 INFO    opendrift.models.basemodel:2038: 2024-10-01 12:51:02.026808 - step 14 of 48 - 1000 active elements (0 deactivated)
09:36:02 INFO    opendrift.models.basemodel:2038: 2024-10-01 13:06:02.026808 - step 15 of 48 - 1000 active elements (0 deactivated)
09:36:02 INFO    opendrift.models.basemodel:2038: 2024-10-01 13:21:02.026808 - step 16 of 48 - 1000 active elements (0 deactivated)
09:36:02 INFO    opendrift.models.basemodel:2038: 2024-10-01 13:36:02.026808 - step 17 of 48 - 1000 active elements (0 deactivated)
09:36:02 INFO    opendrift.models.basemodel:2038: 2024-10-01 13:51:02.026808 - step 18 of 48 - 1000 active elements (0 deactivated)
09:36:02 INFO    opendrift.models.basemodel:2038: 2024-10-01 14:06:02.026808 - step 19 of 48 - 1000 active elements (0 deactivated)
09:36:02 INFO    opendrift.models.basemodel:2038: 2024-10-01 14:21:02.026808 - step 20 of 48 - 1000 active elements (0 deactivated)
09:36:02 INFO    opendrift.models.basemodel:2038: 2024-10-01 14:36:02.026808 - step 21 of 48 - 1000 active elements (0 deactivated)
09:36:03 INFO    opendrift.models.basemodel:2038: 2024-10-01 14:51:02.026808 - step 22 of 48 - 1000 active elements (0 deactivated)
09:36:03 INFO    opendrift.models.basemodel:2038: 2024-10-01 15:06:02.026808 - step 23 of 48 - 1000 active elements (0 deactivated)
09:36:03 INFO    opendrift.models.basemodel:2038: 2024-10-01 15:21:02.026808 - step 24 of 48 - 1000 active elements (0 deactivated)
09:36:03 INFO    opendrift.models.basemodel:2038: 2024-10-01 15:36:02.026808 - step 25 of 48 - 1000 active elements (0 deactivated)
09:36:03 INFO    opendrift.models.basemodel:2038: 2024-10-01 15:51:02.026808 - step 26 of 48 - 1000 active elements (0 deactivated)
09:36:03 INFO    opendrift.models.basemodel:2038: 2024-10-01 16:06:02.026808 - step 27 of 48 - 1000 active elements (0 deactivated)
09:36:03 INFO    opendrift.models.basemodel:2038: 2024-10-01 16:21:02.026808 - step 28 of 48 - 1000 active elements (0 deactivated)
09:36:03 INFO    opendrift.models.basemodel:2038: 2024-10-01 16:36:02.026808 - step 29 of 48 - 1000 active elements (0 deactivated)
09:36:03 INFO    opendrift.models.basemodel:2038: 2024-10-01 16:51:02.026808 - step 30 of 48 - 1000 active elements (0 deactivated)
09:36:03 INFO    opendrift.models.basemodel:2038: 2024-10-01 17:06:02.026808 - step 31 of 48 - 1000 active elements (0 deactivated)
09:36:03 INFO    opendrift.models.basemodel:2038: 2024-10-01 17:21:02.026808 - step 32 of 48 - 1000 active elements (0 deactivated)
09:36:03 INFO    opendrift.models.basemodel:2038: 2024-10-01 17:36:02.026808 - step 33 of 48 - 1000 active elements (0 deactivated)
09:36:03 INFO    opendrift.models.basemodel:2038: 2024-10-01 17:51:02.026808 - step 34 of 48 - 1000 active elements (0 deactivated)
09:36:03 INFO    opendrift.models.basemodel:2038: 2024-10-01 18:06:02.026808 - step 35 of 48 - 1000 active elements (0 deactivated)
09:36:03 INFO    opendrift.models.basemodel:2038: 2024-10-01 18:21:02.026808 - step 36 of 48 - 1000 active elements (0 deactivated)
09:36:03 INFO    opendrift.models.basemodel:2038: 2024-10-01 18:36:02.026808 - step 37 of 48 - 1000 active elements (0 deactivated)
09:36:03 INFO    opendrift.models.basemodel:2038: 2024-10-01 18:51:02.026808 - step 38 of 48 - 1000 active elements (0 deactivated)
09:36:03 INFO    opendrift.models.basemodel:2038: 2024-10-01 19:06:02.026808 - step 39 of 48 - 1000 active elements (0 deactivated)
09:36:03 INFO    opendrift.models.basemodel:2038: 2024-10-01 19:21:02.026808 - step 40 of 48 - 1000 active elements (0 deactivated)
09:36:03 INFO    opendrift.models.basemodel:2038: 2024-10-01 19:36:02.026808 - step 41 of 48 - 1000 active elements (0 deactivated)
09:36:03 INFO    opendrift.models.basemodel:2038: 2024-10-01 19:51:02.026808 - step 42 of 48 - 1000 active elements (0 deactivated)
09:36:04 INFO    opendrift.models.basemodel:2038: 2024-10-01 20:06:02.026808 - step 43 of 48 - 1000 active elements (0 deactivated)
09:36:04 INFO    opendrift.models.basemodel:2038: 2024-10-01 20:21:02.026808 - step 44 of 48 - 1000 active elements (0 deactivated)
09:36:04 INFO    opendrift.models.basemodel:2038: 2024-10-01 20:36:02.026808 - step 45 of 48 - 1000 active elements (0 deactivated)
09:36:04 INFO    opendrift.models.basemodel:2038: 2024-10-01 20:51:02.026808 - step 46 of 48 - 1000 active elements (0 deactivated)
09:36:04 INFO    opendrift.models.basemodel:2038: 2024-10-01 21:06:02.026808 - step 47 of 48 - 1000 active elements (0 deactivated)
09:36:04 INFO    opendrift.models.basemodel:2038: 2024-10-01 21:21:02.026808 - step 48 of 48 - 1000 active elements (0 deactivated)

Plotting and comparing

print('#######################')
print('Entrainment rate (heavy)', np.mean(o2.oil_wave_entrainment_rate()))
print('Entrainment rate (light)', np.mean(o3.oil_wave_entrainment_rate()))
print('Viscosity (heavy)', np.mean(o2.elements.viscosity))
print('Viscosity (light)', np.mean(o3.elements.viscosity))
print('Density (heavy)', np.mean(o2.elements.density))
print('Density (light)', np.mean(o3.elements.density))
print('#######################')

o2.plot_oil_budget()
o3.plot_oil_budget()
legend = ['TIA JUANA HEAVY', 'TIA JUANA LIGHT']
o2.animation_profile(compare=o3, legend=legend)
  • TIA JUANA HEAVY (984.5 kg/m3) - 2024-10-01 09:35 to 2024-10-01 21:35
  • TIA JUANA LIGHT (866.3 kg/m3) - 2024-10-01 09:36 to 2024-10-01 21:36
#######################
Entrainment rate (heavy) 0.00011830298404165814
Entrainment rate (light) 0.008958756179169351
Viscosity (heavy) 0.0074630007147789
Viscosity (light) 2.6659401555662043e-05
Density (heavy) 984.5240478515625
Density (light) 866.2845458984375
#######################
/root/project/opendrift/models/basemodel/__init__.py:3156: UserWarning: No data for colormapping provided via 'c'. Parameters 'cmap' will be ignored
  points = ax.scatter([], [],
/root/project/opendrift/models/basemodel/__init__.py:3199: UserWarning: No data for colormapping provided via 'c'. Parameters 'cmap' will be ignored
  points_other = ax.scatter([], [],
/root/project/opendrift/models/basemodel/__init__.py:3211: UserWarning: No data for colormapping provided via 'c'. Parameters 'cmap' will be ignored
  points_other_deactivated = ax.scatter([], [], c='r', cmap=cmap, s=markersize, alpha=.3)
09:36:05 INFO    opendrift.models.basemodel:4608: Saving animation to /root/project/docs/source/gallery/animations/example_entrainment_rate_oil_types_0.gif...
09:36:06 INFO    opendrift.models.basemodel:3251: Time to make animation: 0:00:01.746889
../_images/example_entrainment_rate_oil_types_0.gif
o2.animation(compare=o3, legend=legend, fast=True)
09:36:07 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:36:09 INFO    opendrift.models.basemodel:4608: Saving animation to /root/project/docs/source/gallery/animations/example_entrainment_rate_oil_types_1.gif...
09:36:16 INFO    opendrift.models.basemodel:3037: Time to make animation: 0:00:08.650514
../_images/example_entrainment_rate_oil_types_1.gif

Total running time of the script: (0 minutes 29.507 seconds)

Gallery generated by Sphinx-Gallery