arguments

  • Calculates the nodal corrections for tidal constituents

  • Originally based on Richard Ray’s ARGUMENTS fortran subroutine

Calling Sequence

import pyTMD.arguments
pu,pf,G = pyTMD.arguments.arguments(MJD, constituents,
    deltat=DELTAT, corrections=CORRECTIONS)

Source code

pyTMD.arguments.arguments(MJD: ndarray, constituents: list | ndarray, **kwargs)[source]

Calculates the nodal corrections for tidal constituents [17, 20, 43, 48]

Parameters:
MJD: np.ndarray

modified Julian day of input date

constituents: list

tidal constituent IDs

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, FES or GOT models

climate_solar_perigee: bool, default False

compute climatologically affected terms without p’

M1: str, default ‘perth5’

coefficients to use for M1 tides

  • 'Doodson'

  • 'Ray'

  • 'Schureman'

  • 'perth5'

Returns:
pu: np.ndarray

nodal angle correction

pf: np.ndarray

nodal factor correction

G: np.ndarray

phase correction in degrees

pyTMD.arguments.minor_arguments(MJD: ndarray, **kwargs)[source]

Calculates the nodal corrections for minor tidal constituents in order to infer their values [17, 19, 20, 48]

Parameters:
MJD: np.ndarray

modified Julian day of input date

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, FES or GOT models

Returns:
pu: np.ndarray

nodal angle correction

pf: np.ndarray

nodal factor correction

G: np.ndarray

phase correction in degrees

pyTMD.arguments.coefficients_table(constituents: list | tuple | ndarray | str, **kwargs)[source]

Doodson table coefficients for tidal constituents [16, 17, 43]

Parameters:
constituents: list, tuple, np.ndarray or str

tidal constituent IDs

corrections: str, default ‘OTIS’

use coefficients from OTIS, FES or GOT models

climate_solar_perigee: bool, default False

compute climatologically affected terms without p’

file: str or pathlib.Path, default `coefficients.json`

JSON file of Doodson coefficients

Returns:
coef: np.ndarray

Doodson coefficients (Cartwright numbers) for each constituent

pyTMD.arguments.doodson_number(constituents: str | list | ndarray, **kwargs)[source]

Calculates the Doodson or Cartwright number for tidal constituents [16]

Parameters:
constituents: str, list or np.ndarray

tidal constituent ID(s)

corrections: str, default ‘OTIS’

use arguments from OTIS, FES or GOT models

formalism: str, default ‘Doodson’

constituent identifier formalism

  • 'Cartwright'

  • 'Doodson'

  • 'Extended'

raise_error: bool, default True

Raise exception if constituent is unsupported

Returns:
numbers: float, np.ndarray or dict

Doodson or Cartwright number for each constituent

pyTMD.arguments.nodal(n: ndarray, p: ndarray, constituents: list | tuple | ndarray | str, **kwargs)[source]

Calculates the nodal corrections for tidal constituents [17, 20, 44, 48]

Calculates factors for compound tides using recursion

Parameters:
n: np.ndarray

mean longitude of ascending lunar node (degrees)

p: np.ndarray

mean longitude of lunar perigee (degrees)

constituents: list, tuple, np.ndarray or str

tidal constituent IDs

corrections: str, default ‘OTIS’

use nodal corrections from OTIS, FES or GOT models

M1: str, default ‘perth5’

coefficients to use for M1 tides

  • 'Doodson'

  • 'Ray'

  • 'Schureman'

  • 'perth5'

Returns:
f: np.ndarray

nodal factor correction

u: np.ndarray

nodal angle correction

pyTMD.arguments.frequency(constituents: list | ndarray, **kwargs)[source]

Calculates the angular frequency for tidal constituents [44]

Parameters:
constituents: list

tidal constituent IDs

corrections: str, default ‘OTIS’

use nodal corrections from OTIS, FES or GOT models

M1: str, default ‘perth5’

coefficients to use for M1 tides

  • 'Doodson'

  • 'Ray'

  • 'Schureman'

  • 'perth5'

Returns:
omega: np.ndarray

angular frequency in radians per second

pyTMD.arguments.aliasing_period(constituents: list | ndarray, sampling: float | ndarray, **kwargs)[source]

Calculates the tidal aliasing for a repeat period

Parameters:
constituents: list

tidal constituent IDs

sampling: float

sampling repeat period in seconds

corrections: str, default ‘OTIS’

use nodal corrections from OTIS, FES or GOT models

M1: str, default ‘perth5’

coefficients to use for M1 tides

  • 'Doodson'

  • 'Ray'

  • 'Schureman'

  • 'perth5'

Returns:
period: np.ndarray

tidal aliasing period in seconds

pyTMD.arguments._arguments_table(**kwargs)[source]

Arguments table for tidal constituents [16, 17]

Parameters:
corrections: str, default ‘OTIS’

use arguments from OTIS, FES or GOT models

climate_solar_perigee: bool, default False

compute climatologically affected terms without p’

Returns:
coef: np.ndarray

Doodson coefficients (Cartwright numbers) for each constituent

pyTMD.arguments._minor_table(**kwargs)[source]

Arguments table for minor tidal constituents [16, 17]

Returns:
coef: np.ndarray

Doodson coefficients (Cartwright numbers) for each constituent

pyTMD.arguments._constituent_parameters(c: str, **kwargs)[source]

Loads parameters for a given tidal constituent [19]

Parameters:
c: str

tidal constituent ID

raise_error: bool, default False

Raise exception if constituent is unsupported

Returns:
amplitude: float

amplitude of equilibrium tide for tidal constituent (meters)

phase: float

phase of tidal constituent (radians)

omega: float

angular frequency of constituent (radians)

alpha: float

load love number of tidal constituent

species: float

spherical harmonic dependence of quadrupole potential

pyTMD.arguments._love_numbers(omega: ndarray, model: str = 'PREM')[source]

Compute the body tide Love/Shida numbers for a given frequency [30, 54, 55, 57]

Parameters:
omega: np.ndarray

angular frequency (radians per second)

model: str, default ‘PREM’

Earth model to use for Love numbers

  • ‘1066A’

  • ‘1066A-N’ (neutral)

  • ‘1066A-S’ (stable)

  • ‘PEM-C’

  • ‘C2’

  • ‘PREM’

Returns:
h2: float

Degree-2 Love number of vertical displacement

k2: float

Degree-2 Love number of gravitational potential

l2: float

Degree-2 Love (Shida) number of horizontal displacement

pyTMD.arguments._parse_tide_potential_table(table: str | Path)[source]

Parse tables of tide-generating potential

Parameters:
table: str or pathlib.Path

table of tide-generating potentials

Returns:
CTE: float

Cartwright-Tayler-Edden table values

pyTMD.arguments._to_constituent_id(coef: list | ndarray, **kwargs)[source]

Converts Cartwright numbers into a tidal constituent ID

Parameters:
coef: list or np.ndarray

Doodson coefficients (Cartwright numbers) for constituent

corrections: str, default ‘GOT’

use coefficients from OTIS, FES or GOT models

climate_solar_perigee: bool, default False

use climatologically affected terms without p’

arguments: int, default 7

Number of astronomical arguments to use

file: str or pathlib.Path, default `coefficients.json`

JSON file of Doodson coefficients

raise_error: bool, default True

Raise exception if constituent is unsupported

Returns:
c: str

tidal constituent ID

pyTMD.arguments._to_doodson_number(coef: list | ndarray, **kwargs)[source]

Converts Cartwright numbers into a Doodson number

Parameters:
coef: list or np.ndarray

Doodson coefficients (Cartwright numbers) for constituent

astype: type, default float

Output data type for default case

raise_error: bool, default True

Raise exception if constituent is unsupported

Returns:
DO: float or string

Doodson number for constituent

pyTMD.arguments._to_extended_doodson(coef: list | ndarray, **kwargs)[source]

Converts Cartwright numbers into an UKHO Extended Doodson number

Parameters:
coef: list or np.ndarray

Doodson coefficients (Cartwright numbers) for constituent

Returns:
XDO: string

Extended Doodson number for constituent

pyTMD.arguments._from_doodson_number(DO: str | float | ndarray, **kwargs)[source]

Converts Doodson numbers into Cartwright numbers

Parameters:
DO: str, float or np.ndarray

Doodson number for constituent

Returns:
coef: np.ndarray

Doodson coefficients (Cartwright numbers) for constituent

pyTMD.arguments._from_extended_doodson(XDO: str | str_, **kwargs)[source]

Converts UKHO Extended Doodson number into Cartwright numbers

Parameters:
XDO: string

Extended Doodson number for constituent

Returns:
coef: np.ndarray

Doodson coefficients (Cartwright numbers) for constituent