def interpolate_grids(data2, interpolation_scheme):
    """ Interpolate all variables in data to a different grid.
    Possible interpolations are:
    T -> U; T -> V; U -> V; V -> U.

    Parameter
    ---------
    data : xarray.Dataset
            Dataset containing 4D ('time_counter','x','y','z') and
            3D ('time_counter','x','y','z') variables.
    interpolation_scheme: strings
            Valied values are: t2u, t2v, u2v, v2u

    Returns
    -------
    xarray.Dataset
    """
    data = data2.copy()
    if interpolation_scheme not in ["t2u", "t2v", "u2v", "v2u"]:
        raise ValueError('Interpolation scheme is unknown. Valid values are:\
                          t2u, t2v, u2v, v2u')
    if interpolation_scheme == "t2v":
        for v in data.data_vars:
            data[v] = (data[v] + data[v].shift(y=-1)) * 0.5
    if interpolation_scheme == "t2u":
        for v in data.data_vars:
            data[v] = (data[v] + data[v].shift(x=-1)) * 0.5
    if interpolation_scheme == "u2v":
        for v in data.data_vars:
            data[v] = (data[v] + data[v].shift(x=1) +
                       data[v].shift(y=-1) +
                       data[v].shift(x=1, y=-1)) * 0.25
    if interpolation_scheme == "v2u":
        for v in data.data_vars:
            data[v] = (data[v] + data[v].shift(x=-1) +
                       data[v].shift(y=1) +
                       data[v].shift(x=-1, y=1)) * 0.25
    return data