constants

  • Harmonic tidal analysis with minor constituent inference

Source code

pyTMD.solve.constants(t: float | ndarray, ht: ndarray, constituents: str | list | ndarray, deltat: float | ndarray = 0.0, corrections: str = 'OTIS', solver: str = 'lstsq', order: int = 0, infer_minor: bool = False, minor_constituents: list = [], bounds: tuple = (-inf, inf), max_iter: int | None = None, infer_iter: int = 1)[source]

Estimate the harmonic constants for a time series [20, 23, 59]

Parameters:
t: float or np.ndarray

Days relative to 1992-01-01T00:00:00

ht: np.ndarray

Input time series (elevation or currents)

constituents: str, list or np.ndarray

Tidal constituent ID(s)

deltat: float or np.ndarray, default 0.0

Time correction for converting to Ephemeris Time (days)

corrections: str, default ‘OTIS’

Use nodal corrections from OTIS/ATLAS or GOT/FES models

solver: str, default ‘lstsq’

Least squares solver to use

  • 'lstsq': least squares solution

  • 'gelsy': complete orthogonal factorization

  • 'gelss': singular value decomposition (SVD)

  • 'gelsd': SVD with divide-and-conquer method

  • 'bvls': bounded-variable least-squares

order: int, default 0

Degree of the polynomial to add to fit

infer_minor: bool, default False

Infer minor tidal constituents

minor_constituents: list or None, default None

Specify constituents to infer

bounds: tuple, default (None, None)

Lower and upper bounds on parameters for 'bvls'

max_iter: int or None, default None

Maximum number of iterations for 'bvls'

infer_iter: int, default 1

Maximum number of iterations for inferring minor constituents

Returns:
ds: xr.Dataset

Dataset of complex harmonic constants