xoa.filter.tidal_filter

Contents

xoa.filter.tidal_filter#

xoa.filter.tidal_filter(da, filter_name, na_thres=0, dt_tol=0.01)[source]#

Apply a tidal filter on a data array

Note that the data array must have a valid time dimension. When the time step is less than an hour, an interpolation is made on the weights since they are made for hourly time series. An error is raised when the time step is too variable or above one hour.

Parameters:
  • da (xarray.DataArray)

  • filter_name (str) – Type of tidal filter (demerliac, godin, mean))

  • dt_tol (float) – Relative tolerance for the time step variability

  • na_thres (float) – A float between 0 and 1 that defines the allowed level a NaN contamination. See convolve().

Returns:

xarray.DataArray