lair.geo.BaseGrid.resample#

BaseGrid.resample(resolution, regrid_method='bilinear', inplace=False)[source]#

Resample the data to a new resolution.

A resolution that does not divide the grid’s width leaves a strip at the far edge; lair.geo.resample() says what happens to it.

Parameters:
  • 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’.

  • inplace (bool, optional) – Whether to modify the object in-place. Default is False.

Returns:

BaseGrid – The resampled grid

Return type:

Self

See also

resample

The same for xarray data, and the methods.

lair.inventories.Inventory.resample

Conservative by default, for a flux.