Oil in ice

from datetime import datetime, timedelta
from opendrift.readers import reader_netCDF_CF_generic
from opendrift.models.openoil import OpenOil
import cmocean

o = OpenOil(loglevel=20)

Out:

13:43:56 INFO    opendrift.models.basemodel: OpenDriftSimulation initialised (version 1.7.1 / v1.7.1-87-g074c1d2)

Using live data from Barents 2.5 km ocean model

o.add_readers_from_list(['https://thredds.met.no/thredds/dodsC/barents25km_agg'])

Imaginary oil spill in Hinlopen strait

o.seed_elements(lon=19.1909, lat=79.5986, radius=50,
                number=3000, time=datetime.utcnow() - timedelta(hours=12))

Out:

13:43:56 INFO    opendrift.models.openoil: Oil type not specified, using default: AASGARD A 2003
querying DB:
Oil.name ==  'AASGARD A 2003'
13:43:56 INFO    opendrift.models.openoil: Using density 816.6828030078809 and viscosity 3.298187589355751e-05 of oiltype AASGARD A 2003

Adjusting some configuration

o.set_config('processes:dispersion',  False)
o.set_config('processes:evaporation',  False)
o.set_config('processes:emulsification',  False)
o.set_config('drift:truncate_ocean_model_below_m', 3)

Running model

o.run(duration=timedelta(hours=48), time_step=1800, time_step_output=3600)

Out:

13:43:56 INFO    opendrift.models.basemodel: Fallback values will be used for the following variables which have no readers:
13:43:56 INFO    opendrift.models.basemodel:    upward_sea_water_velocity: 0.000000
13:43:56 INFO    opendrift.models.basemodel:    sea_surface_wave_significant_height: 0.000000
13:43:56 INFO    opendrift.models.basemodel:    sea_surface_wave_stokes_drift_x_velocity: 0.000000
13:43:56 INFO    opendrift.models.basemodel:    sea_surface_wave_stokes_drift_y_velocity: 0.000000
13:43:56 INFO    opendrift.models.basemodel:    sea_surface_wave_period_at_variance_spectral_density_maximum: 0.000000
13:43:56 INFO    opendrift.models.basemodel:    sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment: 0.000000
13:43:56 INFO    opendrift.models.basemodel:    sea_ice_area_fraction: 0.000000
13:43:56 INFO    opendrift.models.basemodel:    sea_ice_x_velocity: 0.000000
13:43:56 INFO    opendrift.models.basemodel:    sea_ice_y_velocity: 0.000000
13:43:56 INFO    opendrift.models.basemodel:    sea_water_temperature: 10.000000
13:43:56 INFO    opendrift.models.basemodel:    sea_water_salinity: 34.000000
13:43:56 INFO    opendrift.models.basemodel:    sea_floor_depth_below_sea_level: 10000.000000
13:43:56 INFO    opendrift.models.basemodel:    ocean_vertical_diffusivity: 0.020000
13:43:56 INFO    opendrift.models.basemodel: Adding a dynamical landmask with max. priority based on assumed maximum speed of 1.3 m/s. Adding a customised landmask may be faster...
13:43:56 INFO    opendrift_landmask_data.mask: locking landmask for generation..
13:43:56 INFO    opendrift_landmask_data.mask: decompressing memmap landmask to /tmp/landmask/mask.dat..
13:44:08 INFO    opendrift_landmask_data.mask: landmask generated
13:44:14 INFO    opendrift.models.basemodel: Using existing reader for land_binary_mask
13:44:14 INFO    opendrift.models.basemodel: All points are in ocean
13:44:15 INFO    opendrift.models.openoil: Oil-water surface tension is 0.028134 Nm
13:44:15 INFO    opendrift.models.basemodel: 2021-09-24 01:43:56.426709 - step 1 of 96 - 3000 active elements (0 deactivated)
13:44:15 INFO    opendrift.readers.reader_netCDF_CF_generic: Opening dataset: https://thredds.met.no/thredds/dodsC/barents25km_agg
13:44:21 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0035148421 to -0.00087671727) found for ocean_vertical_diffusivity, replacing with NaN
13:44:21 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:44:24 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0044659814 to -0.00050001073) found for ocean_vertical_diffusivity, replacing with NaN
13:44:24 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:44:24 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:44:24 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:44:25 INFO    opendrift.models.basemodel: 2021-09-24 02:13:56.426709 - step 2 of 96 - 3000 active elements (0 deactivated)
13:44:28 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0002271345 to -1.7105276e-07) found for ocean_vertical_diffusivity, replacing with NaN
13:44:28 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:44:28 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:44:28 INFO    opendrift.models.basemodel: 2021-09-24 02:43:56.426709 - step 3 of 96 - 3000 active elements (0 deactivated)
13:44:28 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:44:28 INFO    opendrift.models.basemodel: 2021-09-24 03:13:56.426709 - step 4 of 96 - 3000 active elements (0 deactivated)
13:44:32 INFO    opendrift.models.basemodel: 2021-09-24 03:43:56.426709 - step 5 of 96 - 3000 active elements (0 deactivated)
13:44:32 INFO    opendrift.models.basemodel: 2021-09-24 04:13:56.426709 - step 6 of 96 - 3000 active elements (0 deactivated)
13:44:36 INFO    opendrift.models.basemodel: 2021-09-24 04:43:56.426709 - step 7 of 96 - 3000 active elements (0 deactivated)
13:44:36 INFO    opendrift.models.basemodel: 2021-09-24 05:13:56.426709 - step 8 of 96 - 3000 active elements (0 deactivated)
13:44:40 INFO    opendrift.models.basemodel: 2021-09-24 05:43:56.426709 - step 9 of 96 - 2508 active elements (492 deactivated)
13:44:40 INFO    opendrift.models.basemodel: 2021-09-24 06:13:56.426709 - step 10 of 96 - 1579 active elements (1421 deactivated)
13:44:43 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0013352315 to -6.8106033e-06) found for ocean_vertical_diffusivity, replacing with NaN
13:44:43 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:44:43 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:44:43 INFO    opendrift.models.basemodel: 2021-09-24 06:43:56.426709 - step 11 of 96 - 1100 active elements (1900 deactivated)
13:44:43 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:44:44 INFO    opendrift.models.basemodel: 2021-09-24 07:13:56.426709 - step 12 of 96 - 1043 active elements (1957 deactivated)
13:44:47 WARNING opendrift.readers.basereader.variables: Invalid values (-0.003863129 to -0.00041683318) found for ocean_vertical_diffusivity, replacing with NaN
13:44:47 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:44:47 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:44:47 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:44:47 INFO    opendrift.models.basemodel: 2021-09-24 07:43:56.426709 - step 13 of 96 - 1039 active elements (1961 deactivated)
13:44:47 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:44:47 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:44:48 INFO    opendrift.models.basemodel: 2021-09-24 08:13:56.426709 - step 14 of 96 - 1039 active elements (1961 deactivated)
13:44:51 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0038033212 to -0.0008770997) found for ocean_vertical_diffusivity, replacing with NaN
13:44:51 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:44:51 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:44:51 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:44:51 INFO    opendrift.models.basemodel: 2021-09-24 08:43:56.426709 - step 15 of 96 - 1039 active elements (1961 deactivated)
13:44:51 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:44:51 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:44:51 INFO    opendrift.models.basemodel: 2021-09-24 09:13:56.426709 - step 16 of 96 - 1030 active elements (1970 deactivated)
13:44:55 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0052692485 to -0.0016505329) found for ocean_vertical_diffusivity, replacing with NaN
13:44:55 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:44:55 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:44:55 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:44:55 INFO    opendrift.models.basemodel: 2021-09-24 09:43:56.426709 - step 17 of 96 - 970 active elements (2030 deactivated)
13:44:55 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:44:55 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:44:55 INFO    opendrift.models.basemodel: 2021-09-24 10:13:56.426709 - step 18 of 96 - 705 active elements (2295 deactivated)
13:44:58 WARNING opendrift.readers.basereader.variables: Invalid values (-0.005533978 to -0.0007559553) found for ocean_vertical_diffusivity, replacing with NaN
13:44:58 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:44:58 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:44:58 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:44:59 INFO    opendrift.models.basemodel: 2021-09-24 10:43:56.426709 - step 19 of 96 - 291 active elements (2709 deactivated)
13:44:59 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:44:59 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:44:59 INFO    opendrift.models.basemodel: 2021-09-24 11:13:56.426709 - step 20 of 96 - 151 active elements (2849 deactivated)
13:45:02 WARNING opendrift.readers.basereader.variables: Invalid values (-0.005900955 to -0.001074151) found for ocean_vertical_diffusivity, replacing with NaN
13:45:02 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:45:02 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:02 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:02 INFO    opendrift.models.basemodel: 2021-09-24 11:43:56.426709 - step 21 of 96 - 139 active elements (2861 deactivated)
13:45:02 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:02 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:02 INFO    opendrift.models.basemodel: 2021-09-24 12:13:56.426709 - step 22 of 96 - 139 active elements (2861 deactivated)
13:45:05 WARNING opendrift.readers.basereader.variables: Invalid values (-0.005817483 to -0.0009042259) found for ocean_vertical_diffusivity, replacing with NaN
13:45:05 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:45:05 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:05 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:06 INFO    opendrift.models.basemodel: 2021-09-24 12:43:56.426709 - step 23 of 96 - 139 active elements (2861 deactivated)
13:45:06 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:06 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:06 INFO    opendrift.models.basemodel: 2021-09-24 13:13:56.426709 - step 24 of 96 - 139 active elements (2861 deactivated)
13:45:09 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0050459574 to -0.00092339737) found for ocean_vertical_diffusivity, replacing with NaN
13:45:09 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:45:09 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:09 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:09 INFO    opendrift.models.basemodel: 2021-09-24 13:43:56.426709 - step 25 of 96 - 139 active elements (2861 deactivated)
13:45:09 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:09 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:09 INFO    opendrift.models.basemodel: 2021-09-24 14:13:56.426709 - step 26 of 96 - 139 active elements (2861 deactivated)
13:45:13 WARNING opendrift.readers.basereader.variables: Invalid values (-0.002762611 to -0.00018341847) found for ocean_vertical_diffusivity, replacing with NaN
13:45:13 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:45:13 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:13 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:13 INFO    opendrift.models.basemodel: 2021-09-24 14:43:56.426709 - step 27 of 96 - 139 active elements (2861 deactivated)
13:45:13 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:13 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:13 INFO    opendrift.models.basemodel: 2021-09-24 15:13:56.426709 - step 28 of 96 - 139 active elements (2861 deactivated)
13:45:16 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:16 INFO    opendrift.models.basemodel: 2021-09-24 15:43:56.426709 - step 29 of 96 - 139 active elements (2861 deactivated)
13:45:16 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:16 INFO    opendrift.models.basemodel: 2021-09-24 16:13:56.426709 - step 30 of 96 - 139 active elements (2861 deactivated)
13:45:20 INFO    opendrift.models.basemodel: 2021-09-24 16:43:56.426709 - step 31 of 96 - 139 active elements (2861 deactivated)
13:45:20 INFO    opendrift.models.basemodel: 2021-09-24 17:13:56.426709 - step 32 of 96 - 139 active elements (2861 deactivated)
13:45:24 INFO    opendrift.models.basemodel: 2021-09-24 17:43:56.426709 - step 33 of 96 - 139 active elements (2861 deactivated)
13:45:24 INFO    opendrift.models.basemodel: 2021-09-24 18:13:56.426709 - step 34 of 96 - 139 active elements (2861 deactivated)
13:45:27 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0012129311 to -6.4036045e-05) found for ocean_vertical_diffusivity, replacing with NaN
13:45:27 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:45:27 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:27 INFO    opendrift.models.basemodel: 2021-09-24 18:43:56.426709 - step 35 of 96 - 139 active elements (2861 deactivated)
13:45:27 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:27 INFO    opendrift.models.basemodel: 2021-09-24 19:13:56.426709 - step 36 of 96 - 139 active elements (2861 deactivated)
13:45:31 WARNING opendrift.readers.basereader.variables: Invalid values (-0.003971156 to -0.0003079417) found for ocean_vertical_diffusivity, replacing with NaN
13:45:31 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:45:31 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:31 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:31 INFO    opendrift.models.basemodel: 2021-09-24 19:43:56.426709 - step 37 of 96 - 139 active elements (2861 deactivated)
13:45:31 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:31 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:31 INFO    opendrift.models.basemodel: 2021-09-24 20:13:56.426709 - step 38 of 96 - 139 active elements (2861 deactivated)
13:45:34 WARNING opendrift.readers.basereader.variables: Invalid values (-0.004470114 to -8.1400896e-05) found for ocean_vertical_diffusivity, replacing with NaN
13:45:34 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:45:34 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:34 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:34 INFO    opendrift.models.basemodel: 2021-09-24 20:43:56.426709 - step 39 of 96 - 139 active elements (2861 deactivated)
13:45:34 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:34 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:34 INFO    opendrift.models.basemodel: 2021-09-24 21:13:56.426709 - step 40 of 96 - 139 active elements (2861 deactivated)
13:45:38 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0036325012 to -4.56904e-05) found for ocean_vertical_diffusivity, replacing with NaN
13:45:38 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:45:38 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:38 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:38 INFO    opendrift.models.basemodel: 2021-09-24 21:43:56.426709 - step 41 of 96 - 139 active elements (2861 deactivated)
13:45:38 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:38 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:38 INFO    opendrift.models.basemodel: 2021-09-24 22:13:56.426709 - step 42 of 96 - 137 active elements (2863 deactivated)
13:45:41 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0028889144 to -3.4552013e-05) found for ocean_vertical_diffusivity, replacing with NaN
13:45:41 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:45:41 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:41 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:41 INFO    opendrift.models.basemodel: 2021-09-24 22:43:56.426709 - step 43 of 96 - 137 active elements (2863 deactivated)
13:45:41 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:41 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:41 INFO    opendrift.models.basemodel: 2021-09-24 23:13:56.426709 - step 44 of 96 - 135 active elements (2865 deactivated)
13:45:45 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0025038284 to -4.3960707e-05) found for ocean_vertical_diffusivity, replacing with NaN
13:45:45 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:45:45 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:45 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:45 INFO    opendrift.models.basemodel: 2021-09-24 23:43:56.426709 - step 45 of 96 - 135 active elements (2865 deactivated)
13:45:45 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:45 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:45 INFO    opendrift.models.basemodel: 2021-09-25 00:13:56.426709 - step 46 of 96 - 135 active elements (2865 deactivated)
13:45:49 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0030159638 to -3.4533892e-05) found for ocean_vertical_diffusivity, replacing with NaN
13:45:49 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:45:49 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:49 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:49 INFO    opendrift.models.basemodel: 2021-09-25 00:43:56.426709 - step 47 of 96 - 135 active elements (2865 deactivated)
13:45:49 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:49 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:49 INFO    opendrift.models.basemodel: 2021-09-25 01:13:56.426709 - step 48 of 96 - 135 active elements (2865 deactivated)
13:45:52 WARNING opendrift.readers.basereader.variables: Invalid values (-0.002857125 to -2.2578328e-05) found for ocean_vertical_diffusivity, replacing with NaN
13:45:52 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:45:52 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:52 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:52 INFO    opendrift.models.basemodel: 2021-09-25 01:43:56.426709 - step 49 of 96 - 135 active elements (2865 deactivated)
13:45:52 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:52 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:52 INFO    opendrift.models.basemodel: 2021-09-25 02:13:56.426709 - step 50 of 96 - 135 active elements (2865 deactivated)
13:45:56 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0025817612 to -1.96481e-05) found for ocean_vertical_diffusivity, replacing with NaN
13:45:56 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:45:56 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:56 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:56 INFO    opendrift.models.basemodel: 2021-09-25 02:43:56.426709 - step 51 of 96 - 135 active elements (2865 deactivated)
13:45:56 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:56 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:56 INFO    opendrift.models.basemodel: 2021-09-25 03:13:56.426709 - step 52 of 96 - 135 active elements (2865 deactivated)
13:45:59 WARNING opendrift.readers.basereader.variables: Invalid values (-3.0042018e-05 to -5.6308236e-06) found for ocean_vertical_diffusivity, replacing with NaN
13:45:59 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:45:59 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:59 INFO    opendrift.models.basemodel: 2021-09-25 03:43:56.426709 - step 53 of 96 - 135 active elements (2865 deactivated)
13:45:59 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:45:59 INFO    opendrift.models.basemodel: 2021-09-25 04:13:56.426709 - step 54 of 96 - 135 active elements (2865 deactivated)
13:46:03 INFO    opendrift.models.basemodel: 2021-09-25 04:43:56.426709 - step 55 of 96 - 135 active elements (2865 deactivated)
13:46:03 INFO    opendrift.models.basemodel: 2021-09-25 05:13:56.426709 - step 56 of 96 - 135 active elements (2865 deactivated)
13:46:06 INFO    opendrift.models.basemodel: 2021-09-25 05:43:56.426709 - step 57 of 96 - 135 active elements (2865 deactivated)
13:46:06 INFO    opendrift.models.basemodel: 2021-09-25 06:13:56.426709 - step 58 of 96 - 135 active elements (2865 deactivated)
13:46:09 WARNING opendrift.readers.basereader.variables: Invalid values (-0.00031657514 to -2.7631336e-06) found for ocean_vertical_diffusivity, replacing with NaN
13:46:09 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:46:10 INFO    opendrift.models.basemodel: 2021-09-25 06:43:56.426709 - step 59 of 96 - 135 active elements (2865 deactivated)
13:46:10 INFO    opendrift.models.basemodel: 2021-09-25 07:13:56.426709 - step 60 of 96 - 135 active elements (2865 deactivated)
13:46:13 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0035361873 to -3.637314e-05) found for ocean_vertical_diffusivity, replacing with NaN
13:46:13 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:46:13 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:13 INFO    opendrift.models.basemodel: 2021-09-25 07:43:56.426709 - step 61 of 96 - 135 active elements (2865 deactivated)
13:46:13 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:13 INFO    opendrift.models.basemodel: 2021-09-25 08:13:56.426709 - step 62 of 96 - 135 active elements (2865 deactivated)
13:46:17 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0050418004 to -5.216552e-05) found for ocean_vertical_diffusivity, replacing with NaN
13:46:17 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:46:17 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:17 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:17 INFO    opendrift.models.basemodel: 2021-09-25 08:43:56.426709 - step 63 of 96 - 135 active elements (2865 deactivated)
13:46:17 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:17 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:17 INFO    opendrift.models.basemodel: 2021-09-25 09:13:56.426709 - step 64 of 96 - 135 active elements (2865 deactivated)
13:46:20 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0048684347 to -8.526694e-05) found for ocean_vertical_diffusivity, replacing with NaN
13:46:20 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:46:20 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:20 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:20 INFO    opendrift.models.basemodel: 2021-09-25 09:43:56.426709 - step 65 of 96 - 135 active elements (2865 deactivated)
13:46:20 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:20 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:20 INFO    opendrift.models.basemodel: 2021-09-25 10:13:56.426709 - step 66 of 96 - 135 active elements (2865 deactivated)
13:46:24 WARNING opendrift.readers.basereader.variables: Invalid values (-0.004136459 to -0.00014810801) found for ocean_vertical_diffusivity, replacing with NaN
13:46:24 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:46:24 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:24 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:24 INFO    opendrift.models.basemodel: 2021-09-25 10:43:56.426709 - step 67 of 96 - 135 active elements (2865 deactivated)
13:46:24 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:24 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:24 INFO    opendrift.models.basemodel: 2021-09-25 11:13:56.426709 - step 68 of 96 - 135 active elements (2865 deactivated)
13:46:27 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0047497028 to -0.000108734144) found for ocean_vertical_diffusivity, replacing with NaN
13:46:27 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:46:27 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:27 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:27 INFO    opendrift.models.basemodel: 2021-09-25 11:43:56.426709 - step 69 of 96 - 135 active elements (2865 deactivated)
13:46:27 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:27 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:28 INFO    opendrift.models.basemodel: 2021-09-25 12:13:56.426709 - step 70 of 96 - 135 active elements (2865 deactivated)
13:46:31 WARNING opendrift.readers.basereader.variables: Invalid values (-0.003988147 to -0.00015581466) found for ocean_vertical_diffusivity, replacing with NaN
13:46:31 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:46:31 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:31 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:31 INFO    opendrift.models.basemodel: 2021-09-25 12:43:56.426709 - step 71 of 96 - 135 active elements (2865 deactivated)
13:46:31 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:31 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:31 INFO    opendrift.models.basemodel: 2021-09-25 13:13:56.426709 - step 72 of 96 - 135 active elements (2865 deactivated)
13:46:34 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0046545058 to -5.71936e-05) found for ocean_vertical_diffusivity, replacing with NaN
13:46:34 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:46:34 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:34 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:34 INFO    opendrift.models.basemodel: 2021-09-25 13:43:56.426709 - step 73 of 96 - 135 active elements (2865 deactivated)
13:46:34 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:34 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:34 INFO    opendrift.models.basemodel: 2021-09-25 14:13:56.426709 - step 74 of 96 - 135 active elements (2865 deactivated)
13:46:38 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0028867305 to -2.2675415e-05) found for ocean_vertical_diffusivity, replacing with NaN
13:46:38 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:46:38 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:38 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:38 INFO    opendrift.models.basemodel: 2021-09-25 14:43:56.426709 - step 75 of 96 - 135 active elements (2865 deactivated)
13:46:38 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:38 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:38 INFO    opendrift.models.basemodel: 2021-09-25 15:13:56.426709 - step 76 of 96 - 135 active elements (2865 deactivated)
13:46:41 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0009939148 to -1.3035186e-05) found for ocean_vertical_diffusivity, replacing with NaN
13:46:41 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:46:41 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:41 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:41 INFO    opendrift.models.basemodel: 2021-09-25 15:43:56.426709 - step 77 of 96 - 135 active elements (2865 deactivated)
13:46:41 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:41 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:41 INFO    opendrift.models.basemodel: 2021-09-25 16:13:56.426709 - step 78 of 96 - 135 active elements (2865 deactivated)
13:46:45 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:45 INFO    opendrift.models.basemodel: 2021-09-25 16:43:56.426709 - step 79 of 96 - 135 active elements (2865 deactivated)
13:46:45 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:45 INFO    opendrift.models.basemodel: 2021-09-25 17:13:56.426709 - step 80 of 96 - 135 active elements (2865 deactivated)
13:46:48 INFO    opendrift.models.basemodel: 2021-09-25 17:43:56.426709 - step 81 of 96 - 135 active elements (2865 deactivated)
13:46:49 INFO    opendrift.models.basemodel: 2021-09-25 18:13:56.426709 - step 82 of 96 - 135 active elements (2865 deactivated)
13:46:52 INFO    opendrift.models.basemodel: 2021-09-25 18:43:56.426709 - step 83 of 96 - 135 active elements (2865 deactivated)
13:46:52 INFO    opendrift.models.basemodel: 2021-09-25 19:13:56.426709 - step 84 of 96 - 135 active elements (2865 deactivated)
13:46:55 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0021069602 to -3.05968e-05) found for ocean_vertical_diffusivity, replacing with NaN
13:46:55 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:46:55 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:56 INFO    opendrift.models.basemodel: 2021-09-25 19:43:56.426709 - step 85 of 96 - 135 active elements (2865 deactivated)
13:46:56 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:56 INFO    opendrift.models.basemodel: 2021-09-25 20:13:56.426709 - step 86 of 96 - 135 active elements (2865 deactivated)
13:46:59 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0029279813 to -9.568319e-05) found for ocean_vertical_diffusivity, replacing with NaN
13:46:59 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:46:59 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:59 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:59 INFO    opendrift.models.basemodel: 2021-09-25 20:43:56.426709 - step 87 of 96 - 135 active elements (2865 deactivated)
13:46:59 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:59 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:46:59 INFO    opendrift.models.basemodel: 2021-09-25 21:13:56.426709 - step 88 of 96 - 135 active elements (2865 deactivated)
13:47:02 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0025072265 to -3.4719356e-05) found for ocean_vertical_diffusivity, replacing with NaN
13:47:02 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:47:02 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:47:02 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:47:02 INFO    opendrift.models.basemodel: 2021-09-25 21:43:56.426709 - step 89 of 96 - 135 active elements (2865 deactivated)
13:47:02 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:47:02 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:47:03 INFO    opendrift.models.basemodel: 2021-09-25 22:13:56.426709 - step 90 of 96 - 135 active elements (2865 deactivated)
13:47:06 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0014589722 to -2.169472e-05) found for ocean_vertical_diffusivity, replacing with NaN
13:47:06 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:47:06 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:47:06 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:47:06 INFO    opendrift.models.basemodel: 2021-09-25 22:43:56.426709 - step 91 of 96 - 135 active elements (2865 deactivated)
13:47:06 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:47:06 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:47:06 INFO    opendrift.models.basemodel: 2021-09-25 23:13:56.426709 - step 92 of 96 - 135 active elements (2865 deactivated)
13:47:09 WARNING opendrift.readers.basereader.variables: Invalid values (-0.00065596873 to -2.289778e-05) found for ocean_vertical_diffusivity, replacing with NaN
13:47:09 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:47:09 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:47:09 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:47:10 INFO    opendrift.models.basemodel: 2021-09-25 23:43:56.426709 - step 93 of 96 - 135 active elements (2865 deactivated)
13:47:10 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:47:10 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:47:10 INFO    opendrift.models.basemodel: 2021-09-26 00:13:56.426709 - step 94 of 96 - 135 active elements (2865 deactivated)
13:47:13 WARNING opendrift.readers.basereader.variables: Invalid values (-0.0013138086 to -2.3865128e-05) found for ocean_vertical_diffusivity, replacing with NaN
13:47:13 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:47:13 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:47:13 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:47:13 INFO    opendrift.models.basemodel: 2021-09-26 00:43:56.426709 - step 95 of 96 - 135 active elements (2865 deactivated)
13:47:13 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:47:13 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:47:13 INFO    opendrift.models.basemodel: 2021-09-26 01:13:56.426709 - step 96 of 96 - 135 active elements (2865 deactivated)
13:47:17 WARNING opendrift.readers.basereader.variables: Invalid values (-0.001462354 to -4.5295634e-05) found for ocean_vertical_diffusivity, replacing with NaN
13:47:17 WARNING opendrift.readers.basereader.variables: (allowed range: [0, 1])
13:47:17 WARNING opendrift: Only NaNs input to linearNDFast - returning
13:47:17 WARNING opendrift: Only NaNs input to linearNDFast - returning

Print and plot results

print(o)
o.animation(background='sea_ice_area_fraction', cmap=cmocean.cm.ice,
            vmin=0, vmax=1, bgalpha=1, fast=False)

Out:

===========================
--------------------
Reader performance:
--------------------
global_landmask
 0:00:00.0  total
 0:00:00.0  preparing
 0:00:00.0  reading
 0:00:00.0  masking
--------------------
https://thredds.met.no/thredds/dodsC/barents25km_agg
 0:02:53.4  total
 0:00:00.0  preparing
 0:02:49.0  reading
 0:00:00.7  interpolation
 0:00:00.1  interpolation_time
 0:00:04.3  rotating vectors
 0:00:00.0  masking
--------------------
Performance:
 3:21.2 total time
    0.2 configuration
   18.5 preparing main loop
     18.4 making dynamical landmask
      0.0 moving elements to ocean
   2:56.7 readers
        0.0 global_landmask
        0.3 postprocessing
 3:02.3 main loop
     2:53.6 https://thredds.met.no/thredds/dodsC/barents25km_agg
      4.9 updating elements
        0.7 oil weathering
          0.0 updating viscosities
          0.7 updating densities
        3.9 vertical mixing
    0.0 cleaning up
--------------------
===========================
Model:  OpenOil     (OpenDrift version 1.7.1)
        135 active Oil particles  (2865 deactivated, 0 scheduled)
-------------------
Environment variables:
  -----
  land_binary_mask
     1) global_landmask
  -----
  ocean_vertical_diffusivity
  sea_floor_depth_below_sea_level
  sea_ice_area_fraction
  sea_ice_x_velocity
  sea_ice_y_velocity
  sea_water_salinity
  sea_water_temperature
  upward_sea_water_velocity
  x_sea_water_velocity
  x_wind
  y_sea_water_velocity
  y_wind
     1) https://thredds.met.no/thredds/dodsC/barents25km_agg
  -----
Readers not added for the following variables:
  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

Time:
        Start: 2021-09-24 01:43:56.426709
        Present: 2021-09-26 01:43:56.426709
        Calculation steps: 96 * 0:30:00 - total time: 2 days, 0:00:00
        Output steps: 49 * 1:00:00
===========================

13:47:21 INFO    opendrift.models.basemodel: Saving animation to /root/project/docs/source/gallery/animations/example_oil_ice_0.gif...
13:47:21 INFO    opendrift.models.basemodel: Making animated gif...
MovieWriter imagemagick unavailable; using Pillow instead.
../_images/example_oil_ice_0.gif
o.plot(background='sea_ice_area_fraction', cmap=cmocean.cm.ice,
       vmin=0, vmax=1, bgalpha=1, fast=False)
OpenDrift - OpenOil (AASGARD A 2003) 2021-09-24 01:43 to 2021-09-26 01:43 UTC (49 steps)

Out:

(<GeoAxesSubplot:title={'center':'OpenDrift - OpenOil (AASGARD A 2003)\n2021-09-24 01:43 to 2021-09-26 01:43 UTC (49 steps)'}>, <module 'matplotlib.pyplot' from '/opt/conda/envs/opendrift/lib/python3.9/site-packages/matplotlib/pyplot.py'>)

Total running time of the script: ( 3 minutes 53.288 seconds)

Gallery generated by Sphinx-Gallery