splitvar/splitvar.py
def groupbytime(var, freq, timedim='time'):
    """
    Given an xarray variable, split into periods of time defined by freq
    """
    try:
        for k, v in var.resample({timedim: freq}):
            # copyattr(var,v)
            v.attrs.update(var.attrs)
            yield v
    except KeyError:
        return

    Given an xarray variable, split into periods of time defined by freq
    
Given an xarray variable, split into periods of time defined by freq
Given an xarray variable split into periods of time defined by freq
def groupbytime(var, freq, timedim='time'):
    try:
        for k, v in var.resample({timedim: freq}):
            v.attrs.update(var.attrs)
            yield v
    except KeyError:
        return
def groupbytime ( var , freq , timedim = 'time' ) : try : for k , v in var . resample ( { timedim : freq } ) : v . attrs . update ( var . attrs ) yield v except KeyError : return
Given an xarray variable, split into periods of time defined by freq
Given an xarray variable split into periods of time defined by freq
"""
    Given an xarray variable, split into periods of time defined by freq
    """ # copyattr(var,v)
var
freq
timedim