Note
Go to the end to download the full example code.
Generic example
from datetime import datetime, timedelta
from opendrift.readers import reader_netCDF_CF_generic
from opendrift.models.openoil import OpenOil
o = OpenOil(loglevel=20) # Set loglevel to 0 for debug information
# Arome atmospheric model
reader_arome = reader_netCDF_CF_generic.Reader(o.test_data_folder() + '16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc')
# Norkyst ocean model
reader_norkyst = reader_netCDF_CF_generic.Reader(o.test_data_folder() + '16Nov2015_NorKyst_z_surface/norkyst800_subset_16Nov2015.nc')
# Uncomment to use live data from thredds
#reader_arome = reader_netCDF_CF_generic.Reader('https://thredds.met.no/thredds/dodsC/mepslatest/meps_lagged_6_h_latest_2_5km_latest.nc')
#reader_norkyst = reader_netCDF_CF_generic.Reader('https://thredds.met.no/thredds/dodsC/sea/norkyst800m/1h/aggregate_be')
o.add_reader([reader_norkyst, reader_arome])
12:55:28 INFO opendrift.models.basemodel:515: OpenDriftSimulation initialised (version 1.11.13 / v1.11.13-99-gd2132d3)
12:55:28 INFO opendrift.readers.reader_netCDF_CF_generic:102: Opening dataset: /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc
12:55:28 INFO opendrift.readers.reader_netCDF_CF_generic:325: Detected dimensions: {'time': 'time', 'x': 'x', 'y': 'y'}
12:55:28 INFO opendrift.readers.reader_netCDF_CF_generic:102: Opening dataset: /root/project/tests/test_data/16Nov2015_NorKyst_z_surface/norkyst800_subset_16Nov2015.nc
12:55:29 INFO opendrift.readers.reader_netCDF_CF_generic:325: Detected dimensions: {'x': 'X', 'y': 'Y', 'z': 'depth', 'time': 'time'}
Seeding some particles time = datetime(2015, 9, 22, 6, 0, 0)
time = [reader_arome.start_time,
reader_arome.start_time + timedelta(hours=30)]
#time = reader_arome.start_time
Adjusting some configuration
o.set_config('drift:vertical_mixing', False)
o.set_config('processes:dispersion', False)
o.set_config('processes:evaporation', False)
o.set_config('processes:emulsification', True)
o.set_config('drift:current_uncertainty', .1)
o.set_config('drift:wind_uncertainty', 1)
# Seed oil elements at defined position and time
o.seed_elements(lon=4.6, lat=60.0, radius=50, number=3000, time=time,
wind_drift_factor=.02)
12:55:29 INFO opendrift.models.openoil.openoil:1710: Oil type not specified, using default: GENERIC BUNKER C
12:55:29 INFO opendrift.models.openoil.adios.dirjs:90: Querying ADIOS database for oil: GENERIC BUNKER C
12:55:29 INFO opendrift.models.openoil.openoil:1719: Using density 971.1 and viscosity 0.0005020658058702914 of oiltype GENERIC BUNKER C
12:55:29 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:55:32 INFO opendrift.models.basemodel.environment:245: Fallback values will be used for the following variables which have no readers:
12:55:32 INFO opendrift.models.basemodel.environment:248: sea_surface_height: 0.000000
12:55:32 INFO opendrift.models.basemodel.environment:248: upward_sea_water_velocity: 0.000000
12:55:32 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_significant_height: 0.000000
12:55:32 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_stokes_drift_x_velocity: 0.000000
12:55:32 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_stokes_drift_y_velocity: 0.000000
12:55:32 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_period_at_variance_spectral_density_maximum: 0.000000
12:55:32 INFO opendrift.models.basemodel.environment:248: sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment: 0.000000
12:55:32 INFO opendrift.models.basemodel.environment:248: sea_ice_area_fraction: 0.000000
12:55:32 INFO opendrift.models.basemodel.environment:248: sea_ice_x_velocity: 0.000000
12:55:32 INFO opendrift.models.basemodel.environment:248: sea_ice_y_velocity: 0.000000
12:55:32 INFO opendrift.models.basemodel.environment:248: sea_water_temperature: 10.000000
12:55:32 INFO opendrift.models.basemodel.environment:248: sea_water_salinity: 34.000000
12:55:32 INFO opendrift.models.basemodel.environment:248: sea_floor_depth_below_sea_level: 10000.000000
12:55:32 INFO opendrift.models.basemodel.environment:248: ocean_vertical_diffusivity: 0.020000
12:55:32 INFO opendrift.models.basemodel.environment:248: ocean_mixed_layer_thickness: 50.000000
Running model
o.run(end_time=reader_norkyst.end_time, time_step=1800,
time_step_output=3600, outfile='openoil.nc',
export_variables=['mass_oil'])
12:55:33 INFO opendrift.models.basemodel:936: Using existing reader for land_binary_mask
12:55:33 INFO opendrift.models.basemodel:947: All points are in ocean
12:55:33 INFO opendrift.models.openoil.openoil:687: Oil-water surface tension is 0.035282 Nm
12:55:33 INFO opendrift.models.openoil.openoil:700: Max water fraction not available for GENERIC BUNKER C, using default
12:55:33 INFO opendrift.models.basemodel:2038: 2015-11-16 00:00:00 - step 1 of 132 - 50 active elements (0 deactivated)
12:55:33 INFO opendrift.models.basemodel:2038: 2015-11-16 00:30:00 - step 2 of 132 - 100 active elements (0 deactivated)
12:55:33 INFO opendrift.models.basemodel:2038: 2015-11-16 01:00:00 - step 3 of 132 - 150 active elements (0 deactivated)
12:55:33 INFO opendrift.models.basemodel:2038: 2015-11-16 01:30:00 - step 4 of 132 - 200 active elements (0 deactivated)
12:55:33 INFO opendrift.models.basemodel:2038: 2015-11-16 02:00:00 - step 5 of 132 - 250 active elements (0 deactivated)
12:55:33 INFO opendrift.models.basemodel:2038: 2015-11-16 02:30:00 - step 6 of 132 - 300 active elements (0 deactivated)
12:55:33 INFO opendrift.models.basemodel:2038: 2015-11-16 03:00:00 - step 7 of 132 - 350 active elements (0 deactivated)
12:55:33 INFO opendrift.models.basemodel:2038: 2015-11-16 03:30:00 - step 8 of 132 - 400 active elements (0 deactivated)
12:55:33 INFO opendrift.models.basemodel:2038: 2015-11-16 04:00:00 - step 9 of 132 - 450 active elements (0 deactivated)
12:55:33 INFO opendrift.models.basemodel:2038: 2015-11-16 04:30:00 - step 10 of 132 - 500 active elements (0 deactivated)
12:55:33 INFO opendrift.models.basemodel:2038: 2015-11-16 05:00:00 - step 11 of 132 - 550 active elements (0 deactivated)
12:55:33 INFO opendrift.models.basemodel:2038: 2015-11-16 05:30:00 - step 12 of 132 - 600 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 06:00:00 - step 13 of 132 - 650 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 06:30:00 - step 14 of 132 - 700 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 07:00:00 - step 15 of 132 - 750 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 07:30:00 - step 16 of 132 - 800 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 08:00:00 - step 17 of 132 - 850 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 08:30:00 - step 18 of 132 - 900 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 09:00:00 - step 19 of 132 - 950 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 09:30:00 - step 20 of 132 - 1000 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 10:00:00 - step 21 of 132 - 1050 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 10:30:00 - step 22 of 132 - 1100 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 11:00:00 - step 23 of 132 - 1150 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 11:30:00 - step 24 of 132 - 1200 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 12:00:00 - step 25 of 132 - 1250 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 12:30:00 - step 26 of 132 - 1300 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 13:00:00 - step 27 of 132 - 1350 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 13:30:00 - step 28 of 132 - 1400 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 14:00:00 - step 29 of 132 - 1450 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 14:30:00 - step 30 of 132 - 1500 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 15:00:00 - step 31 of 132 - 1550 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 15:30:00 - step 32 of 132 - 1600 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 16:00:00 - step 33 of 132 - 1650 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 16:30:00 - step 34 of 132 - 1700 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 17:00:00 - step 35 of 132 - 1750 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 17:30:00 - step 36 of 132 - 1800 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 18:00:00 - step 37 of 132 - 1850 active elements (0 deactivated)
12:55:34 INFO opendrift.models.basemodel:2038: 2015-11-16 18:30:00 - step 38 of 132 - 1900 active elements (0 deactivated)
12:55:35 INFO opendrift.models.basemodel:2038: 2015-11-16 19:00:00 - step 39 of 132 - 1950 active elements (0 deactivated)
12:55:35 INFO opendrift.models.basemodel:2038: 2015-11-16 19:30:00 - step 40 of 132 - 2000 active elements (0 deactivated)
/root/project/opendrift/readers/interpolation/interpolators.py:17: RuntimeWarning: overflow encountered in cast
data[mask] = np.finfo(np.float64).min
12:55:35 INFO opendrift.models.basemodel:2038: 2015-11-16 20:00:00 - step 41 of 132 - 2050 active elements (0 deactivated)
12:55:35 INFO opendrift.models.basemodel:2038: 2015-11-16 20:30:00 - step 42 of 132 - 2100 active elements (0 deactivated)
12:55:35 INFO opendrift.models.basemodel:2038: 2015-11-16 21:00:00 - step 43 of 132 - 2150 active elements (0 deactivated)
12:55:36 INFO opendrift.models.basemodel:2038: 2015-11-16 21:30:00 - step 44 of 132 - 2200 active elements (0 deactivated)
12:55:36 INFO opendrift.models.basemodel:2038: 2015-11-16 22:00:00 - step 45 of 132 - 2250 active elements (0 deactivated)
12:55:38 INFO opendrift.models.basemodel:2038: 2015-11-16 22:30:00 - step 46 of 132 - 2296 active elements (4 deactivated)
12:55:38 INFO opendrift.models.basemodel:2038: 2015-11-16 23:00:00 - step 47 of 132 - 2336 active elements (14 deactivated)
12:55:38 INFO opendrift.models.basemodel:2038: 2015-11-16 23:30:00 - step 48 of 132 - 2376 active elements (24 deactivated)
12:55:38 INFO opendrift.models.basemodel:2038: 2015-11-17 00:00:00 - step 49 of 132 - 2402 active elements (48 deactivated)
12:55:38 INFO opendrift.models.basemodel:2038: 2015-11-17 00:30:00 - step 50 of 132 - 2394 active elements (106 deactivated)
12:55:38 INFO opendrift.models.basemodel:2038: 2015-11-17 01:00:00 - step 51 of 132 - 2361 active elements (189 deactivated)
12:55:39 INFO opendrift.models.basemodel:2038: 2015-11-17 01:30:00 - step 52 of 132 - 2344 active elements (256 deactivated)
12:55:39 INFO opendrift.models.basemodel:2038: 2015-11-17 02:00:00 - step 53 of 132 - 2337 active elements (313 deactivated)
12:55:39 INFO opendrift.models.basemodel:2038: 2015-11-17 02:30:00 - step 54 of 132 - 2305 active elements (395 deactivated)
12:55:39 INFO opendrift.models.basemodel:2038: 2015-11-17 03:00:00 - step 55 of 132 - 2295 active elements (455 deactivated)
12:55:39 INFO opendrift.models.basemodel:2038: 2015-11-17 03:30:00 - step 56 of 132 - 2258 active elements (542 deactivated)
12:55:39 INFO opendrift.models.basemodel:2038: 2015-11-17 04:00:00 - step 57 of 132 - 2189 active elements (661 deactivated)
12:55:39 INFO opendrift.models.basemodel:2038: 2015-11-17 04:30:00 - step 58 of 132 - 2138 active elements (762 deactivated)
12:55:39 INFO opendrift.models.basemodel:2038: 2015-11-17 05:00:00 - step 59 of 132 - 2071 active elements (879 deactivated)
12:55:40 INFO opendrift.models.basemodel:2038: 2015-11-17 05:30:00 - step 60 of 132 - 2018 active elements (982 deactivated)
12:55:40 INFO opendrift.models.basemodel:2038: 2015-11-17 06:00:00 - step 61 of 132 - 1929 active elements (1071 deactivated)
12:55:40 INFO opendrift.models.basemodel:2038: 2015-11-17 06:30:00 - step 62 of 132 - 1852 active elements (1148 deactivated)
12:55:40 INFO opendrift.models.basemodel:2038: 2015-11-17 07:00:00 - step 63 of 132 - 1771 active elements (1229 deactivated)
12:55:40 INFO opendrift.models.basemodel:2038: 2015-11-17 07:30:00 - step 64 of 132 - 1726 active elements (1274 deactivated)
12:55:40 INFO opendrift.models.basemodel:2038: 2015-11-17 08:00:00 - step 65 of 132 - 1688 active elements (1312 deactivated)
12:55:40 INFO opendrift.models.basemodel:2038: 2015-11-17 08:30:00 - step 66 of 132 - 1651 active elements (1349 deactivated)
12:55:40 INFO opendrift.models.basemodel:2038: 2015-11-17 09:00:00 - step 67 of 132 - 1624 active elements (1376 deactivated)
12:55:40 INFO opendrift.models.basemodel:2038: 2015-11-17 09:30:00 - step 68 of 132 - 1564 active elements (1436 deactivated)
12:55:40 INFO opendrift.models.basemodel:2038: 2015-11-17 10:00:00 - step 69 of 132 - 1497 active elements (1503 deactivated)
12:55:40 INFO opendrift.models.basemodel:2038: 2015-11-17 10:30:00 - step 70 of 132 - 1445 active elements (1555 deactivated)
12:55:40 INFO opendrift.models.basemodel:2038: 2015-11-17 11:00:00 - step 71 of 132 - 1403 active elements (1597 deactivated)
12:55:41 INFO opendrift.models.basemodel:2038: 2015-11-17 11:30:00 - step 72 of 132 - 1338 active elements (1662 deactivated)
12:55:41 INFO opendrift.models.basemodel:2038: 2015-11-17 12:00:00 - step 73 of 132 - 1256 active elements (1744 deactivated)
12:55:41 INFO opendrift.models.basemodel:2038: 2015-11-17 12:30:00 - step 74 of 132 - 1151 active elements (1849 deactivated)
12:55:41 INFO opendrift.models.basemodel:2038: 2015-11-17 13:00:00 - step 75 of 132 - 1054 active elements (1946 deactivated)
12:55:41 INFO opendrift.models.basemodel:2038: 2015-11-17 13:30:00 - step 76 of 132 - 972 active elements (2028 deactivated)
12:55:41 INFO opendrift.models.basemodel:2038: 2015-11-17 14:00:00 - step 77 of 132 - 883 active elements (2117 deactivated)
12:55:41 INFO opendrift.models.basemodel:2038: 2015-11-17 14:30:00 - step 78 of 132 - 816 active elements (2184 deactivated)
12:55:41 INFO opendrift.models.basemodel:2038: 2015-11-17 15:00:00 - step 79 of 132 - 745 active elements (2255 deactivated)
12:55:41 INFO opendrift.models.basemodel:2038: 2015-11-17 15:30:00 - step 80 of 132 - 695 active elements (2305 deactivated)
12:55:42 INFO opendrift.models.basemodel:2038: 2015-11-17 16:00:00 - step 81 of 132 - 651 active elements (2349 deactivated)
12:55:42 INFO opendrift.models.basemodel:2038: 2015-11-17 16:30:00 - step 82 of 132 - 618 active elements (2382 deactivated)
12:55:42 INFO opendrift.models.basemodel:2038: 2015-11-17 17:00:00 - step 83 of 132 - 593 active elements (2407 deactivated)
12:55:42 INFO opendrift.models.basemodel:2038: 2015-11-17 17:30:00 - step 84 of 132 - 568 active elements (2432 deactivated)
12:55:42 INFO opendrift.models.basemodel:2038: 2015-11-17 18:00:00 - step 85 of 132 - 552 active elements (2448 deactivated)
12:55:42 INFO opendrift.models.basemodel:2038: 2015-11-17 18:30:00 - step 86 of 132 - 537 active elements (2463 deactivated)
12:55:42 INFO opendrift.models.basemodel:2038: 2015-11-17 19:00:00 - step 87 of 132 - 522 active elements (2478 deactivated)
12:55:42 INFO opendrift.models.basemodel:2038: 2015-11-17 19:30:00 - step 88 of 132 - 504 active elements (2496 deactivated)
12:55:42 INFO opendrift.models.basemodel:2038: 2015-11-17 20:00:00 - step 89 of 132 - 495 active elements (2505 deactivated)
12:55:42 INFO opendrift.models.basemodel:2038: 2015-11-17 20:30:00 - step 90 of 132 - 480 active elements (2520 deactivated)
12:55:42 INFO opendrift.models.basemodel:2038: 2015-11-17 21:00:00 - step 91 of 132 - 470 active elements (2530 deactivated)
12:55:42 INFO opendrift.models.basemodel:2038: 2015-11-17 21:30:00 - step 92 of 132 - 464 active elements (2536 deactivated)
12:55:42 INFO opendrift.models.basemodel:2038: 2015-11-17 22:00:00 - step 93 of 132 - 460 active elements (2540 deactivated)
12:55:42 INFO opendrift.models.basemodel:2038: 2015-11-17 22:30:00 - step 94 of 132 - 452 active elements (2548 deactivated)
12:55:42 INFO opendrift.models.basemodel:2038: 2015-11-17 23:00:00 - step 95 of 132 - 443 active elements (2557 deactivated)
12:55:42 INFO opendrift.models.basemodel:2038: 2015-11-17 23:30:00 - step 96 of 132 - 423 active elements (2577 deactivated)
12:55:42 INFO opendrift.models.basemodel:2038: 2015-11-18 00:00:00 - step 97 of 132 - 402 active elements (2598 deactivated)
12:55:42 INFO opendrift.models.basemodel:2038: 2015-11-18 00:30:00 - step 98 of 132 - 375 active elements (2625 deactivated)
12:55:42 INFO opendrift.models.basemodel:2038: 2015-11-18 01:00:00 - step 99 of 132 - 341 active elements (2659 deactivated)
12:55:42 INFO opendrift.models.basemodel:2038: 2015-11-18 01:30:00 - step 100 of 132 - 314 active elements (2686 deactivated)
12:55:42 INFO opendrift.models.basemodel:2038: 2015-11-18 02:00:00 - step 101 of 132 - 270 active elements (2730 deactivated)
12:55:42 INFO opendrift.models.basemodel:2038: 2015-11-18 02:30:00 - step 102 of 132 - 208 active elements (2792 deactivated)
12:55:43 INFO opendrift.models.basemodel:2038: 2015-11-18 03:00:00 - step 103 of 132 - 136 active elements (2864 deactivated)
12:55:43 INFO opendrift.models.basemodel:2038: 2015-11-18 03:30:00 - step 104 of 132 - 79 active elements (2921 deactivated)
12:55:43 INFO opendrift.models.basemodel:2038: 2015-11-18 04:00:00 - step 105 of 132 - 38 active elements (2962 deactivated)
12:55:43 INFO opendrift.models.basemodel:2038: 2015-11-18 04:30:00 - step 106 of 132 - 15 active elements (2985 deactivated)
12:55:43 INFO opendrift.models.basemodel:2038: 2015-11-18 05:00:00 - step 107 of 132 - 8 active elements (2992 deactivated)
12:55:43 INFO opendrift.models.basemodel:2038: 2015-11-18 05:30:00 - step 108 of 132 - 4 active elements (2996 deactivated)
12:55:43 INFO opendrift.models.basemodel:2038: 2015-11-18 06:00:00 - step 109 of 132 - 3 active elements (2997 deactivated)
12:55:43 INFO opendrift.models.basemodel:2038: 2015-11-18 06:30:00 - step 110 of 132 - 1 active elements (2999 deactivated)
12:55:43 INFO opendrift.models.basemodel:2038: 2015-11-18 07:00:00 - step 111 of 132 - 1 active elements (2999 deactivated)
12:55:43 INFO opendrift.models.basemodel:2038: 2015-11-18 07:30:00 - step 112 of 132 - 1 active elements (2999 deactivated)
12:55:43 INFO opendrift.models.basemodel:2038: 2015-11-18 08:00:00 - step 113 of 132 - 1 active elements (2999 deactivated)
12:55:43 INFO opendrift.models.basemodel:2038: 2015-11-18 08:30:00 - step 114 of 132 - 1 active elements (2999 deactivated)
12:55:43 INFO opendrift.models.basemodel:2038: 2015-11-18 09:00:00 - step 115 of 132 - 1 active elements (2999 deactivated)
12:55:43 INFO opendrift.models.basemodel:2038: 2015-11-18 09:30:00 - step 116 of 132 - 1 active elements (2999 deactivated)
12:55:43 INFO opendrift.models.basemodel:2038: 2015-11-18 10:00:00 - step 117 of 132 - 1 active elements (2999 deactivated)
12:55:43 INFO opendrift.models.basemodel:2038: 2015-11-18 10:30:00 - step 118 of 132 - 1 active elements (2999 deactivated)
12:55:43 WARNING opendrift.models.basemodel:2134: The simulation stopped before requested end time was reached.
12:55:43 INFO opendrift.models.basemodel:2136: ========================
12:55:43 INFO opendrift.models.basemodel:2137: End of simulation:
12:55:43 INFO opendrift.models.basemodel:2138: No more active or scheduled elements, quitting.
12:55:43 INFO opendrift.models.basemodel:2139: Traceback (most recent call last):
File "/root/project/opendrift/models/basemodel/__init__.py", line 2101, in run
raise ValueError(
ValueError: No more active or scheduled elements, quitting.
12:55:43 INFO opendrift.models.basemodel:2140: 'The simulation stopped before requested end time was reached.'
12:55:43 INFO opendrift.models.basemodel:2143: ========================
12:55:43 INFO opendrift.export.io_netcdf:121: Wrote 60 steps to file openoil.nc
/opt/conda/envs/opendrift/lib/python3.11/site-packages/numpy/ma/core.py:467: RuntimeWarning: invalid value encountered in cast
fill_value = np.array(fill_value, copy=False, dtype=ndtype)
Print and plot results
o.plot(fast=True)
#o.plot(background=['x_sea_water_velocity', 'y_sea_water_velocity'], buffer=.5)
#o.animation(fast=True)
#o.animation(density=True, show_elements=False, fast=True)
12:55:43 WARNING opendrift.models.basemodel:2411: Plotting fast. This will make your plots less accurate.
(<GeoAxes: title={'center': 'OpenDrift - OpenOil (GENERIC BUNKER C)\n2015-11-16 00:00 to 2015-11-18 11:00 UTC (60 steps)'}>, <Figure size 480.568x1100 with 1 Axes>)
Or an animation can be generated with:
o.animation(fast=True)
12:55:56 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:55:58 INFO opendrift.models.basemodel:4613: Saving animation to /root/project/docs/source/gallery/animations/example_generic_0.gif...
12:56:37 INFO opendrift.models.basemodel:3037: Time to make animation: 0:00:41.189805
Total running time of the script: (1 minutes 14.035 seconds)