Allow using a sub-window for particles that end up beached
Closed this issue · 1 comments
When a particle ends up beached (by hitting land or running out of the domain), it gets a NaN value in its advection timeseries. This causes the filtered output for that particle to also be NaN. However, that particle may still have a significant track from which we can salvage some useful information.
Propose a minimum_window
parameter, which if specified, defines a minimum width of advection track that we will use for filtered output. Because the filtering application is a dask gufunc
with vectorize=False
, so it applies filtfilt
to many particles at once. This means that we can't vary the length of the input data, but we may instead need to pad data for the particles which meet the minimum window requirement so that the filtering result is not NaN.