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)
12:53:57 INFO opendrift.models.basemodel:515: OpenDriftSimulation initialised (version 1.11.13 / v1.11.13-99-gd2132d3)
12:53:57 INFO opendrift.models.openoil.adios.dirjs:90: Querying ADIOS database for oil: TIA JUANA HEAVY
12:53:57 INFO opendrift.models.openoil.openoil:1719: Using density 984.522528 and viscosity 0.007112218477811797 of oiltype TIA JUANA HEAVY
12:53:57 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...
12:54:02 INFO opendrift.models.basemodel.environment:245: Fallback values will be used for the following variables which have no readers:
12:54:02 INFO opendrift.models.basemodel.environment:248: x_sea_water_velocity: -0.200000
12:54:02 INFO opendrift.models.basemodel.environment:248: y_sea_water_velocity: 0.000000
12:54:02 INFO opendrift.models.basemodel.environment:248: x_wind: 10.000000
12:54:02 INFO opendrift.models.basemodel.environment:248: y_wind: 0.000000
12:54:02 INFO opendrift.models.basemodel.environment:248: sea_surface_height: 0.000000
12:54:02 INFO opendrift.models.basemodel.environment:248: upward_sea_water_velocity: 0.000000
12:54:02 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_significant_height: 0.000000
12:54:02 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_stokes_drift_x_velocity: 0.300000
12:54:02 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_stokes_drift_y_velocity: 0.000000
12:54:02 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_period_at_variance_spectral_density_maximum: 0.000000
12:54:02 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment: 0.000000
12:54:02 INFO opendrift.models.basemodel.environment:248: sea_ice_area_fraction: 0.000000
12:54:02 INFO opendrift.models.basemodel.environment:248: sea_ice_x_velocity: 0.000000
12:54:02 INFO opendrift.models.basemodel.environment:248: sea_ice_y_velocity: 0.000000
12:54:02 INFO opendrift.models.basemodel.environment:248: sea_water_temperature: 10.000000
12:54:02 INFO opendrift.models.basemodel.environment:248: sea_water_salinity: 34.000000
12:54:02 INFO opendrift.models.basemodel.environment:248: sea_floor_depth_below_sea_level: 10000.000000
12:54:02 INFO opendrift.models.basemodel.environment:248: ocean_vertical_diffusivity: 0.020000
12:54:02 INFO opendrift.models.basemodel.environment:248: ocean_mixed_layer_thickness: 50.000000
12:54:02 INFO opendrift.models.basemodel:936: Using existing reader for land_binary_mask
12:54:02 INFO opendrift.models.basemodel:947: All points are in ocean
12:54:02 INFO opendrift.models.openoil.openoil:687: Oil-water surface tension is 0.035893 Nm
12:54:02 INFO opendrift.models.openoil.openoil:700: Max water fraction not available for TIA JUANA HEAVY, using default
12:54:02 INFO opendrift.models.basemodel:2038: 2024-11-11 12:53:57.899697 - step 1 of 48 - 1000 active elements (0 deactivated)
12:54:02 INFO opendrift.models.basemodel:2038: 2024-11-11 13:08:57.899697 - step 2 of 48 - 1000 active elements (0 deactivated)
12:54:02 INFO opendrift.models.basemodel:2038: 2024-11-11 13:23:57.899697 - step 3 of 48 - 1000 active elements (0 deactivated)
12:54:02 INFO opendrift.models.basemodel:2038: 2024-11-11 13:38:57.899697 - step 4 of 48 - 1000 active elements (0 deactivated)
12:54:02 INFO opendrift.models.basemodel:2038: 2024-11-11 13:53:57.899697 - step 5 of 48 - 1000 active elements (0 deactivated)
12:54:02 INFO opendrift.models.basemodel:2038: 2024-11-11 14:08:57.899697 - step 6 of 48 - 1000 active elements (0 deactivated)
12:54:03 INFO opendrift.models.basemodel:2038: 2024-11-11 14:23:57.899697 - step 7 of 48 - 1000 active elements (0 deactivated)
12:54:03 INFO opendrift.models.basemodel:2038: 2024-11-11 14:38:57.899697 - step 8 of 48 - 1000 active elements (0 deactivated)
12:54:03 INFO opendrift.models.basemodel:2038: 2024-11-11 14:53:57.899697 - step 9 of 48 - 1000 active elements (0 deactivated)
12:54:03 INFO opendrift.models.basemodel:2038: 2024-11-11 15:08:57.899697 - step 10 of 48 - 1000 active elements (0 deactivated)
12:54:03 INFO opendrift.models.basemodel:2038: 2024-11-11 15:23:57.899697 - step 11 of 48 - 1000 active elements (0 deactivated)
12:54:03 INFO opendrift.models.basemodel:2038: 2024-11-11 15:38:57.899697 - step 12 of 48 - 1000 active elements (0 deactivated)
12:54:03 INFO opendrift.models.basemodel:2038: 2024-11-11 15:53:57.899697 - step 13 of 48 - 1000 active elements (0 deactivated)
12:54:03 INFO opendrift.models.basemodel:2038: 2024-11-11 16:08:57.899697 - step 14 of 48 - 1000 active elements (0 deactivated)
12:54:03 INFO opendrift.models.basemodel:2038: 2024-11-11 16:23:57.899697 - step 15 of 48 - 1000 active elements (0 deactivated)
12:54:03 INFO opendrift.models.basemodel:2038: 2024-11-11 16:38:57.899697 - step 16 of 48 - 1000 active elements (0 deactivated)
12:54:03 INFO opendrift.models.basemodel:2038: 2024-11-11 16:53:57.899697 - step 17 of 48 - 1000 active elements (0 deactivated)
12:54:03 INFO opendrift.models.basemodel:2038: 2024-11-11 17:08:57.899697 - step 18 of 48 - 1000 active elements (0 deactivated)
12:54:03 INFO opendrift.models.basemodel:2038: 2024-11-11 17:23:57.899697 - step 19 of 48 - 1000 active elements (0 deactivated)
12:54:03 INFO opendrift.models.basemodel:2038: 2024-11-11 17:38:57.899697 - step 20 of 48 - 1000 active elements (0 deactivated)
12:54:03 INFO opendrift.models.basemodel:2038: 2024-11-11 17:53:57.899697 - step 21 of 48 - 1000 active elements (0 deactivated)
12:54:03 INFO opendrift.models.basemodel:2038: 2024-11-11 18:08:57.899697 - step 22 of 48 - 1000 active elements (0 deactivated)
12:54:03 INFO opendrift.models.basemodel:2038: 2024-11-11 18:23:57.899697 - step 23 of 48 - 1000 active elements (0 deactivated)
12:54:04 INFO opendrift.models.basemodel:2038: 2024-11-11 18:38:57.899697 - step 24 of 48 - 1000 active elements (0 deactivated)
12:54:04 INFO opendrift.models.basemodel:2038: 2024-11-11 18:53:57.899697 - step 25 of 48 - 1000 active elements (0 deactivated)
12:54:04 INFO opendrift.models.basemodel:2038: 2024-11-11 19:08:57.899697 - step 26 of 48 - 1000 active elements (0 deactivated)
12:54:04 INFO opendrift.models.basemodel:2038: 2024-11-11 19:23:57.899697 - step 27 of 48 - 1000 active elements (0 deactivated)
12:54:04 INFO opendrift.models.basemodel:2038: 2024-11-11 19:38:57.899697 - step 28 of 48 - 1000 active elements (0 deactivated)
12:54:04 INFO opendrift.models.basemodel:2038: 2024-11-11 19:53:57.899697 - step 29 of 48 - 1000 active elements (0 deactivated)
12:54:04 INFO opendrift.models.basemodel:2038: 2024-11-11 20:08:57.899697 - step 30 of 48 - 1000 active elements (0 deactivated)
12:54:04 INFO opendrift.models.basemodel:2038: 2024-11-11 20:23:57.899697 - step 31 of 48 - 1000 active elements (0 deactivated)
12:54:04 INFO opendrift.models.basemodel:2038: 2024-11-11 20:38:57.899697 - step 32 of 48 - 1000 active elements (0 deactivated)
12:54:04 INFO opendrift.models.basemodel:2038: 2024-11-11 20:53:57.899697 - step 33 of 48 - 1000 active elements (0 deactivated)
12:54:04 INFO opendrift.models.basemodel:2038: 2024-11-11 21:08:57.899697 - step 34 of 48 - 1000 active elements (0 deactivated)
12:54:04 INFO opendrift.models.basemodel:2038: 2024-11-11 21:23:57.899697 - step 35 of 48 - 1000 active elements (0 deactivated)
12:54:04 INFO opendrift.models.basemodel:2038: 2024-11-11 21:38:57.899697 - step 36 of 48 - 1000 active elements (0 deactivated)
12:54:04 INFO opendrift.models.basemodel:2038: 2024-11-11 21:53:57.899697 - step 37 of 48 - 1000 active elements (0 deactivated)
12:54:04 INFO opendrift.models.basemodel:2038: 2024-11-11 22:08:57.899697 - step 38 of 48 - 1000 active elements (0 deactivated)
12:54:04 INFO opendrift.models.basemodel:2038: 2024-11-11 22:23:57.899697 - step 39 of 48 - 1000 active elements (0 deactivated)
12:54:05 INFO opendrift.models.basemodel:2038: 2024-11-11 22:38:57.899697 - step 40 of 48 - 1000 active elements (0 deactivated)
12:54:05 INFO opendrift.models.basemodel:2038: 2024-11-11 22:53:57.899697 - step 41 of 48 - 1000 active elements (0 deactivated)
12:54:05 INFO opendrift.models.basemodel:2038: 2024-11-11 23:08:57.899697 - step 42 of 48 - 1000 active elements (0 deactivated)
12:54:05 INFO opendrift.models.basemodel:2038: 2024-11-11 23:23:57.899697 - step 43 of 48 - 1000 active elements (0 deactivated)
12:54:05 INFO opendrift.models.basemodel:2038: 2024-11-11 23:38:57.899697 - step 44 of 48 - 1000 active elements (0 deactivated)
12:54:05 INFO opendrift.models.basemodel:2038: 2024-11-11 23:53:57.899697 - step 45 of 48 - 1000 active elements (0 deactivated)
12:54:05 INFO opendrift.models.basemodel:2038: 2024-11-12 00:08:57.899697 - step 46 of 48 - 1000 active elements (0 deactivated)
12:54:05 INFO opendrift.models.basemodel:2038: 2024-11-12 00:23:57.899697 - step 47 of 48 - 1000 active elements (0 deactivated)
12:54:05 INFO opendrift.models.basemodel:2038: 2024-11-12 00:38:57.899697 - step 48 of 48 - 1000 active elements (0 deactivated)
12:54:05 INFO opendrift.models.basemodel:515: OpenDriftSimulation initialised (version 1.11.13 / v1.11.13-99-gd2132d3)
12:54:05 INFO opendrift.models.openoil.adios.dirjs:90: Querying ADIOS database for oil: TIA JUANA LIGHT
12:54:05 WARNING opendrift.models.openoil.adios.dirjs:94: Several oils found with name: TIA JUANA LIGHT: ['AD01094', 'AD01490', 'AD02371'], using first.
12:54:05 INFO opendrift.models.openoil.openoil:1719: Using density 866.282844 and viscosity 2.4802709645439323e-05 of oiltype TIA JUANA LIGHT
12:54: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...
12:54:05 INFO opendrift.models.basemodel.environment:245: Fallback values will be used for the following variables which have no readers:
12:54:05 INFO opendrift.models.basemodel.environment:248: x_sea_water_velocity: -0.200000
12:54:05 INFO opendrift.models.basemodel.environment:248: y_sea_water_velocity: 0.000000
12:54:05 INFO opendrift.models.basemodel.environment:248: x_wind: 10.000000
12:54:05 INFO opendrift.models.basemodel.environment:248: y_wind: 0.000000
12:54:05 INFO opendrift.models.basemodel.environment:248: sea_surface_height: 0.000000
12:54:05 INFO opendrift.models.basemodel.environment:248: upward_sea_water_velocity: 0.000000
12:54:05 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_significant_height: 0.000000
12:54:05 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_stokes_drift_x_velocity: 0.300000
12:54:05 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_stokes_drift_y_velocity: 0.000000
12:54:05 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_period_at_variance_spectral_density_maximum: 0.000000
12:54:05 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment: 0.000000
12:54:05 INFO opendrift.models.basemodel.environment:248: sea_ice_area_fraction: 0.000000
12:54:05 INFO opendrift.models.basemodel.environment:248: sea_ice_x_velocity: 0.000000
12:54:05 INFO opendrift.models.basemodel.environment:248: sea_ice_y_velocity: 0.000000
12:54:05 INFO opendrift.models.basemodel.environment:248: sea_water_temperature: 10.000000
12:54:05 INFO opendrift.models.basemodel.environment:248: sea_water_salinity: 34.000000
12:54:05 INFO opendrift.models.basemodel.environment:248: sea_floor_depth_below_sea_level: 10000.000000
12:54:05 INFO opendrift.models.basemodel.environment:248: ocean_vertical_diffusivity: 0.020000
12:54:05 INFO opendrift.models.basemodel.environment:248: ocean_mixed_layer_thickness: 50.000000
12:54:05 INFO opendrift.models.basemodel:936: Using existing reader for land_binary_mask
12:54:05 INFO opendrift.models.basemodel:947: All points are in ocean
12:54:05 INFO opendrift.models.openoil.openoil:687: Oil-water surface tension is 0.030855 Nm
12:54:05 INFO opendrift.models.openoil.openoil:700: Max water fraction not available for TIA JUANA LIGHT, using default
12:54:05 INFO opendrift.models.basemodel:2038: 2024-11-11 12:54:05.732571 - step 1 of 48 - 1000 active elements (0 deactivated)
12:54:05 INFO opendrift.models.basemodel:2038: 2024-11-11 13:09:05.732571 - step 2 of 48 - 1000 active elements (0 deactivated)
12:54:05 INFO opendrift.models.basemodel:2038: 2024-11-11 13:24:05.732571 - step 3 of 48 - 1000 active elements (0 deactivated)
12:54:05 INFO opendrift.models.basemodel:2038: 2024-11-11 13:39:05.732571 - step 4 of 48 - 1000 active elements (0 deactivated)
12:54:06 INFO opendrift.models.basemodel:2038: 2024-11-11 13:54:05.732571 - step 5 of 48 - 1000 active elements (0 deactivated)
12:54:06 INFO opendrift.models.basemodel:2038: 2024-11-11 14:09:05.732571 - step 6 of 48 - 1000 active elements (0 deactivated)
12:54:06 INFO opendrift.models.basemodel:2038: 2024-11-11 14:24:05.732571 - step 7 of 48 - 1000 active elements (0 deactivated)
12:54:06 INFO opendrift.models.basemodel:2038: 2024-11-11 14:39:05.732571 - step 8 of 48 - 1000 active elements (0 deactivated)
12:54:06 INFO opendrift.models.basemodel:2038: 2024-11-11 14:54:05.732571 - step 9 of 48 - 1000 active elements (0 deactivated)
12:54:06 INFO opendrift.models.basemodel:2038: 2024-11-11 15:09:05.732571 - step 10 of 48 - 1000 active elements (0 deactivated)
12:54:06 INFO opendrift.models.basemodel:2038: 2024-11-11 15:24:05.732571 - step 11 of 48 - 1000 active elements (0 deactivated)
12:54:06 INFO opendrift.models.basemodel:2038: 2024-11-11 15:39:05.732571 - step 12 of 48 - 1000 active elements (0 deactivated)
12:54:06 INFO opendrift.models.basemodel:2038: 2024-11-11 15:54:05.732571 - step 13 of 48 - 1000 active elements (0 deactivated)
12:54:06 INFO opendrift.models.basemodel:2038: 2024-11-11 16:09:05.732571 - step 14 of 48 - 1000 active elements (0 deactivated)
12:54:06 INFO opendrift.models.basemodel:2038: 2024-11-11 16:24:05.732571 - step 15 of 48 - 1000 active elements (0 deactivated)
12:54:06 INFO opendrift.models.basemodel:2038: 2024-11-11 16:39:05.732571 - step 16 of 48 - 1000 active elements (0 deactivated)
12:54:06 INFO opendrift.models.basemodel:2038: 2024-11-11 16:54:05.732571 - step 17 of 48 - 1000 active elements (0 deactivated)
12:54:06 INFO opendrift.models.basemodel:2038: 2024-11-11 17:09:05.732571 - step 18 of 48 - 1000 active elements (0 deactivated)
12:54:06 INFO opendrift.models.basemodel:2038: 2024-11-11 17:24:05.732571 - step 19 of 48 - 1000 active elements (0 deactivated)
12:54:06 INFO opendrift.models.basemodel:2038: 2024-11-11 17:39:05.732571 - step 20 of 48 - 1000 active elements (0 deactivated)
12:54:06 INFO opendrift.models.basemodel:2038: 2024-11-11 17:54:05.732571 - step 21 of 48 - 1000 active elements (0 deactivated)
12:54:07 INFO opendrift.models.basemodel:2038: 2024-11-11 18:09:05.732571 - step 22 of 48 - 1000 active elements (0 deactivated)
12:54:07 INFO opendrift.models.basemodel:2038: 2024-11-11 18:24:05.732571 - step 23 of 48 - 1000 active elements (0 deactivated)
12:54:07 INFO opendrift.models.basemodel:2038: 2024-11-11 18:39:05.732571 - step 24 of 48 - 1000 active elements (0 deactivated)
12:54:07 INFO opendrift.models.basemodel:2038: 2024-11-11 18:54:05.732571 - step 25 of 48 - 1000 active elements (0 deactivated)
12:54:07 INFO opendrift.models.basemodel:2038: 2024-11-11 19:09:05.732571 - step 26 of 48 - 1000 active elements (0 deactivated)
12:54:07 INFO opendrift.models.basemodel:2038: 2024-11-11 19:24:05.732571 - step 27 of 48 - 1000 active elements (0 deactivated)
12:54:07 INFO opendrift.models.basemodel:2038: 2024-11-11 19:39:05.732571 - step 28 of 48 - 1000 active elements (0 deactivated)
12:54:07 INFO opendrift.models.basemodel:2038: 2024-11-11 19:54:05.732571 - step 29 of 48 - 1000 active elements (0 deactivated)
12:54:07 INFO opendrift.models.basemodel:2038: 2024-11-11 20:09:05.732571 - step 30 of 48 - 1000 active elements (0 deactivated)
12:54:07 INFO opendrift.models.basemodel:2038: 2024-11-11 20:24:05.732571 - step 31 of 48 - 1000 active elements (0 deactivated)
12:54:07 INFO opendrift.models.basemodel:2038: 2024-11-11 20:39:05.732571 - step 32 of 48 - 1000 active elements (0 deactivated)
12:54:07 INFO opendrift.models.basemodel:2038: 2024-11-11 20:54:05.732571 - step 33 of 48 - 1000 active elements (0 deactivated)
12:54:07 INFO opendrift.models.basemodel:2038: 2024-11-11 21:09:05.732571 - step 34 of 48 - 1000 active elements (0 deactivated)
12:54:07 INFO opendrift.models.basemodel:2038: 2024-11-11 21:24:05.732571 - step 35 of 48 - 1000 active elements (0 deactivated)
12:54:07 INFO opendrift.models.basemodel:2038: 2024-11-11 21:39:05.732571 - step 36 of 48 - 1000 active elements (0 deactivated)
12:54:07 INFO opendrift.models.basemodel:2038: 2024-11-11 21:54:05.732571 - step 37 of 48 - 1000 active elements (0 deactivated)
12:54:08 INFO opendrift.models.basemodel:2038: 2024-11-11 22:09:05.732571 - step 38 of 48 - 1000 active elements (0 deactivated)
12:54:08 INFO opendrift.models.basemodel:2038: 2024-11-11 22:24:05.732571 - step 39 of 48 - 1000 active elements (0 deactivated)
12:54:08 INFO opendrift.models.basemodel:2038: 2024-11-11 22:39:05.732571 - step 40 of 48 - 1000 active elements (0 deactivated)
12:54:08 INFO opendrift.models.basemodel:2038: 2024-11-11 22:54:05.732571 - step 41 of 48 - 1000 active elements (0 deactivated)
12:54:08 INFO opendrift.models.basemodel:2038: 2024-11-11 23:09:05.732571 - step 42 of 48 - 1000 active elements (0 deactivated)
12:54:08 INFO opendrift.models.basemodel:2038: 2024-11-11 23:24:05.732571 - step 43 of 48 - 1000 active elements (0 deactivated)
12:54:08 INFO opendrift.models.basemodel:2038: 2024-11-11 23:39:05.732571 - step 44 of 48 - 1000 active elements (0 deactivated)
12:54:08 INFO opendrift.models.basemodel:2038: 2024-11-11 23:54:05.732571 - step 45 of 48 - 1000 active elements (0 deactivated)
12:54:08 INFO opendrift.models.basemodel:2038: 2024-11-12 00:09:05.732571 - step 46 of 48 - 1000 active elements (0 deactivated)
12:54:08 INFO opendrift.models.basemodel:2038: 2024-11-12 00:24:05.732571 - step 47 of 48 - 1000 active elements (0 deactivated)
12:54:08 INFO opendrift.models.basemodel:2038: 2024-11-12 00:39:05.732571 - 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) 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)
12:54:09 INFO opendrift.models.basemodel:4613: Saving animation to /root/project/docs/source/gallery/animations/example_entrainment_rate_oil_types_0.gif...
12:54:11 INFO opendrift.models.basemodel:3251: Time to make animation: 0:00:01.880471
o2.animation(compare=o3, legend=legend, fast=True)
12:54:12 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:1692: UserWarning: No data for colormapping provided via 'c'. Parameters 'cmap' will be ignored
result = super().scatter(*args, **kwargs)
12:54:14 INFO opendrift.models.basemodel:4613: Saving animation to /root/project/docs/source/gallery/animations/example_entrainment_rate_oil_types_1.gif...
12:54:23 INFO opendrift.models.basemodel:3037: Time to make animation: 0:00:10.636438
Total running time of the script: (0 minutes 31.049 seconds)