xoa.tide.harmonic_predict

xoa.tide.harmonic_predict#

xoa.tide.harmonic_predict(coef, t_out, t_dim=None, nodal=True, nodal_step=86400.0)[source]#

Predict a scalar signal from harmonic coefficients

With the Greenwich phase convention, the prediction is:

h(t) = h0 + Σ f(t)·A·cos(V₀(t_ref) + ω(t−t_ref) + u(t) − g)
Parameters:
  • coef (xarray.Dataset) – Output of harmonic_analysis(). Its nodal attribute prevails over nodal.

  • t_out (array-like of datetime64 or float seconds)

  • t_dim (str, None) – Name of the output time dimension: that of t_out when it is a data array, else the time dimension of the coefficients’ source, i.e. "time".

  • nodal (bool)

  • nodal_step (float, None) – Time step in seconds at which the nodal corrections f and u are computed, before a linear interpolation in time. When None, they are those of the reference time t_ref, which is valid over a few weeks only.

Returns:

xarray.DataArray – Array where time replaces the constituent dimension of the coefficients.