Skip to content

Commit

Permalink
Merge pull request #1356 from AchrefAO/i1355_openberg
Browse files Browse the repository at this point in the history
#1355_Corrected version_icebergs module
  • Loading branch information
knutfrode authored Jul 4, 2024
2 parents 92a714d + fc0f5d6 commit 3a3de84
Show file tree
Hide file tree
Showing 2 changed files with 170 additions and 89 deletions.
25 changes: 15 additions & 10 deletions examples/example_openberg.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
#!/usr/bin/env python
"""
Icebergs (OpenBerg module)
==========================
Icebergs (openberg)
====================
"""

from opendrift.models.openberg import OpenBerg
from datetime import datetime,timedelta

o = OpenBerg(add_stokes_drift = True,
wave_rad = True,
grounding = False,
vertical_profile = False,
melting = False,
choose_melting = {"wave": True, "lateral": True, "basal": True})
o = OpenBerg()

# The user can overwrite the default setup using set_config method
o.set_config('drift:vertical_profile', False) # use surface currents for this test



o.add_readers_from_list([
'https://thredds.met.no/thredds/dodsC/cmems/topaz6/dataset-topaz6-arc-15min-3km-be.ncml',
'https://pae-paha.pacioos.hawaii.edu/thredds/dodsC/ncep_global/NCEP_Global_Atmospheric_Model_best.ncd'])


o.seed_elements(lon= -57,lat= 69,time=datetime.now(), number=1000, radius=1000)
o.run(duration=timedelta(days=2))
o.seed_elements(lon= -56,lat= 72,time=datetime.now(),
number=100, radius=500,
sail=10,draft=50,length=90,width=40)

o.run(duration=timedelta(days=3))
o.plot(fast=True)
o.plot_property('draft')

Loading

0 comments on commit 3a3de84

Please sign in to comment.