opendrift.models.openberg
OpenBerg is an iceberg drift module bundled within the OpenDrift framework. It is a 2D drift model, but utilizes 3D current data. The latest version of the module is an improved version of a model initially created by Ron Saper at the Carleton University as a part of a larger project funded by the MITACS Organization.
See Ice berg (openberg) deterministic for an example of a deterministic simulation.
Statistical modeling of current velocity
The reader opendrift.readers.reader_current_from_track
is designed specifically for iceberg drift modeling. The reader uses observed positions and (if available) wind data to extrapolate the current velocity. The reader creates a uniform current field equal to the average residual speed (after subtracting wind component) of the iceberg between two observations.
This reader allows for a statistical or partly statistical modeling of iceberg drift when used with the OpenBerg module. An example script utilizing this reader can be found in Openberg  statistical mode.
Parameters and iceberg properties affecting drift
Icebergs are advected at a constant fraction of the wind velocity, the default setting is wind_drift_factor = 0.018
.
The module accounts for iceberg geometry by creating a composite iceberg using the method described by Barker et. al. (2004), where the geometry is described as a function of the waterline length and the keel depth of the iceberg. For further information please refer to Barker et. al. (2004).
The default settings for the geometry is water_line_length = 90.5
and keel_depth = 60
. The composite iceberg is used to calculate a weighted average of the current velocity across the iceberg keel.
water_line_length is normally used to describe the length of a ship where it sits in the water. It should therefore be taken not as the circumference, but the width (or length) of the iceberg (presumably at its longest crosssection).
keel_depth is the depth of the ice berg from the water line. Ice bergs usually have a density of 0.92 g/mL, sea water has a density of about 1.03 g/mL. This means that about 90% of the ice berg mass is below the water. For a reasonably symmetric iceberg the keel depth can be estimated naively to be 9 times greater than the observed height above the water line.
The values of wind_drift_factor, water_line_length and keel_depth may be explicitly altered during seeding, e.g.:
o.seed_elements(4, 62, time=datetime.now(),
water_line_length=100, keel_depth=90, wind_drift_factor=0.02)
Reference: Barker, A., Sayed, M., Carrieres, T., et al. (2004). Determination of iceberg draft, mass and crosssectional areas.
Module Contents
Classes
Extending LagrangianArray with variables relevant for iceberg objects. 

The Deterministic iceberg model in the OpenDrift framework. 
Attributes
 opendrift.models.openberg.logger
 class opendrift.models.openberg.IcebergObj(**kwargs)[source]
Bases:
opendrift.elements.elements.LagrangianArray
Extending LagrangianArray with variables relevant for iceberg objects.
Initialises a LagrangianArray with given properties.
 Args:
Keyword arguments (kwargs) with names corresponding to the OrderedDict ‘variables’ of the class, and corresponding values. The values must be ndarrays of equal length, or scalars. All (or none) variables must be given, unless a default value is specified in the OrderedDict ‘variables’ An empty object may be created by giving no input.
 variables
 class opendrift.models.openberg.OpenBerg(d=None, label=None, *args, **kwargs)[source]
Bases:
opendrift.models.basemodel.OpenDriftSimulation
The Deterministic iceberg model in the OpenDrift framework.
Advects an iceberg with the current at all available depths and as a function of the wind vector according to the above and below water crosssectional profile of the object.
Initialise OpenDriftSimulation
 Args:
 seed: integer or None. A given integer will yield identical
random numbers drawn each simulation. Random numbers are e.g. used to distribute particles spatially when seeding, and may be used by modules (subclasses) for e.g. diffusion. Specifying a fixed value (default: 0) is useful for sensitivity tests. With seed = None, different random numbers will be drawn for subsequent runs, even with identical configuration/input.
 iomodule: name of module used to export data
default: netcdf, see
opendrift.io
for more alternatives. iomodule is module/filename without preceeding io_ loglevel: set to 0 (default) to retrieve all debug information.
Provide a higher value (e.g. 20) to receive less output. Use the string ‘custom’ to configure logging from outside.
 logtime: if True, a time stamp is given for each logging line.
logtime can also be given as a python time specifier (e.g. ‘%H:%M:%S’)
 ElementType
 required_variables
 status_colors
 seed_elements(*args, **kwargs)[source]
Seed elements with given position(s), time and properties.
 Arguments:
 lon: scalar or array
central longitude(s).
 lat: scalar or array
central latitude(s).
 radius: scalar or array
radius in meters around each lonlat pair, within which particles will be randomly seeded.
 number: integer, total number of particles to be seeded
If number is None, the number of elements is the length of lon/lat or time if these are arrays. Otherwise the number of elements are obtained from the configdefault.
 time: datenum or list
The time at which particles are seeded/released. If time is a list with two elements, elements are seeded continously from start/first to end/last time. If time is a list with more than two elements, the number of elements is equal to len(time) and are seeded as a time series.
 radius_type: string
If ‘gaussian’ (default), the radius is the standard deviation in xydirections. If ‘uniform’, elements are spread evenly and always inside a circle with the given radius.
 kwargs:
keyword arguments containing properties/attributes and values corresponding to the actual particle type (ElementType). These are forwarded to the ElementType class. All properties for which there are no default value must be specified.
 prepare_run()[source]
Model spesific preparations. Set the weighting for modelled current depths as per Table 5 of Barker 2004, ‘Determination of Iceberg Draft, Mass and CrossSectional Areas’, Proceedings of The Fourteenth (2004) International Offshore and Polar Engineering Conference.
NB! This version of OpenBerg does not allow for seeding of iceberg elements of different sizes.
Also controles that the model handles readers without block data correctly.