src/coecms/regrid.py
def regrid(source_data, target_grid=None, weights=None):
    """
    A simple regrid. Inefficient if you are regridding more than one dataset
    to the target grid because it re-generates the weights each time you call
    the function.

    To save the weights use :class:`Regridder`.

    Args:
        source_data (:class:`xarray.DataArray`): Source variable
        target_grid (:class:`coecms.grid.Grid` or :class:`xarray.DataArray`): Target grid / sample variable

    Returns:
        :class:`xarray.DataArray` with a regridded version of the source variable
    """

    regridder = Regridder(
        source_data, target_grid=target_grid, weights=weights)

    return regridder.regrid(source_data)

    A simple regrid. Inefficient if you are regridding more than one dataset
    to the target grid because it re-generates the weights each time you call
    the function.

    To save the weights use :class:`Regridder`.

    Args:
        source_data (:class:`xarray.DataArray`): Source variable
        target_grid (:class:`coecms.grid.Grid` or :class:`xarray.DataArray`): Target grid / sample variable

    Returns:
        :class:`xarray.DataArray` with a regridded version of the source variable
    
A simple regrid. Inefficient if you are regridding more than one dataset
to the target grid because it re-generates the weights each time you call
the function.

To save the weights use :class:`Regridder`.
A simple regrid . Inefficient if you are regridding more than one dataset to the target grid because it re - generates the weights each time you call the function . To save the weights use : class : ` Regridder ` .
def regrid(source_data, target_grid=None, weights=None):
    regridder = Regridder(
        source_data, target_grid=target_grid, weights=weights)
    return regridder.regrid(source_data)
def regrid ( source_data , target_grid = None , weights = None ) : regridder = Regridder ( source_data , target_grid = target_grid , weights = weights ) return regridder . regrid ( source_data )
A simple regrid.
A simple regrid .
"""
    A simple regrid. Inefficient if you are regridding more than one dataset
    to the target grid because it re-generates the weights each time you call
    the function.

    To save the weights use :class:`Regridder`.

    Args:
        source_data (:class:`xarray.DataArray`): Source variable
        target_grid (:class:`coecms.grid.Grid` or :class:`xarray.DataArray`): Target grid / sample variable

    Returns:
        :class:`xarray.DataArray` with a regridded version of the source variable
    """
:class:`xarray.DataArray` with a regridded version of the source variable
: class : ` xarray . DataArray ` with a regridded version of the source variable
source_data
target_grid
weights
source_data (
`xarray.DataArray`): Source variable
` xarray . DataArray ` ) : Source variable
target_grid (
`coecms.grid.Grid` or :class:`xarray.DataArray`): Target grid / sample variable
` coecms . grid . Grid ` or : class : ` xarray . DataArray ` ) : Target grid / sample variable