lair.geo.BaseGrid.regrid#
- BaseGrid.regrid(out_grid, method='bilinear', inplace=False)[source]#
Regrid the data to a new grid. Uses xesmf for regridding.
Note
At present, xesmf only supports regridding lat-lon grids. self.data must be on a lat-lon grid. Possibly could use xesmf.frontend.BaseRegridder to regrid to a generic grid.
Warning
xarray.Dataset.cf.add_bounds is known to have issues, including near the 180th meridian. Care should be taken when using this method, especially with global datasets.
- Parameters:
- Returns:
BaseGrid – The regridded grid
- Return type:
See also
regridThe same for xarray data.
BaseGrid.resampleTo a new resolution over the same area.