Core module

class pytide.core.AstronomicAngle

Bases: pybind11_builtins.pybind11_object

__init__(self: pytide.core.AstronomicAngle, date: handle = None) None

Initialize some astronomic data useful for nodal corrections.

Parameters

date (datetime.datetime, optional) – Desired UTC time

property h

Mean longitude of the sun

property i

Obliquity of lunar orbit with respect to earth’s equator

property n

Longitude of moon’s node

property nu

Right ascension of lunar intersection

property nuprim

Term in argument of lunisolar constituent \(K_{1}\)

property nusec

Term in argument of lunisolar constituent \(K_{2}\)

property p

Mean longitude of lunar perigee

property p1

Mean longitude of solar perigee

property r

Term in argument of constituent \(L_{2}\)

property s

Mean longitude of the moon

property t

Hour angle of mean sun

property x1ra

Factor in amplitude of constituent \(L_{2}\)

property xi

Longitude in moon’s orbit of lunar intersection

class pytide.core.Wave

Bases: pybind11_builtins.pybind11_object

Wave definition

__init__(*args, **kwargs)
class Ident

Bases: pybind11_builtins.pybind11_object

Members:

kMm : \(Mm\)

kMf : \(Mf\)

kMtm : \(Mtm\)

kMsqm : \(Msqm\)

k2Q1 : \(2Q_{1}\)

kSigma1 : \(\sigma_{1}\)

kQ1 : \(Q_{1}\)

kRho1 : \(\rho_{1}\)

kO1 : \(O_{1}\)

kMP1 : \(MP_{1}\)

kM11 : \(M_{11}\)

kM12 : \(M_{12}\)

kM13 : \(M_{13}\)

kChi1 : \(\chi_{1}\)

kPi1 : \(\pi_{1}\)

kP1 : \(P_{1}\)

kS1 : \(S_{1}\)

kK1 : \(K_{1}\)

kPsi1 : \(\psi_{1}\)

kPhi1 : \(\varphi_{1}\)

kTheta1 : \(\theta_{1}\)

kJ1 : \(J_{1}\)

kOO1 : \(OO_{1}\)

kMNS2 : \(MNS_{2}\)

kEps2 : \(\varepsilon_{2}\)

k2N2 : \(2N_{2}\)

kMu2 : \(\upsilon_{2}\)

k2MS2 : \(2MS_{2}\)

kN2 : \(N_{2}\)

kNu2 : \(\nu_{2}\)

kM2 : \(M_{2}\)

kMKS2 : \(MKS_{2}\)

kLambda2 : \(\lambda_{2}\)

kL2 : \(L_{2}\)

k2MN2 : \(2MN_{2}\)

kT2 : \(T_{2}\)

kS2 : \(S_{2}\)

kR2 : \(R_{2}\)

kK2 : \(K_{2}\)

kMSN2 : \(MSN_{2}\)

kEta2 : \(\eta_{2}\)

k2SM2 : \(2SM_{2}\)

kMO3 : \(MO_{3}\)

k2MK3 : \(2MK_{3}\)

kM3 : \(M_{3}\)

kMK3 : \(MK_{3}\)

kN4 : \(N_{4}\)

kMN4 : \(MN_{4}\)

kM4 : \(M_{4}\)

kSN4 : \(SN_{4}\)

kMS4 : \(MS_{4}\)

kMK4 : \(MK_{4}\)

kS4 : \(S_{4}\)

kSK4 : \(SK_{4}\)

kR4 : \(R_{4}\)

k2MN6 : \(2MN_{6}\)

kM6 : \(M_{6}\)

kMSN6 : \(MSN_{6}\)

k2MS6 : \(2MS_{6}\)

k2MK6 : \(2MK_{6}\)

k2SM6 : \(2SM_{6}\)

kMSK6 : \(MSK_{6}\)

kS6 : \(S_{6}\)

kM8 : \(M_{8}\)

kMSf : \(MSf\)

kSsa : \(Ssa\)

kSa : \(Sa\)

property name
class TidalType

Bases: pybind11_builtins.pybind11_object

Possible type of tidal wave

Members:

kLongPeriod : Long period tidal waves

kShortPeriod : Short period tidal waves

property name
property f

Gets the nodal correction for amplitude

property freq

Gets the wave frequency (radians per seconds)

property ident

Gets the wave ident

name(self: pytide.core.Wave) str

Gets the wave name

nodal_a(self: pytide.core.Wave, a: pytide.core.AstronomicAngle) None

Compute nodal corrections from SCHUREMAN (1958).

Parameters

a (pytide.core.AstronomicAngle) – Astronomic angle

nodal_g(self: pytide.core.Wave, a: pytide.core.AstronomicAngle) None

Compute nodal corrections from SCHUREMAN (1958).

Parameters

a (pytide.core.AstronomicAngle) – Astronomic angle

property type

Gets the wave type

property u

Gets the nodal correction for phase

v(self: pytide.core.Wave) float

Gets \(v\) (greenwich argument)

vu(self: pytide.core.Wave) float

Gets \(v\) (greenwich argument) + \(u\) (nodal correction for phase)

class pytide.core.WaveTable

Bases: pybind11_builtins.pybind11_object

Properties of tide waves computed

__init__(self: pytide.core.WaveTable, waves: List[str] = []) None
compute_nodal_corrections(self: pytide.core.WaveTable, date: handle) pytide.core.AstronomicAngle

Compute nodal corrections.

Parameters

date (datetime.datetime) – Desired UTC date

Returns

The astronomic angle, indicating the date on which the tide is to be calculated.

Return type

pytide.core.AstronomicAngle

compute_nodal_modulations(self: pytide.core.WaveTable, dates: numpy.ndarray) tuple

Compute nodal modulations for amplitude and phase.

Parameters

dates (numpy.ndarray) – Desired UTC time. The array must be one-dimensional

:param and of type numpy.datetime64.:

Returns

the nodal correction for amplitude, v (greenwich argument) + u (nodal correction for phase)

Return type

tuple

static harmonic_analysis(h: numpy.ndarray[numpy.float64[m, 1]], f: numpy.ndarray[numpy.float64[m, n], flags.f_contiguous], vu: numpy.ndarray[numpy.float64[m, n], flags.f_contiguous]) numpy.ndarray[numpy.complex128[m, 1]]

Harmonic Analysis

Parameters
  • h (numpy.ndarray) – Sea level.

  • f (numpy.ndarray) – Nodal correction coefficient applied to the amplitude of the constituents analyzed.

  • vu (numpy.ndarray) – Astronomical argument at time \(t\) + the nodal correction coefficient applied to the phase of the constituents analyzed

Returns

The complex number representing the different reconstructed waves.

Return type

numpy.ndarray

static known_constituents() List[str]

Gets the tidal waves known by this object

tide_from_mapping(self: pytide.core.WaveTable, date: handle, wave: numpy.ndarray[numpy.complex128[m, n], flags.f_contiguous]) numpy.ndarray[numpy.float64]

Calculates the tide for a given tidal wave mapping.

Parameters
  • date (datetime.datetime) – Mapping date

  • wave (numpy.ndarray) – A matrix containing the wave properties for each point on the map.

Returns

The tide calculated on the area of interest provided.

Return type

numpy.ndarray

tide_from_tide_series(self: pytide.core.WaveTable, dates: numpy.ndarray, wave: numpy.ndarray[numpy.complex128[m, 1]]) numpy.ndarray[numpy.float64]

Calculates the tide of a given time series.

Parameters
  • dates (numpy.ndarray) – UTC dates. The array must be one-dimensional and of type numpy.datetime64.

  • wave (numpy.ndarray) – Tidal wave properties.

Returns

The tide calculated for the time series provided.

Return type

numpy.ndarray

wave(*args, **kwargs)

Overloaded function.

  1. wave(self: pytide.core.WaveTable, ident: pytide.core.Wave.Ident) -> pytide.core.Wave

Gets the wave properties

  1. wave(self: pytide.core.WaveTable, ident: str) -> pytide.core.Wave

Gets the wave properties