def unpack(dataset, dim):
    """
    Unpack a `xr.Dataset` along a given dimension

    :param dataset: dataset object to be unpacked
    :param dim: dimension along which the dataset should be unpacked
    :return: sequence of one `xr.Dataset`s for each value of dim
    """
    return (dataset.loc[{dim: value}] for value in dataset[dim])