def hourly_interpolate_func(prev_array, next_array,
                            image_prev_dt, image_next_dt, image_dt,
                            output_extent=None):
    """Interpolate between two NLDAS hourly rasters to a new time

    Parameters
    ----------
    prev_array : ndarray
        Array at the previous timestep.
    next_array : ndarray
        Array at the next timestep.
    image_prev_dt : datetime
        Datetime of the previous array.
    image_next_dt : datetime
        Datetime of the next array.
    image_dt : datetime
        Datetime to interpolate to.
    output_extent: gdal_common.extent
        Extent to clip output.

    Returns
    -------
    ndarray

    """
    output_array = (
        (next_array - prev_array) *
        ((image_dt - image_prev_dt).total_seconds() /
         (image_next_dt - image_prev_dt).total_seconds()) +
        prev_array)
    return output_array