def METHOD_NAME(raw, name=None, plot=False):
    """Stacks years and generates a single, smooth year.
    Assumes input met data is daily data, and in 365-day year format such that 
    len(met)%365 == 0.
    """
    nyears, raw = stack_years(raw)
    mean = raw.mean(axis=1)
    smooth = scipy.signal.savgol_filter(mean, 61, 2, mode='wrap')
    if plot:
        fig, axs = plt.subplots(2,1)
        for i in range(nyears):
            axs[0].plot(raw[:,i])
        axs[0].set_xticklabels(list())
        axs[1].plot(mean, 'k', label='daily mean')
        axs[1].plot(smooth, 'b', label='smoothed')
        axs[1].legend()
        axs[1].set_ylim(axs[0].get_ylim())
        axs[1].set_xlabel('time [d]')
        axs[1].set_ylabel(name)
        plt.show()
    return smooth