opendrift.models.leeway ======================= .. py:module:: opendrift.models.leeway .. autoapi-nested-parse:: Leeway is the search and rescue (SAR) model developed by the US Coast Guard, as originally described in Allen, A.A, 2005: Leeway Divergence, USCG R&D Center Technical Report CG-D-05-05. Available through http://www.ntis.gov, reference ADA435435 Allen A.A. and J.V. Plourde (1999) Review of Leeway; Field Experiments and Implementation, USCG R&D Center Technical Report CG-D-08-99. Available through http://www.ntis.gov, reference ADA366414 and later extended and modified by e.g. Breivik, O., A. Allen, C. Maisondieu, J.-C. Roth, and B. Forest, 2012: The leeway of shipping containers at different immersion levels. Ocean Dyn., 62, 741–752, doi:10.1007/s10236-012-0522-z The Leeway model is based on empirically determined coefficients as tabulated in https://github.com/OpenDrift/opendrift/blob/master/opendrift/models/OBJECTPROP.DAT The Leeway model is been reprogrammed in Python for OpenDrift by Knut-Frode Dagestad of the Norwegian Meteorological Institute. Attributes ---------- .. autoapisummary:: opendrift.models.leeway.logger opendrift.models.leeway.RIGHT opendrift.models.leeway.LEFT Classes ------- .. autoapisummary:: opendrift.models.leeway.LeewayObj opendrift.models.leeway.Leeway Module Contents --------------- .. py:data:: logger .. py:data:: RIGHT :value: 0 .. py:data:: LEFT :value: 1 .. py:class:: LeewayObj(**kwargs) Bases: :py:obj:`opendrift.elements.LagrangianArray` Extending LagrangianArray with variables relevant for leeway 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. .. py:attribute:: variables .. py:class:: Leeway(d=None, *args, **kwargs) Bases: :py:obj:`opendrift.models.basemodel.OpenDriftSimulation` The Leeway model in the OpenDrift framework. Advects a particle (a drifting object) with the ambient current and as a function of the wind vector according to the drift properties 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 :py:mod:`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. 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') logfile: None (default) to send output to console. A string to send output to logfile. Or to get output to both terminal and file: [, logging.StreamHandler(sys.stdout)] .. py:attribute:: ElementType Any trajectory model implementation must define an ElementType. .. py:attribute:: required_variables Any trajectory model implementation must list needed variables. .. py:attribute:: status_colors .. py:attribute:: leewayprop .. py:method:: seed_elements(lon, lat, object_type=None, **kwargs) Seed particles in a cone-shaped area over a time period. .. py:method:: list_object_categories(substr=None) Display leeway categories to screen Print only objects containing 'substr', if specified .. py:method:: plot_capsize_probability() .. py:method:: capsize_probability(wind, threshold, sigma) .. py:method:: update() Update positions and properties of leeway particles. .. py:method:: export_ascii(filename) Export output to ASCII format of original version .. py:method:: _substance_name()