dctools.processing.interpolation.apply_over_time_depth

dctools.processing.interpolation.apply_over_time_depth(ds, var_names, depth_name, lat_name, lon_name, lat_src, lon_src, tgt_lat, tgt_lon, tol_depth=0.001, pairwise=False)

Apply an operation over time and depth dimensions for selected variables in an xarray Dataset.

Parameters:
  • ds (xr.Dataset) – Input xarray Dataset (must contain latitude and longitude dimensions).

  • var_names (sequence of str) – List of variable names to process.

  • depth_name (str) – Name of the depth dimension in the Dataset.

  • lat_name (str) – Name of the latitude dimension in the Dataset.

  • lon_name (str) – Name of the longitude dimension in the Dataset.

  • lat_src (np.ndarray) – Source latitude coordinates (1D array).

  • lon_src (np.ndarray) – Source longitude coordinates (1D array).

  • tgt_lat (np.ndarray) – Target latitude coordinates (1D array).

  • tgt_lon (np.ndarray) – Target longitude coordinates (1D array).

  • tol_depth (float, default=1e-3) – Tolerance for depth selection during processing.

  • pairwise (bool, default=False) – If True, use pairwise interpolation (Grid-to-Track).

Returns:

dict of {str – Dictionary containing the resulting variables after applying the operation.

Return type:

xr.DataArray}