dctools.utilities.xarray_utils.interp_single_argo_profile
- dctools.utilities.xarray_utils.interp_single_argo_profile(ds, target_depths, method='linear')
Interpolate ARGO dataset onto target depth levels, preserving structure.
- Parameters:
ds (xr.Dataset) – Input ARGO dataset. Can be single profile (N_POINTS) or multiple profiles (N_PROF, N_POINTS). Must contain a coordinate ‘depth’.
target_depths (array-like) – Target depth values (same units as ds.depth).
method (str) – Interpolation method (‘linear’, ‘nearest’, …).
- Returns:
Same as input but with ‘depth’ resampled on target_depths.
- Return type:
xr.Dataset