def get_latlon_from_cube(cube):
    """Return domain covered by cube, taking into account cell boundaries

    :param cube: target cube
    :return: tuple(lat_max, lat_min, lon_max, lon_min, nlat, nlon)
    """
    for latlon in ['latitude', 'longitude']:
        if not cube.coord(latlon).has_bounds():
            cube.coord(latlon).guess_bounds()
    longitude = cube.coord('longitude')
    latitude = cube.coord('latitude')
    nlon = len(longitude.points)
    nlat = len(latitude.points)
    lon_min, lon_max = longitude.bounds[0, 0], longitude.bounds[-1, 1]
    lat_min, lat_max = latitude.bounds[0, 0], latitude.bounds[-1, 1]
    return lat_max, lat_min, lon_max, lon_min, nlat, nlon