Note
Go to the end to download the full example code.
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)
20:13:05 INFO opendrift.models.basemodel:515: OpenDriftSimulation initialised (version 1.12.0 / v1.12.0-26-g390e945)
20:13:05 INFO opendrift.models.openoil.adios.dirjs:86: Querying ADIOS database for oil: TIA JUANA HEAVY
20:13:05 INFO opendrift.models.openoil.openoil:1715: Using density 984.522528 and viscosity 0.09085889807834076 of oiltype TIA JUANA HEAVY
20:13:05 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...
20:13:09 INFO opendrift.models.basemodel.environment:245: Fallback values will be used for the following variables which have no readers:
20:13:09 INFO opendrift.models.basemodel.environment:248: x_sea_water_velocity: -0.200000
20:13:09 INFO opendrift.models.basemodel.environment:248: y_sea_water_velocity: 0.000000
20:13:09 INFO opendrift.models.basemodel.environment:248: x_wind: 10.000000
20:13:09 INFO opendrift.models.basemodel.environment:248: y_wind: 0.000000
20:13:09 INFO opendrift.models.basemodel.environment:248: sea_surface_height: 0.000000
20:13:09 INFO opendrift.models.basemodel.environment:248: upward_sea_water_velocity: 0.000000
20:13:09 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_significant_height: 0.000000
20:13:09 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_stokes_drift_x_velocity: 0.300000
20:13:09 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_stokes_drift_y_velocity: 0.000000
20:13:09 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_period_at_variance_spectral_density_maximum: 0.000000
20:13:09 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment: 0.000000
20:13:09 INFO opendrift.models.basemodel.environment:248: sea_ice_area_fraction: 0.000000
20:13:09 INFO opendrift.models.basemodel.environment:248: sea_ice_x_velocity: 0.000000
20:13:09 INFO opendrift.models.basemodel.environment:248: sea_ice_y_velocity: 0.000000
20:13:09 INFO opendrift.models.basemodel.environment:248: sea_water_temperature: 10.000000
20:13:09 INFO opendrift.models.basemodel.environment:248: sea_water_salinity: 34.000000
20:13:09 INFO opendrift.models.basemodel.environment:248: sea_floor_depth_below_sea_level: 10000.000000
20:13:09 INFO opendrift.models.basemodel.environment:248: ocean_vertical_diffusivity: 0.020000
20:13:09 INFO opendrift.models.basemodel.environment:248: ocean_mixed_layer_thickness: 50.000000
20:13:09 INFO opendrift.models.basemodel:935: Using existing reader for land_binary_mask
20:13:09 INFO opendrift.models.basemodel:946: All points are in ocean
20:13:09 INFO opendrift.models.openoil.openoil:684: Oil-water surface tension is 0.035893 Nm
20:13:09 INFO opendrift.models.openoil.openoil:697: Max water fraction not available for TIA JUANA HEAVY, using default
20:13:09 INFO opendrift.models.basemodel:2035: 2024-12-12 20:13:05.921816 - step 1 of 48 - 1000 active elements (0 deactivated)
20:13:09 INFO opendrift.models.basemodel:2035: 2024-12-12 20:28:05.921816 - step 2 of 48 - 1000 active elements (0 deactivated)
20:13:09 INFO opendrift.models.basemodel:2035: 2024-12-12 20:43:05.921816 - step 3 of 48 - 1000 active elements (0 deactivated)
20:13:09 INFO opendrift.models.basemodel:2035: 2024-12-12 20:58:05.921816 - step 4 of 48 - 1000 active elements (0 deactivated)
20:13:09 INFO opendrift.models.basemodel:2035: 2024-12-12 21:13:05.921816 - step 5 of 48 - 1000 active elements (0 deactivated)
20:13:09 INFO opendrift.models.basemodel:2035: 2024-12-12 21:28:05.921816 - step 6 of 48 - 1000 active elements (0 deactivated)
20:13:09 INFO opendrift.models.basemodel:2035: 2024-12-12 21:43:05.921816 - step 7 of 48 - 1000 active elements (0 deactivated)
20:13:09 INFO opendrift.models.basemodel:2035: 2024-12-12 21:58:05.921816 - step 8 of 48 - 1000 active elements (0 deactivated)
20:13:09 INFO opendrift.models.basemodel:2035: 2024-12-12 22:13:05.921816 - step 9 of 48 - 1000 active elements (0 deactivated)
20:13:09 INFO opendrift.models.basemodel:2035: 2024-12-12 22:28:05.921816 - step 10 of 48 - 1000 active elements (0 deactivated)
20:13:10 INFO opendrift.models.basemodel:2035: 2024-12-12 22:43:05.921816 - step 11 of 48 - 1000 active elements (0 deactivated)
20:13:10 INFO opendrift.models.basemodel:2035: 2024-12-12 22:58:05.921816 - step 12 of 48 - 1000 active elements (0 deactivated)
20:13:10 INFO opendrift.models.basemodel:2035: 2024-12-12 23:13:05.921816 - step 13 of 48 - 1000 active elements (0 deactivated)
20:13:10 INFO opendrift.models.basemodel:2035: 2024-12-12 23:28:05.921816 - step 14 of 48 - 1000 active elements (0 deactivated)
20:13:10 INFO opendrift.models.basemodel:2035: 2024-12-12 23:43:05.921816 - step 15 of 48 - 1000 active elements (0 deactivated)
20:13:10 INFO opendrift.models.basemodel:2035: 2024-12-12 23:58:05.921816 - step 16 of 48 - 1000 active elements (0 deactivated)
20:13:10 INFO opendrift.models.basemodel:2035: 2024-12-13 00:13:05.921816 - step 17 of 48 - 1000 active elements (0 deactivated)
20:13:10 INFO opendrift.models.basemodel:2035: 2024-12-13 00:28:05.921816 - step 18 of 48 - 1000 active elements (0 deactivated)
20:13:10 INFO opendrift.models.basemodel:2035: 2024-12-13 00:43:05.921816 - step 19 of 48 - 1000 active elements (0 deactivated)
20:13:10 INFO opendrift.models.basemodel:2035: 2024-12-13 00:58:05.921816 - step 20 of 48 - 1000 active elements (0 deactivated)
20:13:10 INFO opendrift.models.basemodel:2035: 2024-12-13 01:13:05.921816 - step 21 of 48 - 1000 active elements (0 deactivated)
20:13:10 INFO opendrift.models.basemodel:2035: 2024-12-13 01:28:05.921816 - step 22 of 48 - 1000 active elements (0 deactivated)
20:13:10 INFO opendrift.models.basemodel:2035: 2024-12-13 01:43:05.921816 - step 23 of 48 - 1000 active elements (0 deactivated)
20:13:10 INFO opendrift.models.basemodel:2035: 2024-12-13 01:58:05.921816 - step 24 of 48 - 1000 active elements (0 deactivated)
20:13:10 INFO opendrift.models.basemodel:2035: 2024-12-13 02:13:05.921816 - step 25 of 48 - 1000 active elements (0 deactivated)
20:13:10 INFO opendrift.models.basemodel:2035: 2024-12-13 02:28:05.921816 - step 26 of 48 - 1000 active elements (0 deactivated)
20:13:10 INFO opendrift.models.basemodel:2035: 2024-12-13 02:43:05.921816 - step 27 of 48 - 1000 active elements (0 deactivated)
20:13:10 INFO opendrift.models.basemodel:2035: 2024-12-13 02:58:05.921816 - step 28 of 48 - 1000 active elements (0 deactivated)
20:13:10 INFO opendrift.models.basemodel:2035: 2024-12-13 03:13:05.921816 - step 29 of 48 - 1000 active elements (0 deactivated)
20:13:11 INFO opendrift.models.basemodel:2035: 2024-12-13 03:28:05.921816 - step 30 of 48 - 1000 active elements (0 deactivated)
20:13:11 INFO opendrift.models.basemodel:2035: 2024-12-13 03:43:05.921816 - step 31 of 48 - 1000 active elements (0 deactivated)
20:13:11 INFO opendrift.models.basemodel:2035: 2024-12-13 03:58:05.921816 - step 32 of 48 - 1000 active elements (0 deactivated)
20:13:11 INFO opendrift.models.basemodel:2035: 2024-12-13 04:13:05.921816 - step 33 of 48 - 1000 active elements (0 deactivated)
20:13:11 INFO opendrift.models.basemodel:2035: 2024-12-13 04:28:05.921816 - step 34 of 48 - 1000 active elements (0 deactivated)
20:13:11 INFO opendrift.models.basemodel:2035: 2024-12-13 04:43:05.921816 - step 35 of 48 - 1000 active elements (0 deactivated)
20:13:11 INFO opendrift.models.basemodel:2035: 2024-12-13 04:58:05.921816 - step 36 of 48 - 1000 active elements (0 deactivated)
20:13:11 INFO opendrift.models.basemodel:2035: 2024-12-13 05:13:05.921816 - step 37 of 48 - 1000 active elements (0 deactivated)
20:13:11 INFO opendrift.models.basemodel:2035: 2024-12-13 05:28:05.921816 - step 38 of 48 - 1000 active elements (0 deactivated)
20:13:11 INFO opendrift.models.basemodel:2035: 2024-12-13 05:43:05.921816 - step 39 of 48 - 1000 active elements (0 deactivated)
20:13:11 INFO opendrift.models.basemodel:2035: 2024-12-13 05:58:05.921816 - step 40 of 48 - 1000 active elements (0 deactivated)
20:13:11 INFO opendrift.models.basemodel:2035: 2024-12-13 06:13:05.921816 - step 41 of 48 - 1000 active elements (0 deactivated)
20:13:11 INFO opendrift.models.basemodel:2035: 2024-12-13 06:28:05.921816 - step 42 of 48 - 1000 active elements (0 deactivated)
20:13:11 INFO opendrift.models.basemodel:2035: 2024-12-13 06:43:05.921816 - step 43 of 48 - 1000 active elements (0 deactivated)
20:13:11 INFO opendrift.models.basemodel:2035: 2024-12-13 06:58:05.921816 - step 44 of 48 - 1000 active elements (0 deactivated)
20:13:11 INFO opendrift.models.basemodel:2035: 2024-12-13 07:13:05.921816 - step 45 of 48 - 1000 active elements (0 deactivated)
20:13:11 INFO opendrift.models.basemodel:2035: 2024-12-13 07:28:05.921816 - step 46 of 48 - 1000 active elements (0 deactivated)
20:13:11 INFO opendrift.models.basemodel:2035: 2024-12-13 07:43:05.921816 - step 47 of 48 - 1000 active elements (0 deactivated)
20:13:11 INFO opendrift.models.basemodel:2035: 2024-12-13 07:58:05.921816 - step 48 of 48 - 1000 active elements (0 deactivated)
20:13:12 INFO opendrift.models.basemodel:515: OpenDriftSimulation initialised (version 1.12.0 / v1.12.0-26-g390e945)
20:13:12 INFO opendrift.models.openoil.adios.dirjs:86: Querying ADIOS database for oil: TIA JUANA LIGHT
20:13:12 WARNING opendrift.models.openoil.adios.dirjs:90: Several oils found with name: TIA JUANA LIGHT: ['AD01094', 'AD01490', 'AD02371'], using first.
20:13:12 INFO opendrift.models.openoil.openoil:1715: Using density 866.282844 and viscosity 2.4802709645439323e-05 of oiltype TIA JUANA LIGHT
20:13:12 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...
20:13:12 INFO opendrift.models.basemodel.environment:245: Fallback values will be used for the following variables which have no readers:
20:13:12 INFO opendrift.models.basemodel.environment:248: x_sea_water_velocity: -0.200000
20:13:12 INFO opendrift.models.basemodel.environment:248: y_sea_water_velocity: 0.000000
20:13:12 INFO opendrift.models.basemodel.environment:248: x_wind: 10.000000
20:13:12 INFO opendrift.models.basemodel.environment:248: y_wind: 0.000000
20:13:12 INFO opendrift.models.basemodel.environment:248: sea_surface_height: 0.000000
20:13:12 INFO opendrift.models.basemodel.environment:248: upward_sea_water_velocity: 0.000000
20:13:12 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_significant_height: 0.000000
20:13:12 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_stokes_drift_x_velocity: 0.300000
20:13:12 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_stokes_drift_y_velocity: 0.000000
20:13:12 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_period_at_variance_spectral_density_maximum: 0.000000
20:13:12 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment: 0.000000
20:13:12 INFO opendrift.models.basemodel.environment:248: sea_ice_area_fraction: 0.000000
20:13:12 INFO opendrift.models.basemodel.environment:248: sea_ice_x_velocity: 0.000000
20:13:12 INFO opendrift.models.basemodel.environment:248: sea_ice_y_velocity: 0.000000
20:13:12 INFO opendrift.models.basemodel.environment:248: sea_water_temperature: 10.000000
20:13:12 INFO opendrift.models.basemodel.environment:248: sea_water_salinity: 34.000000
20:13:12 INFO opendrift.models.basemodel.environment:248: sea_floor_depth_below_sea_level: 10000.000000
20:13:12 INFO opendrift.models.basemodel.environment:248: ocean_vertical_diffusivity: 0.020000
20:13:12 INFO opendrift.models.basemodel.environment:248: ocean_mixed_layer_thickness: 50.000000
20:13:12 INFO opendrift.models.basemodel:935: Using existing reader for land_binary_mask
20:13:12 INFO opendrift.models.basemodel:946: All points are in ocean
20:13:12 INFO opendrift.models.openoil.openoil:684: Oil-water surface tension is 0.030855 Nm
20:13:12 INFO opendrift.models.openoil.openoil:697: Max water fraction not available for TIA JUANA LIGHT, using default
20:13:12 INFO opendrift.models.basemodel:2035: 2024-12-12 20:13:12.114364 - step 1 of 48 - 1000 active elements (0 deactivated)
20:13:12 INFO opendrift.models.basemodel:2035: 2024-12-12 20:28:12.114364 - step 2 of 48 - 1000 active elements (0 deactivated)
20:13:12 INFO opendrift.models.basemodel:2035: 2024-12-12 20:43:12.114364 - step 3 of 48 - 1000 active elements (0 deactivated)
20:13:12 INFO opendrift.models.basemodel:2035: 2024-12-12 20:58:12.114364 - step 4 of 48 - 1000 active elements (0 deactivated)
20:13:12 INFO opendrift.models.basemodel:2035: 2024-12-12 21:13:12.114364 - step 5 of 48 - 1000 active elements (0 deactivated)
20:13:12 INFO opendrift.models.basemodel:2035: 2024-12-12 21:28:12.114364 - step 6 of 48 - 1000 active elements (0 deactivated)
20:13:12 INFO opendrift.models.basemodel:2035: 2024-12-12 21:43:12.114364 - step 7 of 48 - 1000 active elements (0 deactivated)
20:13:12 INFO opendrift.models.basemodel:2035: 2024-12-12 21:58:12.114364 - step 8 of 48 - 1000 active elements (0 deactivated)
20:13:12 INFO opendrift.models.basemodel:2035: 2024-12-12 22:13:12.114364 - step 9 of 48 - 1000 active elements (0 deactivated)
20:13:12 INFO opendrift.models.basemodel:2035: 2024-12-12 22:28:12.114364 - step 10 of 48 - 1000 active elements (0 deactivated)
20:13:12 INFO opendrift.models.basemodel:2035: 2024-12-12 22:43:12.114364 - step 11 of 48 - 1000 active elements (0 deactivated)
20:13:12 INFO opendrift.models.basemodel:2035: 2024-12-12 22:58:12.114364 - step 12 of 48 - 1000 active elements (0 deactivated)
20:13:12 INFO opendrift.models.basemodel:2035: 2024-12-12 23:13:12.114364 - step 13 of 48 - 1000 active elements (0 deactivated)
20:13:12 INFO opendrift.models.basemodel:2035: 2024-12-12 23:28:12.114364 - step 14 of 48 - 1000 active elements (0 deactivated)
20:13:12 INFO opendrift.models.basemodel:2035: 2024-12-12 23:43:12.114364 - step 15 of 48 - 1000 active elements (0 deactivated)
20:13:12 INFO opendrift.models.basemodel:2035: 2024-12-12 23:58:12.114364 - step 16 of 48 - 1000 active elements (0 deactivated)
20:13:12 INFO opendrift.models.basemodel:2035: 2024-12-13 00:13:12.114364 - step 17 of 48 - 1000 active elements (0 deactivated)
20:13:13 INFO opendrift.models.basemodel:2035: 2024-12-13 00:28:12.114364 - step 18 of 48 - 1000 active elements (0 deactivated)
20:13:13 INFO opendrift.models.basemodel:2035: 2024-12-13 00:43:12.114364 - step 19 of 48 - 1000 active elements (0 deactivated)
20:13:13 INFO opendrift.models.basemodel:2035: 2024-12-13 00:58:12.114364 - step 20 of 48 - 1000 active elements (0 deactivated)
20:13:13 INFO opendrift.models.basemodel:2035: 2024-12-13 01:13:12.114364 - step 21 of 48 - 1000 active elements (0 deactivated)
20:13:13 INFO opendrift.models.basemodel:2035: 2024-12-13 01:28:12.114364 - step 22 of 48 - 1000 active elements (0 deactivated)
20:13:13 INFO opendrift.models.basemodel:2035: 2024-12-13 01:43:12.114364 - step 23 of 48 - 1000 active elements (0 deactivated)
20:13:13 INFO opendrift.models.basemodel:2035: 2024-12-13 01:58:12.114364 - step 24 of 48 - 1000 active elements (0 deactivated)
20:13:13 INFO opendrift.models.basemodel:2035: 2024-12-13 02:13:12.114364 - step 25 of 48 - 1000 active elements (0 deactivated)
20:13:13 INFO opendrift.models.basemodel:2035: 2024-12-13 02:28:12.114364 - step 26 of 48 - 1000 active elements (0 deactivated)
20:13:13 INFO opendrift.models.basemodel:2035: 2024-12-13 02:43:12.114364 - step 27 of 48 - 1000 active elements (0 deactivated)
20:13:13 INFO opendrift.models.basemodel:2035: 2024-12-13 02:58:12.114364 - step 28 of 48 - 1000 active elements (0 deactivated)
20:13:13 INFO opendrift.models.basemodel:2035: 2024-12-13 03:13:12.114364 - step 29 of 48 - 1000 active elements (0 deactivated)
20:13:13 INFO opendrift.models.basemodel:2035: 2024-12-13 03:28:12.114364 - step 30 of 48 - 1000 active elements (0 deactivated)
20:13:13 INFO opendrift.models.basemodel:2035: 2024-12-13 03:43:12.114364 - step 31 of 48 - 1000 active elements (0 deactivated)
20:13:13 INFO opendrift.models.basemodel:2035: 2024-12-13 03:58:12.114364 - step 32 of 48 - 1000 active elements (0 deactivated)
20:13:13 INFO opendrift.models.basemodel:2035: 2024-12-13 04:13:12.114364 - step 33 of 48 - 1000 active elements (0 deactivated)
20:13:13 INFO opendrift.models.basemodel:2035: 2024-12-13 04:28:12.114364 - step 34 of 48 - 1000 active elements (0 deactivated)
20:13:13 INFO opendrift.models.basemodel:2035: 2024-12-13 04:43:12.114364 - step 35 of 48 - 1000 active elements (0 deactivated)
20:13:13 INFO opendrift.models.basemodel:2035: 2024-12-13 04:58:12.114364 - step 36 of 48 - 1000 active elements (0 deactivated)
20:13:13 INFO opendrift.models.basemodel:2035: 2024-12-13 05:13:12.114364 - step 37 of 48 - 1000 active elements (0 deactivated)
20:13:14 INFO opendrift.models.basemodel:2035: 2024-12-13 05:28:12.114364 - step 38 of 48 - 1000 active elements (0 deactivated)
20:13:14 INFO opendrift.models.basemodel:2035: 2024-12-13 05:43:12.114364 - step 39 of 48 - 1000 active elements (0 deactivated)
20:13:14 INFO opendrift.models.basemodel:2035: 2024-12-13 05:58:12.114364 - step 40 of 48 - 1000 active elements (0 deactivated)
20:13:14 INFO opendrift.models.basemodel:2035: 2024-12-13 06:13:12.114364 - step 41 of 48 - 1000 active elements (0 deactivated)
20:13:14 INFO opendrift.models.basemodel:2035: 2024-12-13 06:28:12.114364 - step 42 of 48 - 1000 active elements (0 deactivated)
20:13:14 INFO opendrift.models.basemodel:2035: 2024-12-13 06:43:12.114364 - step 43 of 48 - 1000 active elements (0 deactivated)
20:13:14 INFO opendrift.models.basemodel:2035: 2024-12-13 06:58:12.114364 - step 44 of 48 - 1000 active elements (0 deactivated)
20:13:14 INFO opendrift.models.basemodel:2035: 2024-12-13 07:13:12.114364 - step 45 of 48 - 1000 active elements (0 deactivated)
20:13:14 INFO opendrift.models.basemodel:2035: 2024-12-13 07:28:12.114364 - step 46 of 48 - 1000 active elements (0 deactivated)
20:13:14 INFO opendrift.models.basemodel:2035: 2024-12-13 07:43:12.114364 - step 47 of 48 - 1000 active elements (0 deactivated)
20:13:14 INFO opendrift.models.basemodel:2035: 2024-12-13 07:58:12.114364 - 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)
#######################
Entrainment rate (heavy) 7.616886510893851e-06
Entrainment rate (light) 0.008958756179169351
Viscosity (heavy) 0.10977541655302048
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)
20:13:15 INFO opendrift.models.basemodel:4613: Saving animation to /root/project/docs/source/gallery/animations/example_entrainment_rate_oil_types_0.gif...
20:13:16 INFO opendrift.models.basemodel:3251: Time to make animation: 0:00:01.634964
o2.animation(compare=o3, legend=legend, fast=True)
20:13:17 WARNING opendrift.models.basemodel:2410: Plotting fast. This will make your plots less accurate.
/opt/conda/envs/opendrift/lib/python3.11/site-packages/cartopy/mpl/geoaxes.py:1692: UserWarning: No data for colormapping provided via 'c'. Parameters 'cmap' will be ignored
result = super().scatter(*args, **kwargs)
20:13:19 INFO opendrift.models.basemodel:4613: Saving animation to /root/project/docs/source/gallery/animations/example_entrainment_rate_oil_types_1.gif...
20:13:26 INFO opendrift.models.basemodel:3037: Time to make animation: 0:00:08.946145
Total running time of the script: (0 minutes 24.939 seconds)