More than 20 people have died in a Moroccan city due to a heatwave as temperatures soared in the drought-stricken country this week.