opendrift.readers.reader_telemac_selafin

Module Contents

Classes

Reader

A reader for unstructured (irregularily gridded) Telemac3D files.

opendrift.readers.reader_telemac_selafin.logger
opendrift.readers.reader_telemac_selafin.pytel
class opendrift.readers.reader_telemac_selafin.Reader(filename=None, name=None, proj4=None)[source]

Bases: opendrift.readers.basereader.BaseReader, opendrift.readers.basereader.UnstructuredReader

A reader for unstructured (irregularily gridded) Telemac3D files.

Args:
param filename

A single Selafin file

type filename

string, required.

param name

Name of reader

type name

string, optional

param proj4

PROJ.4 string describing projection of data.

type proj4

string, optional

See also

py:mod:opendrift.readers.basereader.unstructured.

Common constructor for all readers

plot_mesh(self)[source]

Plot the grid mesh. Does not automatically show the figure.

get_variables(self, requested_variables, time=None, x=None, y=None, z=None)[source]
  • Query variables based on the particle coordinates x, y, z

  • find the nearest node in the KD tree

  • extract the z array corresponding.

  • extract the index of the node within the 3D mesh

  • extract the variables at the point

Args:

x,y,z: np.arrays(float)

3D coordinates of the particles

time: np.datetime64

age of the particle set

variables: np.array(int)

indexes of variables

Returns:

variables: dictionary of numpy arrays

filter_points(self, indexes)[source]

Filter points that are not within the grid. use finite element method to evaluate properties ~~~ To be continued ~~~