Openoil

from datetime import datetime, timedelta
from opendrift import test_data_folder as tdf
from opendrift.readers import reader_netCDF_CF_generic
from opendrift.models.openoil import OpenOil

o = OpenOil(loglevel=20, location='Norway')

print(o.oiltypes)  # Print available oil types
14:01:12 INFO    opendrift:569: OpenDriftSimulation initialised (version 1.14.11 / v1.14.12-9-g6f1a4a0)
['GENERIC BUNKER C', 'GENERIC DIESEL', 'GENERIC FUEL OIL No. 6', 'GENERIC FUEL OIL No.2', 'GENERIC GASOLINE', 'GENERIC HEAVY CRUDE', 'GENERIC HEAVY FUEL OIL', 'GENERIC HOME HEATING OIL', 'GENERIC INTERMEDIATE FUEL OIL 180', 'GENERIC INTERMEDIATE FUEL OIL 300', 'GENERIC LIGHT CRUDE', 'GENERIC MEDIUM CRUDE', 'AASGARD A 2003', 'AASTA HANSTEEN BLEND 2020', 'ALTA 2016', 'ALVE 2010', 'ALVE 2014', 'ALVHEIM BLEND 2009', 'ALVHEIM BOA 2009', 'ALVHEIM KAMELEON 2009', 'ALVHEIM KNELER 2009', 'ASGARD, STATOIL', 'ATLA KONDENSAT 2013', 'AVALDSNES 2012', 'BALDER 2002', 'BALDER BLEND 2010', 'BALDER BLEND 2025', 'BLANE 2009', 'BOYLA CRUDE 2016', 'BRAGE 2013', 'BRASSE 2018', 'BREAM 2011', 'BREIDABLIKK 2023', 'BRYNHILD CRUDE 2015', 'CALYPSO 2024', 'CAURUS 2011', 'CERISA 2025', 'DRAUGEN 2008', 'DRIVIS 2017', 'DUGONG 2022', 'DUVA 2021', 'DVALIN 2020', 'EKOFISK 2002', 'EKOFISK BLEND 2000', 'EKOFISK BLEND 2011', 'EKOFISK J 2015', 'ELDFISK 2002', 'ELDFISK B 2015', 'ELDFISK BLEND 2011', 'ELDFISK KOMPLEKS 2015', 'ELLI 1999', 'ELLI SOUTH 1999', 'EMBLA 2002', 'FENJA (PIL) 2015', 'FOGELBERG CONDENSATE 2021', 'FORSETI 2002', 'FOSSEKALL 2013', 'FRAM 2013', 'FROSK 2020', 'FROY 1996', 'GARANTIANA 2013', 'GAS OIL 10 ppm S 2017', 'GAUPE 2011', 'GINA KROG CRUDE 2018', 'GJOA 2011', 'GLITNE 2002', 'GOLIAT BLEND 50/50 2008', 'GOLIAT BLEND 70/30 2008', 'GOLIAT KOBBE 2008', 'GOLIAT REALGRUNNEN 2001', 'GOLIAT REALGRUNNEN 2008', 'GRANE 1997', 'GROSBEAK 2012', 'GUDRUN 2012', 'GUDRUN 2019', 'GULLFAKS A BLEND 2010', 'GULLFAKS C BLEND 2010', 'GULLFAKS SOR 1996', 'GYDA 2002', 'HAVIS 2013', 'HEAVY DISTILLATE MARINE ECA 50 2017', 'HEIDRUN AARE 2023', 'HEIDRUN AaRE 2004', 'HEIDRUN EXPORT BLEND 2004', 'HEIDRUN TILJE 2004', 'HULDRA KONDENSAT 1998', 'IFO-180LS 2014', 'IFO-180NS 2014', 'IFO-380LS 2014', 'IFO-80LS 2014', 'IRIS CONDENSATE 2020', 'IVAR AASEN 2012', 'JORDBAER 2011', 'KRISTIN 2006', 'KVITEBJORN 2009', 'KVITEBJORN 2019', 'LANGFJELLET 2023', 'LAVRANS 1997', 'LILLE PRINSEN 2022', 'LILLEFRIGG KONDENSAT 1996', 'LINERLE 2005', 'LUNO 2011', 'LUNO II 2014', 'MARIA 2013', 'MARINE GAS OIL 500 ppm S 2017', 'MARTIN LINGE CONDENSATE 2016', 'MARTIN LINGE CRUDE 2016', 'MARULK 2014', 'MIDGARD 1991', 'MORVIN 2008', 'NJORD 1997', 'NJORD 2003', 'NORNE 1997', 'NORNE BLEND 2010', 'NORNE CRUDE 2017', 'ODA 2019', 'OFELIA 2023', 'ORMEN LANGE KONDENSAT 2008', 'OSEBERG A 2013', 'OSEBERG BLEND 2007', 'OSEBERG C 1995', 'OSEBERG C 2013', 'OSEBERG OST 1998', 'OSEBERG OST 2013', 'OSEBERG SOR 2000', 'OSEBERG SOR 2013', 'OSEBERG, EXXON', 'OSELVAR 2012', 'RINGHORNE 2002', 'RINGHORNE 2025', 'ROTTERDAM DIESEL 2017', 'SF NORD BRENT 2021', 'SIGYN CONDENSATE 2017', 'SKARFJELL 2014', 'SKARV 2004', 'SKARV KONDENSAT 2014', 'SKOGUL 2020', 'SKRUGARD 2012', 'SLEIPNER KONDENSAT 2002', 'SLEIPNER VEST 1998', 'SMORBUKK 2003', 'SMORBUKK KONDENSAT 2003', 'SMORBUKK SOR 2003', 'SNOHVIT KONDENSAT 2001', 'SNORRE B 2004', 'SNORRE TLP 2004', 'STAER 2010', 'STATFJORD A 2001', 'STATFJORD B 2001', 'STATFJORD C 2001', 'SVALE 2010', 'SVALIN 2014', 'SYGNA BRENT 2021', 'TAMBAR 2002', 'TAU 1999', 'TOR 2002', 'TOR II 2022', 'TORDIS 2002', 'TRESTAKK 2008', 'TROLL, STATOIL', 'TRYM KONDENSAT 2011', 'TYRIHANS NORD 2004', 'TYRIHANS SOR 2004', 'TYRVING 2025', 'ULA 1999', 'ULTRA LOW SULFUR FUEL OIL 2017', 'UTGARD CONDENSATE 2021', 'VALE 2001', 'VALE 2014', 'VALHALL 2002', 'VALHALL 2021', 'VARG 2000', 'VEGA CONDENSATE 2015', 'VESLEFRIKK 2012', 'VIGDIS 2004', 'VILJE 2009', 'VISUND 2009', 'VISUND CRUDE OIL 2020', 'VISUND SOR CONDENSATE 2020', 'VOLUND 2010', 'VOLVE 2006', 'WIDE RANGE GAS OIL 2017', 'WISTING 2015', 'WISTING CENTRAL 2017', 'YME 2023']

Arome atmospheric model

reader_arome = reader_netCDF_CF_generic.Reader(tdf +
    '16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc')
# Norkyst ocean model
reader_norkyst = reader_netCDF_CF_generic.Reader(tdf +
    '16Nov2015_NorKyst_z_surface/norkyst800_subset_16Nov2015.nc')
o.add_reader([reader_norkyst, reader_arome])
14:01:12 INFO    opendrift.readers:67: Opening file with xr.open_dataset
14:01:13 INFO    opendrift.readers.reader_netCDF_CF_generic:340: Detected dimensions: {'time': 'time', 'x': 'x', 'y': 'y'}
14:01:13 INFO    opendrift.readers:67: Opening file with xr.open_dataset
14:01:13 INFO    opendrift.readers.reader_netCDF_CF_generic:340: Detected dimensions: {'x': 'X', 'y': 'Y', 'z': 'depth', 'time': 'time'}

Adjusting some configuration

o.set_config('processes:evaporation',  True)
o.set_config('processes:emulsification',  True)
o.set_config('drift:vertical_mixing',  True)
o.set_config('vertical_mixing:timestep',  5)

Seeding some particles

time = reader_arome.start_time
oil_type = 'HEIDRUN AARE 2023'
o.seed_elements(lon=4.9, lat=60.1, radius=3000, number=2000,
                time=time, z=0, oil_type=oil_type)
14:01:13 INFO    opendrift.models.openoil.adios.dirjs:86: Querying ADIOS database for oil: HEIDRUN AARE 2023
14:01:13 INFO    opendrift.models.openoil.openoil:1731: Using density 899.8009199999999 and viscosity 5.2282765673226704e-05 of oiltype HEIDRUN AARE 2023
14:01:13 INFO    opendrift.models.basemodel.environment:203: Adding a global landmask from GSHHG
14:01:19 INFO    opendrift.models.basemodel.environment:227: Fallback values will be used for the following variables which have no readers:
14:01:19 INFO    opendrift.models.basemodel.environment:230:    sea_surface_height: 0.000000
14:01:19 INFO    opendrift.models.basemodel.environment:230:    upward_sea_water_velocity: 0.000000
14:01:19 INFO    opendrift.models.basemodel.environment:230:    sea_surface_wave_significant_height: 0.000000
14:01:19 INFO    opendrift.models.basemodel.environment:230:    sea_surface_wave_stokes_drift_x_velocity: 0.000000
14:01:19 INFO    opendrift.models.basemodel.environment:230:    sea_surface_wave_stokes_drift_y_velocity: 0.000000
14:01:19 INFO    opendrift.models.basemodel.environment:230:    sea_surface_wave_period_at_variance_spectral_density_maximum: 0.000000
14:01:19 INFO    opendrift.models.basemodel.environment:230:    sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment: 0.000000
14:01:19 INFO    opendrift.models.basemodel.environment:230:    sea_ice_area_fraction: 0.000000
14:01:19 INFO    opendrift.models.basemodel.environment:230:    sea_ice_x_velocity: 0.000000
14:01:19 INFO    opendrift.models.basemodel.environment:230:    sea_ice_y_velocity: 0.000000
14:01:19 INFO    opendrift.models.basemodel.environment:230:    sea_water_temperature: 10.000000
14:01:19 INFO    opendrift.models.basemodel.environment:230:    sea_water_salinity: 34.000000
14:01:19 INFO    opendrift.models.basemodel.environment:230:    sea_floor_depth_below_sea_level: 10000.000000
14:01:19 INFO    opendrift.models.basemodel.environment:230:    horizontal_diffusivity: 0.000000
14:01:19 INFO    opendrift.models.basemodel.environment:230:    ocean_vertical_diffusivity: 0.020000
14:01:19 INFO    opendrift.models.basemodel.environment:230:    ocean_mixed_layer_thickness: 50.000000

Running model

o.run(steps=4*40, time_step=900, time_step_output=3600)
14:01:19 INFO    opendrift:1910: Skipping environment variable upward_sea_water_velocity because of condition ['drift:vertical_advection', 'is', False]
14:01:19 INFO    opendrift:1921: Storing previous values of element property lon because of condition (('general:coastline_action', 'in', ['stranding', 'previous']), 'or', ('general:seafloor_action', 'in', ['previous']))
14:01:19 INFO    opendrift:1921: Storing previous values of element property lat because of condition (('general:coastline_action', 'in', ['stranding', 'previous']), 'or', ('general:seafloor_action', 'in', ['previous']))
14:01:19 INFO    opendrift:958: Using existing reader for land_binary_mask to move elements to ocean
14:01:19 INFO    opendrift:991: Moving 1 out of 2000 points from land to water
14:01:19 INFO    opendrift.models.openoil.openoil:697: Oil-water surface tension is 0.032418 Nm
14:01:19 INFO    opendrift.models.openoil.openoil:706: Using max water fractions [0.679, 0.725] for temperatures [5.0, 15.0] for oiltype HEIDRUN AARE 2023
14:01:19 INFO    opendrift.models.openoil.openoil:707: Corresponding max water fraction from GNOME is 0.9
14:01:19 INFO    opendrift:2237: 2015-11-16 00:00:00 - step 1 of 160 - 2000 active elements (0 deactivated)
14:01:19 INFO    opendrift:2237: 2015-11-16 00:15:00 - step 2 of 160 - 2000 active elements (0 deactivated)
14:01:19 INFO    opendrift:2237: 2015-11-16 00:30:00 - step 3 of 160 - 1999 active elements (1 deactivated)
14:01:19 INFO    opendrift:2237: 2015-11-16 00:45:00 - step 4 of 160 - 1999 active elements (1 deactivated)
14:01:20 INFO    opendrift:2237: 2015-11-16 01:00:00 - step 5 of 160 - 1998 active elements (2 deactivated)
14:01:20 INFO    opendrift:2237: 2015-11-16 01:15:00 - step 6 of 160 - 1998 active elements (2 deactivated)
14:01:20 INFO    opendrift:2237: 2015-11-16 01:30:00 - step 7 of 160 - 1998 active elements (2 deactivated)
14:01:20 INFO    opendrift:2237: 2015-11-16 01:45:00 - step 8 of 160 - 1998 active elements (2 deactivated)
14:01:21 INFO    opendrift:2237: 2015-11-16 02:00:00 - step 9 of 160 - 1998 active elements (2 deactivated)
14:01:21 INFO    opendrift:2237: 2015-11-16 02:15:00 - step 10 of 160 - 1998 active elements (2 deactivated)
14:01:21 INFO    opendrift:2237: 2015-11-16 02:30:00 - step 11 of 160 - 1998 active elements (2 deactivated)
14:01:21 INFO    opendrift:2237: 2015-11-16 02:45:00 - step 12 of 160 - 1998 active elements (2 deactivated)
14:01:21 INFO    opendrift:2237: 2015-11-16 03:00:00 - step 13 of 160 - 1998 active elements (2 deactivated)
14:01:22 INFO    opendrift:2237: 2015-11-16 03:15:00 - step 14 of 160 - 1998 active elements (2 deactivated)
14:01:22 INFO    opendrift:2237: 2015-11-16 03:30:00 - step 15 of 160 - 1998 active elements (2 deactivated)
14:01:22 INFO    opendrift:2237: 2015-11-16 03:45:00 - step 16 of 160 - 1998 active elements (2 deactivated)
14:01:22 INFO    opendrift:2237: 2015-11-16 04:00:00 - step 17 of 160 - 1998 active elements (2 deactivated)
14:01:23 INFO    opendrift:2237: 2015-11-16 04:15:00 - step 18 of 160 - 1998 active elements (2 deactivated)
14:01:23 INFO    opendrift:2237: 2015-11-16 04:30:00 - step 19 of 160 - 1998 active elements (2 deactivated)
14:01:23 INFO    opendrift:2237: 2015-11-16 04:45:00 - step 20 of 160 - 1998 active elements (2 deactivated)
14:01:23 INFO    opendrift:2237: 2015-11-16 05:00:00 - step 21 of 160 - 1998 active elements (2 deactivated)
14:01:23 INFO    opendrift:2237: 2015-11-16 05:15:00 - step 22 of 160 - 1998 active elements (2 deactivated)
14:01:24 INFO    opendrift:2237: 2015-11-16 05:30:00 - step 23 of 160 - 1998 active elements (2 deactivated)
14:01:24 INFO    opendrift:2237: 2015-11-16 05:45:00 - step 24 of 160 - 1998 active elements (2 deactivated)
14:01:24 INFO    opendrift:2237: 2015-11-16 06:00:00 - step 25 of 160 - 1998 active elements (2 deactivated)
14:01:24 INFO    opendrift:2237: 2015-11-16 06:15:00 - step 26 of 160 - 1998 active elements (2 deactivated)
14:01:25 INFO    opendrift:2237: 2015-11-16 06:30:00 - step 27 of 160 - 1998 active elements (2 deactivated)
14:01:25 INFO    opendrift:2237: 2015-11-16 06:45:00 - step 28 of 160 - 1998 active elements (2 deactivated)
14:01:25 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (4) must be increased. See `Variables.set_buffer_size`.
14:01:25 INFO    opendrift:2237: 2015-11-16 07:00:00 - step 29 of 160 - 1998 active elements (2 deactivated)
14:01:25 INFO    opendrift:2237: 2015-11-16 07:15:00 - step 30 of 160 - 1998 active elements (2 deactivated)
14:01:25 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (4) must be increased. See `Variables.set_buffer_size`.
14:01:26 INFO    opendrift:2237: 2015-11-16 07:30:00 - step 31 of 160 - 1998 active elements (2 deactivated)
14:01:26 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (4) must be increased. See `Variables.set_buffer_size`.
14:01:26 INFO    opendrift:2237: 2015-11-16 07:45:00 - step 32 of 160 - 1998 active elements (2 deactivated)
14:01:26 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/norkyst800_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`.
14:01:26 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (4) must be increased. See `Variables.set_buffer_size`.
14:01:26 INFO    opendrift:2237: 2015-11-16 08:00:00 - step 33 of 160 - 1998 active elements (2 deactivated)
14:01:26 INFO    opendrift:2237: 2015-11-16 08:15:00 - step 34 of 160 - 1998 active elements (2 deactivated)
14:01:26 INFO    opendrift:2237: 2015-11-16 08:30:00 - step 35 of 160 - 1998 active elements (2 deactivated)
14:01:26 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (4) must be increased. See `Variables.set_buffer_size`.
14:01:27 INFO    opendrift:2237: 2015-11-16 08:45:00 - step 36 of 160 - 1998 active elements (2 deactivated)
14:01:27 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (4) must be increased. See `Variables.set_buffer_size`.
14:01:27 INFO    opendrift:2237: 2015-11-16 09:00:00 - step 37 of 160 - 1998 active elements (2 deactivated)
14:01:27 INFO    opendrift:2237: 2015-11-16 09:15:00 - step 38 of 160 - 1998 active elements (2 deactivated)
14:01:27 INFO    opendrift:2237: 2015-11-16 09:30:00 - step 39 of 160 - 1998 active elements (2 deactivated)
14:01:27 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/norkyst800_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`.
14:01:27 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (4) must be increased. See `Variables.set_buffer_size`.
14:01:28 INFO    opendrift:2237: 2015-11-16 09:45:00 - step 40 of 160 - 1998 active elements (2 deactivated)
14:01:28 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/norkyst800_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`.
14:01:28 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (4) must be increased. See `Variables.set_buffer_size`.
14:01:28 INFO    opendrift:2237: 2015-11-16 10:00:00 - step 41 of 160 - 1998 active elements (2 deactivated)
14:01:28 INFO    opendrift:2237: 2015-11-16 10:15:00 - step 42 of 160 - 1997 active elements (3 deactivated)
14:01:28 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (4) must be increased. See `Variables.set_buffer_size`.
14:01:28 INFO    opendrift:2237: 2015-11-16 10:30:00 - step 43 of 160 - 1997 active elements (3 deactivated)
14:01:28 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/norkyst800_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`.
14:01:28 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (4) must be increased. See `Variables.set_buffer_size`.
14:01:28 INFO    opendrift:2237: 2015-11-16 10:45:00 - step 44 of 160 - 1997 active elements (3 deactivated)
14:01:28 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/norkyst800_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`.
14:01:28 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (4) must be increased. See `Variables.set_buffer_size`.
14:01:29 INFO    opendrift:2237: 2015-11-16 11:00:00 - step 45 of 160 - 1997 active elements (3 deactivated)
14:01:29 INFO    opendrift:2237: 2015-11-16 11:15:00 - step 46 of 160 - 1997 active elements (3 deactivated)
14:01:29 INFO    opendrift:2237: 2015-11-16 11:30:00 - step 47 of 160 - 1997 active elements (3 deactivated)
14:01:29 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/norkyst800_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`.
14:01:29 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (4) must be increased. See `Variables.set_buffer_size`.
14:01:29 INFO    opendrift:2237: 2015-11-16 11:45:00 - step 48 of 160 - 1996 active elements (4 deactivated)
14:01:29 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/norkyst800_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`.
14:01:29 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (4) must be increased. See `Variables.set_buffer_size`.
14:01:30 INFO    opendrift:2237: 2015-11-16 12:00:00 - step 49 of 160 - 1995 active elements (5 deactivated)
14:01:30 INFO    opendrift:2237: 2015-11-16 12:15:00 - step 50 of 160 - 1994 active elements (6 deactivated)
14:01:30 INFO    opendrift:2237: 2015-11-16 12:30:00 - step 51 of 160 - 1994 active elements (6 deactivated)
14:01:30 INFO    opendrift:2237: 2015-11-16 12:45:00 - step 52 of 160 - 1993 active elements (7 deactivated)
14:01:30 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (4) must be increased. See `Variables.set_buffer_size`.
14:01:31 INFO    opendrift:2237: 2015-11-16 13:00:00 - step 53 of 160 - 1983 active elements (17 deactivated)
14:01:31 INFO    opendrift:2237: 2015-11-16 13:15:00 - step 54 of 160 - 1974 active elements (26 deactivated)
14:01:31 INFO    opendrift:2237: 2015-11-16 13:30:00 - step 55 of 160 - 1961 active elements (39 deactivated)
14:01:31 INFO    opendrift:2237: 2015-11-16 13:45:00 - step 56 of 160 - 1928 active elements (72 deactivated)
14:01:32 INFO    opendrift:2237: 2015-11-16 14:00:00 - step 57 of 160 - 1900 active elements (100 deactivated)
14:01:32 INFO    opendrift:2237: 2015-11-16 14:15:00 - step 58 of 160 - 1873 active elements (127 deactivated)
14:01:32 INFO    opendrift:2237: 2015-11-16 14:30:00 - step 59 of 160 - 1837 active elements (163 deactivated)
14:01:32 INFO    opendrift:2237: 2015-11-16 14:45:00 - step 60 of 160 - 1807 active elements (193 deactivated)
14:01:33 INFO    opendrift:2237: 2015-11-16 15:00:00 - step 61 of 160 - 1767 active elements (233 deactivated)
14:01:33 INFO    opendrift:2237: 2015-11-16 15:15:00 - step 62 of 160 - 1727 active elements (273 deactivated)
14:01:33 INFO    opendrift:2237: 2015-11-16 15:30:00 - step 63 of 160 - 1689 active elements (311 deactivated)
14:01:33 INFO    opendrift:2237: 2015-11-16 15:45:00 - step 64 of 160 - 1658 active elements (342 deactivated)
14:01:33 INFO    opendrift:2237: 2015-11-16 16:00:00 - step 65 of 160 - 1632 active elements (368 deactivated)
14:01:34 INFO    opendrift:2237: 2015-11-16 16:15:00 - step 66 of 160 - 1615 active elements (385 deactivated)
14:01:34 INFO    opendrift:2237: 2015-11-16 16:30:00 - step 67 of 160 - 1601 active elements (399 deactivated)
14:01:34 INFO    opendrift:2237: 2015-11-16 16:45:00 - step 68 of 160 - 1575 active elements (425 deactivated)
14:01:34 INFO    opendrift:2237: 2015-11-16 17:00:00 - step 69 of 160 - 1553 active elements (447 deactivated)
14:01:35 INFO    opendrift:2237: 2015-11-16 17:15:00 - step 70 of 160 - 1526 active elements (474 deactivated)
14:01:35 INFO    opendrift:2237: 2015-11-16 17:30:00 - step 71 of 160 - 1497 active elements (503 deactivated)
14:01:35 INFO    opendrift:2237: 2015-11-16 17:45:00 - step 72 of 160 - 1464 active elements (536 deactivated)
14:01:35 INFO    opendrift:2237: 2015-11-16 18:00:00 - step 73 of 160 - 1425 active elements (575 deactivated)
14:01:35 INFO    opendrift:2237: 2015-11-16 18:15:00 - step 74 of 160 - 1383 active elements (617 deactivated)
14:01:36 INFO    opendrift:2237: 2015-11-16 18:30:00 - step 75 of 160 - 1342 active elements (658 deactivated)
14:01:36 INFO    opendrift:2237: 2015-11-16 18:45:00 - step 76 of 160 - 1312 active elements (688 deactivated)
14:01:36 INFO    opendrift:2237: 2015-11-16 19:00:00 - step 77 of 160 - 1279 active elements (721 deactivated)
14:01:36 INFO    opendrift:2237: 2015-11-16 19:15:00 - step 78 of 160 - 1245 active elements (755 deactivated)
14:01:36 INFO    opendrift:2237: 2015-11-16 19:30:00 - step 79 of 160 - 1209 active elements (791 deactivated)
14:01:37 INFO    opendrift:2237: 2015-11-16 19:45:00 - step 80 of 160 - 1176 active elements (824 deactivated)
14:01:37 INFO    opendrift:2237: 2015-11-16 20:00:00 - step 81 of 160 - 1142 active elements (858 deactivated)
14:01:37 INFO    opendrift:2237: 2015-11-16 20:15:00 - step 82 of 160 - 1101 active elements (899 deactivated)
14:01:37 INFO    opendrift:2237: 2015-11-16 20:30:00 - step 83 of 160 - 1066 active elements (934 deactivated)
14:01:37 INFO    opendrift:2237: 2015-11-16 20:45:00 - step 84 of 160 - 1033 active elements (967 deactivated)
14:01:38 INFO    opendrift:2237: 2015-11-16 21:00:00 - step 85 of 160 - 1005 active elements (995 deactivated)
14:01:38 INFO    opendrift:2237: 2015-11-16 21:15:00 - step 86 of 160 - 979 active elements (1021 deactivated)
14:01:38 INFO    opendrift:2237: 2015-11-16 21:30:00 - step 87 of 160 - 965 active elements (1035 deactivated)
14:01:38 INFO    opendrift:2237: 2015-11-16 21:45:00 - step 88 of 160 - 951 active elements (1049 deactivated)
14:01:38 INFO    opendrift:2237: 2015-11-16 22:00:00 - step 89 of 160 - 937 active elements (1063 deactivated)
14:01:38 INFO    opendrift:2237: 2015-11-16 22:15:00 - step 90 of 160 - 917 active elements (1083 deactivated)
14:01:39 INFO    opendrift:2237: 2015-11-16 22:30:00 - step 91 of 160 - 896 active elements (1104 deactivated)
14:01:39 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (4) must be increased. See `Variables.set_buffer_size`.
14:01:39 INFO    opendrift:2237: 2015-11-16 22:45:00 - step 92 of 160 - 881 active elements (1119 deactivated)
14:01:39 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (4) must be increased. See `Variables.set_buffer_size`.
14:01:39 INFO    opendrift:2237: 2015-11-16 23:00:00 - step 93 of 160 - 866 active elements (1134 deactivated)
14:01:39 INFO    opendrift:2237: 2015-11-16 23:15:00 - step 94 of 160 - 848 active elements (1152 deactivated)
14:01:39 INFO    opendrift:2237: 2015-11-16 23:30:00 - step 95 of 160 - 825 active elements (1175 deactivated)
14:01:39 INFO    opendrift:2237: 2015-11-16 23:45:00 - step 96 of 160 - 794 active elements (1206 deactivated)
14:01:39 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (4) must be increased. See `Variables.set_buffer_size`.
14:01:40 INFO    opendrift:2237: 2015-11-17 00:00:00 - step 97 of 160 - 777 active elements (1223 deactivated)
14:01:40 INFO    opendrift:2237: 2015-11-17 00:15:00 - step 98 of 160 - 754 active elements (1246 deactivated)
14:01:40 INFO    opendrift:2237: 2015-11-17 00:30:00 - step 99 of 160 - 732 active elements (1268 deactivated)
14:01:40 INFO    opendrift:2237: 2015-11-17 00:45:00 - step 100 of 160 - 697 active elements (1303 deactivated)
14:01:40 INFO    opendrift:2237: 2015-11-17 01:00:00 - step 101 of 160 - 667 active elements (1333 deactivated)
14:01:40 INFO    opendrift:2237: 2015-11-17 01:15:00 - step 102 of 160 - 638 active elements (1362 deactivated)
14:01:41 INFO    opendrift:2237: 2015-11-17 01:30:00 - step 103 of 160 - 618 active elements (1382 deactivated)
14:01:41 INFO    opendrift:2237: 2015-11-17 01:45:00 - step 104 of 160 - 596 active elements (1404 deactivated)
14:01:41 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (4) must be increased. See `Variables.set_buffer_size`.
14:01:41 INFO    opendrift:2237: 2015-11-17 02:00:00 - step 105 of 160 - 576 active elements (1424 deactivated)
14:01:41 INFO    opendrift:2237: 2015-11-17 02:15:00 - step 106 of 160 - 560 active elements (1440 deactivated)
14:01:41 INFO    opendrift:2237: 2015-11-17 02:30:00 - step 107 of 160 - 545 active elements (1455 deactivated)
14:01:41 INFO    opendrift:2237: 2015-11-17 02:45:00 - step 108 of 160 - 520 active elements (1480 deactivated)
14:01:42 INFO    opendrift:2237: 2015-11-17 03:00:00 - step 109 of 160 - 485 active elements (1515 deactivated)
14:01:42 INFO    opendrift:2237: 2015-11-17 03:15:00 - step 110 of 160 - 457 active elements (1543 deactivated)
14:01:42 INFO    opendrift:2237: 2015-11-17 03:30:00 - step 111 of 160 - 440 active elements (1560 deactivated)
14:01:42 INFO    opendrift:2237: 2015-11-17 03:45:00 - step 112 of 160 - 425 active elements (1575 deactivated)
14:01:42 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/norkyst800_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (8) must be increased. See `Variables.set_buffer_size`.
14:01:42 WARNING opendrift.readers.basereader.structured:324: Data block from /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc not large enough to cover element positions within timestep. Buffer size (4) must be increased. See `Variables.set_buffer_size`.
14:01:42 INFO    opendrift:2237: 2015-11-17 04:00:00 - step 113 of 160 - 416 active elements (1584 deactivated)
14:01:42 INFO    opendrift:2237: 2015-11-17 04:15:00 - step 114 of 160 - 406 active elements (1594 deactivated)
14:01:42 INFO    opendrift:2237: 2015-11-17 04:30:00 - step 115 of 160 - 394 active elements (1606 deactivated)
14:01:43 INFO    opendrift:2237: 2015-11-17 04:45:00 - step 116 of 160 - 376 active elements (1624 deactivated)
14:01:43 INFO    opendrift:2237: 2015-11-17 05:00:00 - step 117 of 160 - 364 active elements (1636 deactivated)
14:01:43 INFO    opendrift:2237: 2015-11-17 05:15:00 - step 118 of 160 - 357 active elements (1643 deactivated)
14:01:43 INFO    opendrift:2237: 2015-11-17 05:30:00 - step 119 of 160 - 347 active elements (1653 deactivated)
14:01:43 INFO    opendrift:2237: 2015-11-17 05:45:00 - step 120 of 160 - 342 active elements (1658 deactivated)
14:01:43 INFO    opendrift:2237: 2015-11-17 06:00:00 - step 121 of 160 - 335 active elements (1665 deactivated)
14:01:43 INFO    opendrift:2237: 2015-11-17 06:15:00 - step 122 of 160 - 323 active elements (1677 deactivated)
14:01:43 INFO    opendrift:2237: 2015-11-17 06:30:00 - step 123 of 160 - 313 active elements (1687 deactivated)
14:01:44 INFO    opendrift:2237: 2015-11-17 06:45:00 - step 124 of 160 - 307 active elements (1693 deactivated)
14:01:44 INFO    opendrift:2237: 2015-11-17 07:00:00 - step 125 of 160 - 299 active elements (1701 deactivated)
14:01:44 INFO    opendrift:2237: 2015-11-17 07:15:00 - step 126 of 160 - 294 active elements (1706 deactivated)
14:01:44 INFO    opendrift:2237: 2015-11-17 07:30:00 - step 127 of 160 - 284 active elements (1716 deactivated)
14:01:44 INFO    opendrift:2237: 2015-11-17 07:45:00 - step 128 of 160 - 275 active elements (1725 deactivated)
14:01:44 INFO    opendrift:2237: 2015-11-17 08:00:00 - step 129 of 160 - 272 active elements (1728 deactivated)
14:01:44 INFO    opendrift:2237: 2015-11-17 08:15:00 - step 130 of 160 - 260 active elements (1740 deactivated)
14:01:45 INFO    opendrift:2237: 2015-11-17 08:30:00 - step 131 of 160 - 253 active elements (1747 deactivated)
14:01:45 INFO    opendrift:2237: 2015-11-17 08:45:00 - step 132 of 160 - 250 active elements (1750 deactivated)
14:01:45 INFO    opendrift:2237: 2015-11-17 09:00:00 - step 133 of 160 - 242 active elements (1758 deactivated)
14:01:45 INFO    opendrift:2237: 2015-11-17 09:15:00 - step 134 of 160 - 238 active elements (1762 deactivated)
14:01:45 INFO    opendrift:2237: 2015-11-17 09:30:00 - step 135 of 160 - 232 active elements (1768 deactivated)
14:01:45 INFO    opendrift:2237: 2015-11-17 09:45:00 - step 136 of 160 - 222 active elements (1778 deactivated)
14:01:45 INFO    opendrift:2237: 2015-11-17 10:00:00 - step 137 of 160 - 210 active elements (1790 deactivated)
14:01:45 INFO    opendrift:2237: 2015-11-17 10:15:00 - step 138 of 160 - 196 active elements (1804 deactivated)
14:01:46 INFO    opendrift:2237: 2015-11-17 10:30:00 - step 139 of 160 - 193 active elements (1807 deactivated)
14:01:46 INFO    opendrift:2237: 2015-11-17 10:45:00 - step 140 of 160 - 191 active elements (1809 deactivated)
14:01:46 INFO    opendrift:2237: 2015-11-17 11:00:00 - step 141 of 160 - 183 active elements (1817 deactivated)
14:01:46 INFO    opendrift:2237: 2015-11-17 11:15:00 - step 142 of 160 - 178 active elements (1822 deactivated)
14:01:46 INFO    opendrift:2237: 2015-11-17 11:30:00 - step 143 of 160 - 172 active elements (1828 deactivated)
14:01:46 INFO    opendrift:2237: 2015-11-17 11:45:00 - step 144 of 160 - 166 active elements (1834 deactivated)
14:01:46 INFO    opendrift:2237: 2015-11-17 12:00:00 - step 145 of 160 - 158 active elements (1842 deactivated)
14:01:46 INFO    opendrift:2237: 2015-11-17 12:15:00 - step 146 of 160 - 154 active elements (1846 deactivated)
14:01:46 INFO    opendrift:2237: 2015-11-17 12:30:00 - step 147 of 160 - 149 active elements (1851 deactivated)
14:01:47 INFO    opendrift:2237: 2015-11-17 12:45:00 - step 148 of 160 - 145 active elements (1855 deactivated)
14:01:47 INFO    opendrift:2237: 2015-11-17 13:00:00 - step 149 of 160 - 139 active elements (1861 deactivated)
14:01:47 INFO    opendrift:2237: 2015-11-17 13:15:00 - step 150 of 160 - 135 active elements (1865 deactivated)
14:01:47 INFO    opendrift:2237: 2015-11-17 13:30:00 - step 151 of 160 - 135 active elements (1865 deactivated)
14:01:47 INFO    opendrift:2237: 2015-11-17 13:45:00 - step 152 of 160 - 133 active elements (1867 deactivated)
14:01:47 INFO    opendrift:2237: 2015-11-17 14:00:00 - step 153 of 160 - 132 active elements (1868 deactivated)
14:01:47 INFO    opendrift:2237: 2015-11-17 14:15:00 - step 154 of 160 - 127 active elements (1873 deactivated)
14:01:47 INFO    opendrift:2237: 2015-11-17 14:30:00 - step 155 of 160 - 125 active elements (1875 deactivated)
14:01:48 INFO    opendrift:2237: 2015-11-17 14:45:00 - step 156 of 160 - 122 active elements (1878 deactivated)
14:01:48 INFO    opendrift:2237: 2015-11-17 15:00:00 - step 157 of 160 - 120 active elements (1880 deactivated)
14:01:48 INFO    opendrift:2237: 2015-11-17 15:15:00 - step 158 of 160 - 118 active elements (1882 deactivated)
14:01:48 INFO    opendrift:2237: 2015-11-17 15:30:00 - step 159 of 160 - 117 active elements (1883 deactivated)
14:01:48 INFO    opendrift:2237: 2015-11-17 15:45:00 - step 160 of 160 - 115 active elements (1885 deactivated)
<xarray.Dataset> Size: 14MB
Dimensions:                                                                              (
                                                                                          trajectory: 2000,
                                                                                          time: 41)
Coordinates:
  * trajectory                                                                           (trajectory) int64 16kB ...
  * time                                                                                 (time) datetime64[ns] 328B ...
Data variables: (12/44)
    status                                                                               (trajectory, time) float32 328kB ...
    moving                                                                               (trajectory, time) float32 328kB ...
    age_seconds                                                                          (trajectory, time) float32 328kB ...
    origin_marker                                                                        (trajectory, time) float32 328kB ...
    lon                                                                                  (trajectory, time) float32 328kB ...
    lat                                                                                  (trajectory, time) float32 328kB ...
    ...                                                                                   ...
    sea_water_salinity                                                                   (trajectory, time) float32 328kB ...
    sea_floor_depth_below_sea_level                                                      (trajectory, time) float32 328kB ...
    horizontal_diffusivity                                                               (trajectory, time) float32 328kB ...
    ocean_vertical_diffusivity                                                           (trajectory, time) float32 328kB ...
    land_binary_mask                                                                     (trajectory, time) float32 328kB ...
    ocean_mixed_layer_thickness                                                          (trajectory, time) float32 328kB ...
Attributes: (12/167)
    Conventions:                                                             ...
    standard_name_vocabulary:                                                ...
    featureType:                                                             ...
    title:                                                                   ...
    summary:                                                                 ...
    keywords:                                                                ...
    ...                                                                                                               ...
    geospatial_lon_units:                                                    ...
    geospatial_lon_resolution:                                               ...
    runtime:                                                                 ...
    geospatial_vertical_min:                                                 ...
    geospatial_vertical_max:                                                 ...
    geospatial_vertical_positive:                                            ...


Print and plot results

print(o)
o.plot(fast=True)
o.plot_oil_budget()
#o.plot(filename='openoil_drift')
o.plot_vertical_distribution(maxnum=100,bins=50)
o.plot_property('water_fraction', mean=True)
o.plot_property('z')
#o.plot_property('mass_evaporated')
#o.plot_property('water_fraction')
#o.plot_property('interfacial_area')
o.animation(fast=True)
  • OpenDrift - OpenOil (HEIDRUN AARE 2023) 2015-11-16 00:00 to 2015-11-17 16:00 UTC (41 steps)
  • HEIDRUN AARE 2023 (899.8 kg/m3) - 2015-11-16 00:00 to 2015-11-17 16:00
  • 2015-11-17T16:00:00   Mean windspeed: 15.6 m/s
  • water_fraction
  • z
===========================
--------------------
Reader performance:
--------------------
/root/project/tests/test_data/16Nov2015_NorKyst_z_surface/norkyst800_subset_16Nov2015.nc
 0:00:00.6  total
 0:00:00.0  preparing
 0:00:00.2  reading
 0:00:00.1  interpolation
 0:00:00.0  interpolation_time
 0:00:00.3  rotating vectors
 0:00:00.0  masking
--------------------
/root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc
 0:00:00.4  total
 0:00:00.0  preparing
 0:00:00.1  reading
 0:00:00.0  interpolation
 0:00:00.0  interpolation_time
 0:00:00.2  rotating vectors
 0:00:00.0  masking
--------------------
global_landmask
 0:00:00.1  total
 0:00:00.0  preparing
 0:00:00.1  reading
 0:00:00.0  masking
--------------------
Performance:
   36.1 total time
    6.4 configuration
    0.0 preparing main loop
      0.0 moving elements to ocean
   29.6 main loop
     21.6 updating elements
        0.7 oil weathering
          0.0 updating viscosities
          0.0 updating densities
          0.5 evaporation
          0.0 emulsification
          0.0 dispersion
       20.5 vertical mixing
    0.0 cleaning up
--------------------
===========================
Model:  OpenOil     (OpenDrift version 1.14.11)
        112 active Oil particles  (1888 deactivated, 0 scheduled)
-------------------
Environment variables:
  -----
  x_sea_water_velocity
  y_sea_water_velocity
     1) /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/norkyst800_subset_16Nov2015.nc
  -----
  x_wind
  y_wind
     1) /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc
  -----
  land_binary_mask
     1) global_landmask
  -----
Readers not added for the following variables:
  horizontal_diffusivity
  ocean_mixed_layer_thickness
  ocean_vertical_diffusivity
  sea_floor_depth_below_sea_level
  sea_ice_area_fraction
  sea_ice_x_velocity
  sea_ice_y_velocity
  sea_surface_height
  sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment
  sea_surface_wave_period_at_variance_spectral_density_maximum
  sea_surface_wave_significant_height
  sea_surface_wave_stokes_drift_x_velocity
  sea_surface_wave_stokes_drift_y_velocity
  sea_water_salinity
  sea_water_temperature

Discarded readers:

Time:
        Start: 2015-11-16 00:00:00 UTC
        Present: 2015-11-17 16:00:00 UTC
        Calculation steps: 160 * 0:15:00 - total time: 1 day, 16:00:00
        Output steps: 41 * 1:00:00
===========================

14:01:48 WARNING opendrift:2613: Plotting fast. This will make your plots less accurate.
/root/project/opendrift/models/oceandrift.py:664: UserWarning: This figure includes Axes that are not compatible with tight_layout, so results might be incorrect.
  tslider = Slider(sliderax, 'Timestep', 0, steps_output-1,
/root/project/opendrift/models/oceandrift.py:706: UserWarning: This figure includes Axes that are not compatible with tight_layout, so results might be incorrect.
  fig.canvas.draw_idle()
14:01:54 WARNING opendrift:2613: Plotting fast. This will make your plots less accurate.
14:01:55 INFO    opendrift:4823: Saving animation to /root/project/docs/source/gallery/animations/example_openoil_0.gif...
14:02:12 INFO    opendrift:3241: Time to make animation: 0:00:17.888821
../_images/example_openoil_0.gif

Total running time of the script: (1 minutes 11.252 seconds)

Gallery generated by Sphinx-Gallery