Carbon dioxide emissions from electricity generation are a major cause of anthropogenic climate change. The deployment of wind and solar power reduces these emissions, but is subject to the variability of the weather. In the present study, we calculate the cost-optimized configuration of variable electrical power generators using weather data with high spatial (13-km) and temporal (60-min) resolution over the contiguous US.