Today I set out on a 200km offroad loop wearing jacket with liner with heated jacket underneath. Before long the heated jacket was switched off. An hour later I took the heated jacket off. An hour later I removed the liner. An hour later I opened all the zips of my jacket, but was still hot. And this is January.
July is possible, but can be difficult. Weirdly Marrakech is often hotter than Ouarzazate, either because it's lower (550m vs 1200m) or because of the effect of a big city. Marrakech holds the record of 49.7ºC for the whole of Morocco.
The two problems are (1) shade temperatures and (2) the effect of the hot sun.
Shade temperatures
20ºC typical English summer day
24ºC English heatwave
28ºC lovely--warm enough to ride in T-shirt
32ºC about as hot as I like it. Take lots of water, sugar, salt
36ºC getting silly, especially mid summer, head for a swimming pool
40ºC TURN BACK, head for the coast or mountains
(note my table stops at 40ºC, but it can get hotter)
In summer months the temperature typically decreases by 0.5ºC for every 100m of altitude, so going from Marrakech (550m) to Imlil (1750m) will reduce the shade temperature by maybe 6ºC.
Effects of sun
Right now in January, taking a white object from the shade to the full sun raises the temperature 12ºC. So you can imagine the effect in July with a black object—maybe 25ºC, probably more.
My main suggestion is
DO NOT WEAR BLACK and invest in a light-coloured
'air' jacket. Take a buff to protect your face and don't forget sun cream for your nose!
When it's really hot get on the road as soon as possible (dawn temp might still be 25ºC). Stop for the day somewhere with a swimming pool by 2pm before it really gets hot around 3-4-5pm. Cool down when riding by dousing your clothes with water, this dramatically increases the wind chill.
At nighttime sleep under a wet towel if necessary. I carry a 100ml perfume atomiser that I fill with water and have a small battery fan. If I awake hot, I can spray myself and use the fan to chill me.
.