- class pyfes.core.WaveTable#
Bases:
pybind11_object
Properties of tide waves computed
- __init__(self: pyfes.core.WaveTable, waves: collections.abc.Sequence[str] = []) None #
- admittance(self: pyfes.core.WaveTable) None #
Compute waves by admittance from these 7 major ones : O1, Q1, K1, 2n2, N2, M2, K2.
- compute_nodal_corrections(self: pyfes.core.WaveTable, angles: pyfes.core.AstronomicAngle) None #
Compute nodal corrections.
- Parameters:
angles – Astronomic angle, indicating the date on which the tide is to be calculated.
- compute_nodal_modulations(self: pyfes.core.WaveTable, dates: numpy.ndarray, leap_seconds: typing.Annotated[numpy.typing.NDArray[numpy.uint16], "[m, 1]"], formulae: pyfes.core.Formulae = <Formulae.kSchuremanOrder3: 1>) tuple[Annotated[numpy.typing.NDArray[numpy.float64], '[m, n]'], Annotated[numpy.typing.NDArray[numpy.float64], '[m, n]']] #
Compute nodal modulations for amplitude and phase.
- Parameters:
dates – Desired UTC time. The array must be one-dimensional and of type
numpy.datetime64
.leap_seconds – Leap seconds at the date of the tide calculation.
formulae – Astronomic formulae used to calculate the astronomic angles. Defaults to
pyfes.Formulae.kSchuremanOrder3
.
- Returns:
the nodal correction for amplitude, v (greenwich argument) + u (nodal correction for phase)
- Return type:
tuple
- find(self: pyfes.core.WaveTable, ident: str) pyfes.core.Wave #
Find a wave in the table by its name.
- Parameters:
name – Name of the wave. The search is not case sensitive, so “M2” and “m2” are equivalent.
- Returns:
The wave if found, None otherwise.
- static harmonic_analysis(h: Annotated[numpy.typing.NDArray[numpy.float64], '[m, 1]'], f: Annotated[numpy.typing.NDArray[numpy.float64], '[m, n]'], vu: Annotated[numpy.typing.NDArray[numpy.float64], '[m, n]']) Annotated[numpy.typing.NDArray[numpy.complex128], '[m, 1]'] #
Harmonic Analysis.
- Parameters:
h – Sea level.
f – Nodal correction coefficient applied to the amplitude of the constituents analyzed.
vu – 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.
- keys(self: pyfes.core.WaveTable) list[str] #
Return the list of tidal constituents handled by this instance.
- Returns:
List of tidal constituents.
- static select_waves_for_analysis(duration: SupportsFloat, f: SupportsFloat = 2.0) list[str] #
Return the list of tidal waves such that their period is more than twice the duration of the time series analyzed.
- Parameters:
duration – Duration of the time series analyzed in seconds
f – Number of times the period of the wave is greater than the duration of the time series analyzed
- Returns:
List of selected tidal waves.
- tide_from_mapping(self: pyfes.core.WaveTable, date: object, leap_seconds: typing.SupportsInt, mapping: typing.Annotated[numpy.typing.NDArray[numpy.complex128], "[m, n]"], formulae: pyfes.core.Formulae = <Formulae.kSchuremanOrder3: 1>, num_threads: typing.SupportsInt = 0) Annotated[numpy.typing.NDArray[numpy.float64], '[m, n]'] #
Calculates the tide for a given date from a grid describing the wave properties over an area of interest.
- Parameters:
date – UTC date.
leap_seconds – Leap seconds at the date of the tide calculation.
mapping – Mapping of the wave properties over an area of interest.
formulae – Astronomic formulae used to calculate the astronomic angles. Defaults to
pyfes.Formulae.kSchuremanOrder3
.num_threads – Number of threads to use. If 0, the number of threads is automatically determined.
- Returns:
The tide calculated for the mapping provided at the given date.
- tide_from_tide_series(self: pyfes.core.WaveTable, dates: numpy.ndarray, leap_seconds: typing.Annotated[numpy.typing.NDArray[numpy.uint16], "[m, 1]"], wave: typing.Annotated[numpy.typing.NDArray[numpy.complex128], "[m, 1]"], formulae: pyfes.core.Formulae = <Formulae.kSchuremanOrder3: 1>) Annotated[numpy.typing.NDArray[numpy.float64], '[m, 1]'] #
Calculates the tide of a given time series.
- Parameters:
dates – UTC dates. The array must be one-dimensional and of type
numpy.datetime64
.leap_seconds – Leap seconds at the date of the tide calculation.
wave – Tidal wave properties computed by
pyfes.WaveTable.harmonic_analysis
.formulae – Astronomic formulae used to calculate the astronomic angles. Defaults to
pyfes.Formulae.kSchuremanOrder3
.
- Returns:
The tide calculated for the time series provided.
- values(self: pyfes.core.WaveTable) list[pyfes.core.Wave] #
Return the list of tidal waves handled by this instance.
- Returns:
List of tidal waves.