Map from Google - Porto

In Porto, a city located in the northern part of the coast of Portugal, the climate is temperate oceanic, with mild and rainy winters, and pleasantly warm and sunny summers.
Here are the average temperatures.
Average temperatures - Porto
Min (°C)558911131515141185
Max (°C)131416182023252524211714

The rains are quite abundant, given that they amount to 1,150 millimetres per year; the wettest period is from November to March. From June to September it rains quite rarely, especially in July and August. Here is the average precipitation.
Average precipitation - Porto
Prec. (mm)1601451108585402025501051501701145

The wind blows frequently: in the cold half-year it's related to Atlantic depressions, and can be strong, while in summer a cool breeze from the sea blows in the afternoon.

Winter, from December to February, is mild: daytime temperatures hover around 13/14 °C. The rains occur in periods of bad weather that last a few days, and may be abundant. Compared to Lisbon, here cold days are more frequent, with lows around freezing (in January 1985 the temperature dropped to -2 °C), while snow is rarely seen.

Spring, from March to May, is cool, with episodes of bad weather and wind still quite frequent, but also sunny periods, with mild temperatures. In May, the maximum temperature is on average about 20 °C.

Summer, from June to mid-September, is mild or pleasantly warm depending on period. In fact, there are quite cool periods, with maximum temperatures around 20/23 °C, and sometimes even less in June, and warmer periods, in which the temperature hovers between 26 °C and 30 °C. Heat waves are rare: sometimes the temperature can reach 38/39 °C for a couple of days, as happened in June and August 2003 or in July 2013: therefore, this happens less often than in central and southern Portugal. In summer the weather is usually good, but some weather fronts bringing clouds and rain can not be excluded, especially in June, which to tell the truth often resembles a spring month.

Autumn, from mid-September to November, is mild, and over the weeks becomes gradually wetter, although good weather often continues until mid-October.

The amount of sunshine in Porto is very good in summer, when sunny days prevail; even in spring and early autumn it's good, while from November to March, Atlantic depressions able to bring wind and rain are frequent, although there are also sunny days.

Porto, Ribeira

For swimming, the ocean is cold: the temperature touches 18 °C in July and September, and 19 °C in August. Here are the average sea temperatures.
Sea temperature - Porto
Sea (°C)141414141517181918171615

When to go

The best time to visit Porto runs from June to September, being the warmest and least rainy of the year. July and August are the warmest months, but the heat is rarely excessive, and in addition they are the least rainy; however, even in September the rains are still quite rare. In May, you can go, but cool and rainy days are more frequent.
Even in the summer it's better to bring a sweatshirt, and maybe a light jacket, for the evening.