Madrid has a Mediterranean climate, with dry, warm and pleasant weather most of the year; winters are cold, but not as chilly as winters in many other European cities, and summers are hot. The city's high altitude and proximity to mountains causes some steep variations in winter and summer temperatures. In summer, between June and August, average temperatures range between 65°F (18°C) and 88°F (31°C) and the heat at midday can be intense, though evenings are often pleasantly cool. Summer temperatures can rise above 95°F (35°C) during occasional heat waves. Winters, between December and February, bring temperatures dropping to just below freezing, averaging between 36°F (2°C) and 50°F (10°C). Rain in Madrid is a rarity and no season is marred by heavy rain, but what rain the city does receive falls mostly in the shoulder seasons of spring and autumn. The wettest months are April, May, November and December.The most popular time to visit Madrid is in the summer months between June and August, as this is the peak tourist season in the whole country, but the best time to visit is just before or after summer, in May or October.