lair.geo.resample#

lair.geo.resample(data, resolution, regrid_method='bilinear')[source]#

Resample the data to a new resolution. Modifies the data in place.

Parameters:
  • data (xr.DataArray | xr.Dataset) – The data to resample.

  • resolution (float | tuple[x_res, y_res]) – The new resolution in degrees. If a single value is provided, the resolution is assumed to be the same in both dimensions.

  • regrid_method (str, optional) – The regridding method, by default ‘bilinear’.

Returns:

xr.DataArray | xr.Dataset – The resampled data.

Return type:

DataArray | Dataset