Climate induced extreme weather events and weather variations will affect both the demand of energy and the resilience of energy supply systems. The specific potential impact of extreme events on energy systems has been difficult to quantify due to the unpredictability of future weather events. Here we develop a stochastic-robust optimization method to consider both low impact variations and extreme events. Applications of the method to 30 cities in Sweden, by considering 13 climate change scenarios, reveal that uncertainties in renewable energy potential and demand can lead to a significant performance gap (up to 34% for grid integration) brought by future climate variations and a drop in power supply reliability (up to 16%) due to extreme...