xoa.core.interp.XYInterpolator.interp_with_time

xoa.core.interp.XYInterpolator.interp_with_time#

XYInterpolator.interp_with_time(data, src_times, dst_times, skipna=False, na_thres=1.0, time_method=1)[source]#

Interpolate to scattered (x, y, t) locations.

Applies the precomputed XY fractional weights at the two bracketing source time steps for each output point, then interpolates linearly in time. No intermediate (nt, n_dst) array is constructed.

Parameters:
  • data ((nt, ..., ny_src, nx_src) float64) – Source data with time as the leading axis.

  • src_times ((nt,) float64) – Source time coordinates, monotonically increasing (same units as dst_times; use xoa.core.num.as_float_array() to convert datetime arrays).

  • dst_times ((n_dst,) float64) – Destination time coordinate, same shape as dst_lon/lat.

  • skipna (bool, default False) – When True, renormalise bilinear weights over valid neighbours.

  • na_thres (float, default 1.0) – Minimum valid-weight fraction; output is NaN below this threshold.

  • time_method (int, default 1) – Temporal interpolation method: 1 = linear.

Returns:

ndarray (…, *dst_shape) – Extra dimensions (e.g. depth levels) are preserved; the time and spatial dimensions are replaced by the destination point shape.