def cells2grid(midx, midy, cellsarr):
    """Map 1D array for regular grid back to 2D xy array"""
    nx = len(midx)
    ny = len(midy)
    cells_grid = cellsarr.reshape([ny, nx])

    return cells_grid