interpolate_to_t#
- interpolate_to_t(A, *, stagger, mask_t)[source]#
Interpolate a staggered field (U or V) onto the T grid.
- Parameters:
A (ndarray) – Staggered array. Last two dims are (y, x). - If stagger=’u’: shape (…, ny_t, nx_t-1) - If stagger=’v’: shape (…, ny_t-1, nx_t)
stagger ({'u', 'v'}) – Type of staggering.
mask_t (ndarray of 0 and 1) – 0: land point. Will be considered as nan value
- Returns:
T (ndarray) – Interpolated values on T grid, shape (…, ny_t, nx_t), masked as NaN where mask_t is True.
single_src (ndarray (uint8)) – 1 where T was computed from exactly one valid neighbor, 0 otherwise. (Interior points with two valid neighbors → 0; points with both neighbors NaN → 0.)