The founding of Barcelona is the subject of two different legends. The first attributes the founding of the city to the mythological Hercules 400 years before the building of Rome. The second legend attributes the foundation of the city directly to the historical Carthaginian Hamilcar Barca, father of Hannibal, who named the city Barcino after his family, in the 3rd century BC.
About 15 BC, the Romans redrew the town as a castrum (Roman military camp) centred on the "Mons Taber", a little hill near the contemporary city hall (Plaça de Sant Jaume). Under the Romans, it was a colony with the surname of Faventia, or, in full, Colonia Faventia Julia Augusta Pia Barcino or Colonia Julia Augusta Faventia Paterna Barcino. Mela mentions it among the small towns of the district, probably as it was eclipsed by its neighbour Tarraco (modern Tarragona); but it may be gathered from later writers that it gradually grew in wealth and consequence, favoured as it was with a beautiful situation and an excellent harbour. It enjoyed immunity from imperial burdens. The city minted its own coins; some from the era of Galba survive.
Some important Roman ruins are exposed under the Plaça del Rei, entrance by the city museum (Museu d'Història de la Ciutat), and the typically Roman grid-planning is still visible today in the layout of the historical centre, the Barri Gòtic ("Gothic Quarter"). Some remaining fragments of the Roman walls have been incorporated into the cathedral. The cathedral, also known as basilica La Seu, is said to have been founded in 343. The city was conquered by the Visigoths in the early 5th century becoming for a few years the capital of the whole Hispania. Afterwards by the Arabs in the early 8th century, reconquered in 801 by Charlemagne's son Louis who made Barcelona the seat of Carolingian "Spanish Marches" (Marca Hispanica), a buffer zone ruled by the Count of Barcelona.
The Counts of Barcelona became increasingly independent and expanded their territory to include all of Catalonia. In 1137, Aragon and the County of Barcelona merged by dynastic union by the marriage of Ramon Berenguer IV and Petronilla of Aragon and their titles were finally borne by only one person when their son Alfonso II of Aragon ascended to the throne in 1162. His territories were later to be known as the Crown of Aragon which conquered many overseas possessions, ruling the western Mediterranean Sea with outlying territories in Naples and Sicily and as far as Athens in the 13th century. The forging of a dynastic link between the Crowns of Aragon and Castile marked the beginning of Barcelona's decline.
Barcelona is located on the northeast coast of the Iberian Peninsula, facing the Mediterranean Sea, on a plateau approximately 5 km (3 mi) wide limited by the mountain range of Collserola, the Llobregat river to the southwest and the Besòs river to the north. This plateau has 170 km2 (66 sq mi), of which 101 km² (38.9 sq mi) are occupied by the city itself. It is 160 km (100 mi) south of the Pyrenees and the Catalonian border with France.
Tibidabo, 512 m (1,680 ft) high, offers striking views over the city and is topped by the 288.4 m (946.2 ft) Torre de Collserola, a telecommunications tower that is visible from most of the city. Barcelona is peppered with small hills, most of them urbanized and that gave their name to the neighbourhoods built upon them, such as Carmel (267 m), Putxet (181 m) and Rovira (261 m). The escarpment of Montjuïc (173 m), situated to the southeast, overlooks the harbour and is topped by Montjuïc castle, a fortress built in the 17–18th centuries to control the city as a replacement for the Ciutadella. Today, the fortress is a museum and Montjuïc is home to several sporting and cultural venues, as well as Barcelona's biggest park and gardens.
The city borders are the municipalities of Santa Coloma de Gramenet and Sant Adrià de Besòs to the north; the Mediterranean Sea to the east; El Prat de Llobregat and L'Hospitalet de Llobregat to the south; and Sant Feliu de Llobregat, Sant Just Desvern, Esplugues de Llobregat, Sant Cugat del Vallès, and Montcada i Reixac to the west.
ClimateBarcelona has a Mediterranean climate (Köppen climate classification: Csa), with mild, humid winters and warm, dry summers. Barcelona is located on the eastern coast of the Iberian Peninsula, so Atlantic west winds often arrive in Barcelona with low humidity, producing no rain. The proximity of the Atlantic, its latitude, and the relief, are the reasons why the summers are not as dry as in most other Mediterranean Basin locations. Lows (not surface lows but high-atmospheric "cold invasions") can easily affect the area of Barcelona (and Catalonia), causing storms, particularly in August. Some years, the beginning of June is still cool and rainy, like April and May. Together with August, September, October and November these months are the wettest of the year. The driest are February, March, June and July. As in many parts of Catalonia, the annual weather pattern varies greatly from year to year.
Its average annual temperature is 20 °C (68 °F) during the day and 11 °C (52 °F) at night. Average annual temperature of sea is about 18 °C (64 °F). In the coldest month – January, the typically temperature ranges from 8 to 17 °C (46 to 63 °F) during the day, 2 to 10 °C (36 to 50 °F) at night and the average sea temperature is 13 °C (55 °F). In the warmest month – August, the typically temperature ranges from 25 to 31 °C (77 to 88 °F) during the day, about 20 °C (68 °F) at night and the average sea temperature is 25 °C (77 °F). Generally – "summer's" season lasts about six months, from May to October. Two months – April and November – are transitional, sometimes temperature exceeds 20 °C (68 °F), with average temperature of 17–18 °C (63–64 °F) during the day and 8–9 °C (46–48 °F) at night. December, January and February are the coldest months, with average temperatures around 14 °C (57 °F) during the day and 5 °C (41 °F) at night. Large fluctuations in temperature are rare, particularly in summer months. Sunshine hours is 2,524 per year, from 138 (average 4.5 hours of sunshine / day) in December to 310 (average 10 hours of sunshine / day) in July. Average relative humidity is 72%, from 69% in July to 75% in October.
The highest temperature recorded in the city centre was 39.9 °C (103.8 °F) on 27 August 2010. The coldest temperature recorded was −6.7 °C (19.9 °F) on 11 February 1956 and −5 °C (23 °F) on 12 January 1985. However, in the 19th century −9.6 °C (14.7 °F) was recorded in January 1896. At the Fabra Observatory, situated on the Tibidabo hill, 412 m (1,351.71 ft) above the sea level, the record summer temperature is 39.8 °C (104 °F)  on 7 July 1982, and the lowest temperature ever registered, −10 °C (14 °F) on 11 February 1956.