Map from Google - Essaouira

In Essaouira, the former Portuguese Mogador, the climate is unusual, being very mild, or cool most of the year. In fact, the cold current that flows along the Atlantic coast of Morocco lowers the summer temperatures, so that highs remain about 23 °C (73 °F) even in July and August.
Here are the average temperatures.
Average temperatures - Essaouira
EssaouiraJanFebMarAprMayJunJulAugSepOctNovDec
EssaouiraJFMAMJJASOND
Min (°C)101112131416171817161411
Max (°C)181819192021232323222119
Min (°F)505254555761636463615752
Max (°F)646466666870737373727066

The wind often blows, especially in the form of afternoon breeze in summer.
Another feature of this climate is the presence of fog and mist, which affect this coastal area in the summer mornings, and then dissolve in the afternoon.
Typically the city, which is about a three hour drive from Marrakesh, is visited for its history, for its peculiar alleys, to watch the sea or for surfing and kite surfing, while it is not particularly suitable for swimming and sunbathing.
Precipitation is scarce, typical of a semi-desert climate, about 300 millimetres (12 inches) per year, and most of it occurs from October to April. Generally it occurs in the form of short showers, sometimes even strong.
Here is the average precipitation.
Average precipitation - Essaouira
EssaouiraJanFebMarAprMayJunJulAugSepOctNovDecYear
EssaouiraJFMAMJJASONDY
Prec. (mm)45403530102015255055298
Prec. (in)1.81.61.41.20.40.1000.2122.211.7
Days77763101257753

Winter, from December to March, is very mild, with highs ranging about 18/19 °C (64/66 °F). At night the temperature rarely drops below 8 °C (46.5 °F), but on the other hand wind and humidity increase the feeling of cold. Every now and then there may be some period of bad weather, with rain and wind; for the rest, the weather is fine.

In spring, in April and May, temperatures are very mild, quite similar to those of winter, only the cold at night becomes even more rare, as well as the rains. In the morning there are frequent mists and fogs. Sometimes the wind can blow from the desert, so that the temperature can exceed 30 °C (86 °F).

Summer, from June to September, is particularly cool, wet and windy. In the morning there are frequent fogs and mists. Heat waves from the desert, rare in June, may occur in July and August, with peaks above 40 °C (104 °F), but they are rarer than in other coastal areas of Morocco.

Autumn is pleasant in October, and very mild in November, when it can occasionally get cold at night. Usually the rains begin to fall in October.

The amount of sunshine in Essaouira is good all year round, since the good weather prevails, although the sun is often veiled by a thick layer of mist or fog, so it is not particularly strong.

Essaouira

The sea is very cool even in summer, since the temperature reaches 21 °C (70 °F) from July to October, in addition, usually the windy and cool weather conditions are not the best for swimming, except when the wind blows from the desert.
Here are the average sea temperatures.
Sea temperature - Essaouira
EssaouiraJanFebMarAprMayJunJulAugSepOctNovDec
EssaouiraJFMAMJJASOND
Sea (°C)171717171820212121211918
Sea (°F)636363636468707070706664

When to go

The best time to visit Essaouira, in search of the remains of its Portuguese or Moorish past, or the stay of Jimi Hendrix and Bob Marley, goes from May to October. To avoid the risk of the albeit rare heatwaves, July and August can be ruled out. Even in summer it is useful to bring a sweatshirt; for those who come from Marrakesh and inland areas, the temperature difference can be considerable and can exacerbate the feeling of cold.