def halve_res_quick(array):
    """
        Halves the resolution of the input 2D array, e.g. from 0.5km to 1km,
        by averaging every 2x2 grid of pixels into 1 pixel.

        :param array: 2D numpy array of data.
        :return: 2D numpy array with half the resolution of the input array.
    """
    # Define new shape of lower res array
    shape = (int(array.shape[0] / 2),
             array.shape[0] // int(array.shape[0] / 2),
             int(array.shape[1] / 2),
             array.shape[1] // int(array.shape[1] / 2))
    # Return array with lower res
    return  array.reshape(shape).mean(-1).mean(1)