o.seed_elements(lon=4.5,
                lat=62.0,
                z='seafloor',
                radius=0,
                number=3000,
                time=time,
                oil_type='GENERIC DIESEL')

#%%
# Setting the range of droplet sizes for the seafloor release
o.set_config('seed:droplet_diameter_min_subsea', 0.0001)
o.set_config('seed:droplet_diameter_max_subsea', 0.0005)

#%%
# Running model with a small timestep to resolve the boyant rising
o.run(duration=timedelta(hours=2), time_step=60, time_step_output=60)

#%%
# Print and plot results
print(o)

o.animation_profile()
#%%
# .. image:: /gallery/animations/example_oilspill_seafloor_0.gif

o.animate_vertical_distribution(bins=30, subsamplingstep=5)
#%%
# .. image:: /gallery/animations/example_oilspill_seafloor_1.gif

o.plot_oil_budget()
                    lat=62.1,
                    z=0,
                    radius=1000,
                    number=2000,
                    time=reader_arome.start_time)

    # Adjusting some configuration
    #o.set_config('vertical_mixing:diffusivitymodel', 'windspeed_Sundby1983')

    # Running model
    o.run(end_time=reader_arome.start_time + timedelta(hours=12),
          time_step=900,
          time_step_output=1800,
          outfile=ncfile)

#%%
# Print and plot results
print(o)

o.plot(linecolor='z', fast=True)
o.plot_property('z')
o.plot_oil_budget()
o.animation(fast=True)
o.animate_vertical_distribution()

os.remove(ncfile)  # cleaning up

#%%
# .. image:: /gallery/animations/example_oil_verticalmixing_0.gif
# .. image:: /gallery/animations/example_oil_verticalmixing_1.gif
Example #3
0
o.seed_elements(lon=4.5,
                lat=62.0,
                z='seafloor',
                radius=0,
                number=3000,
                time=time,
                oiltype='*GENERIC DIESEL')

#%%
# Setting the range of droplet sizes for the seafloor release
o.set_config('seed:droplet_diameter_min_subsea', 0.0001)
o.set_config('seed:droplet_diameter_max_subsea', 0.0005)

#%%
# Running model with a small timestep to resolve the boyant rising
o.run(duration=timedelta(hours=2), time_step=60, time_step_output=60)

#%%
# Print and plot results
print(o)

o.animation_profile()
#%%
# .. image:: /gallery/animations/example_oilspill_seafloor_0.gif

o.animate_vertical_distribution(bins=30)
#%%
# .. image:: /gallery/animations/example_oilspill_seafloor_1.gif

o.plot_oil_budget()