ocw/utils.py
def calculate_daily_climatology(dataset):
    '''Calculate daily climatology from the input dataset
    :param dataset: The dataset to convert.
    :type dataset: :class:`dataset.Dataset`
    :returns: values_clim
    :rtype: 3d masked numpy array.shape (number of unique days, y, x)
    '''

    days = [d.month * 100. + d.day for d in dataset.times]
    days_sorted = np.unique(days)
    ndays = days_sorted.size
    nt, ny, nx = dataset.values.shape
    values_clim = ma.zeros([ndays, ny, nx])
    for iday, day in enumerate(days_sorted):
        t_index = np.where(days == day)[0]
        values_clim[iday, :] = ma.mean(dataset.values[t_index, :], axis=0)
    return values_clim
Calculate daily climatology from the input dataset
    :param dataset: The dataset to convert.
    :type dataset: :class:`dataset.Dataset`
    :returns: values_clim
    :rtype: 3d masked numpy array.shape (number of unique days, y, x)
    
Calculate daily climatology from the input dataset
Calculate daily climatology from the input dataset
def calculate_daily_climatology(dataset):
    days = [d.month * 100. + d.day for d in dataset.times]
    days_sorted = np.unique(days)
    ndays = days_sorted.size
    nt, ny, nx = dataset.values.shape
    values_clim = ma.zeros([ndays, ny, nx])
    for iday, day in enumerate(days_sorted):
        t_index = np.where(days == day)[0]
        values_clim[iday, :] = ma.mean(dataset.values[t_index, :], axis=0)
    return values_clim
def calculate_daily_climatology ( dataset ) : days = [ d . month * 100. + d . day for d in dataset . times ] days_sorted = np . unique ( days ) ndays = days_sorted . size nt , ny , nx = dataset . values . shape values_clim = ma . zeros ( [ ndays , ny , nx ] ) for iday , day in enumerate ( days_sorted ) : t_index = np . where ( days == day ) [ 0 ] values_clim [ iday , : ] = ma . mean ( dataset . values [ t_index , : ] , axis = 0 ) return values_clim
Calculate daily climatology from the input dataset
Calculate daily climatology from the input dataset
'''Calculate daily climatology from the input dataset
    :param dataset: The dataset to convert.
    :type dataset: :class:`dataset.Dataset`
    :returns: values_clim
    :rtype: 3d masked numpy array.shape (number of unique days, y, x)
    '''
None
3d masked numpy array.shape (number of unique days, y, x)
dataset
The dataset to convert.
The dataset to convert .