constituents

Basic tide model constituent class

Source code

General Attributes and Methods

class pyTMD.io.constituents(**kwargs)[source]

Class for tide model constituents

Attributes:
fields: list

list of tide model constituents

append(field: str, constituent: ndarray)[source]

Append a tide model constituent

Parameters:
field: str

Tide model constituent name

constituent: np.ndarray

Tide model constituent (complex form)

get(field: str)[source]

Get a tide model constituent

Parameters:
field: str

Tide model constituent name

Returns:
constituent: np.ndarray

Tide model constituent (complex form)

pop(field: str)[source]

Retrieve a tide model constituent and remove from list

Parameters:
field: str

Tide model constituent name

Returns:
constituent: np.ndarray

Tide model constituent (complex form)

update(field: str, constituent: ndarray)[source]

Update a tide model constituent

Parameters:
field: str

Tide model constituent name

constituent: np.ndarray

Tide model constituent (complex form)

amplitude(field: str)[source]

Calculate the amplitude of a tide model constituent

Parameters:
field: str

Tide model constituent name

Returns:
amp: np.ndarray

Tide model constituent amplitude

phase(field: str)[source]

Calculate the phase of a tide model constituent

Parameters:
field: str

Tide model constituent name

Returns:
ph: float

Tide model constituent phase (degrees)

property doodson_number

Doodson number for constituents

property cartwright_number

Cartwright numbers for constituents

property extended_doodson

Extended Doodson numbers for constituents

property shape

Shape of constituent fields

static parse(constituent: str) str[source]

Parses for tidal constituents using regular expressions and remapping of known cases

Parameters:
constituent: str

Unparsed tidal constituent name