As far as the weather goes, it will be better to visit the south and the desert routes outside midsummer when, for the most of the day, it's far too hot for casual exploration - especially if you're dependant on public transport.
But July and August, the hottest months, can be wonderful on the coast. The mountains have a higher elevation and so there are no set rules regarding temperature.
Spring, which comes late by European standards (around April to May), is perhaps the best overall time to visit. During this time Morocco experiences a warm summer climate in the south and in the mountains as well as on the Mediterranean and Atlantic coasts. Winter can be perfect by day in the south, though be warned that the nights are extremely cold.
|Agadir||21°c / 7°c||24°c / 13°c||27°c / 18°c||26°c / 15°c|
|Casablanca||17°c / 7°c||21°c / 11°c||26°c / 18°c||24°c / 14°c|
|Dakhla||26°c / 12°c||27°c / 14°c||27°c / 18°c||30°c / 16°c|
|Er Rachidia||17°c / 1°c||25°c / 8°c||38°c / 20°c||27°c / 12°c|
|Fez||16°c / 4°c||23°c / 9°c||36°c / 18°c||25°c / 13°c|
|Marrakesh||18°c / 4°c||26°c / 11°c||38°c / 19°c||28°c / 14°c|
|Tangier||16°c / 8°c||18°c / 11°c||27°c / 18°c||22°c / 15°c|
|Legend: Daily Max Temp / Min Temp|