Rooftop bars in Marrakech, and where you can drink
Licensed rooftop bars are concentrated in Gueliz, the Hivernage and in hotels; inside the medina most terraces are dry and serve mint tea and juice instead. Both are worth an evening, but assuming a medina rooftop will serve you a gin and tonic is the usual disappointment.

Photo: Forbes Johnston · CC BY 2.0 · via Wikimedia Commons, cropped
The licence, not the roof, decides
Marrakech has hundreds of terraces. Licences sit mostly with hotels and with venues in the modern town. Inside the medina they are unusual.
So a medina rooftop at sunset is tea, fresh juice and a view. A Hivernage rooftop is a cocktail list. Neither is better; they are different evenings and worth planning deliberately.
The medina terrace, dry
Do not write this off. The terraces around the Jemaa el-Fna at dusk — smoke rising from the food stalls, the Koutoubia lit, swifts overhead — are among the best half hours in the city, and nothing in a glass would improve them.
Mint tea here is a real thing rather than a consolation: properly made, poured from height, sweeter than you expect unless you ask for less sugar.
The licensed rooftops
Modern town and hotels. Cocktail lists, music, later hours, and a crowd that arrives after ten. These are where an evening starts if it is going to end in a club.
Summer is their season, because the terrace is only comfortable once the sun has gone. In winter they run heaters and close earlier.
Ramadan
For the month, most licensed venues stop serving or close. Terraces stay open for tea and come alive after sunset in a way they do not the rest of the year — a good trip, just not the one you booked if you booked it for cocktails.
Common questions
Spring and autumn are ideal. In summer the terrace only works after dark; in winter it is lovely at sunset and cold by nine, with heaters and blankets standard.