Flights and trains were cancelled in Barcelona on Monday after heavy rains caused flooding in parts of the city.