To make a future run by renewable energy possible, we must design our power system to seamlessly collect, store, and transport the Earth's naturally occurring flows of energy – namely the sun and the wind. Such a future will require that accurate representations of wind and solar resources and their associated variability permeate power systems planning and operational tools. Practically speaking, we must merge weather and power systems modeling. Although many meteorological phenomena that affect wind and solar power production are well-studied in isolation, no coordinated effort has sought to improve medium- and long-term power systems planning using numerical weather prediction (NWP) models. One modern open-source NWP tool – the weather research and forecasting (WRF) model – offers the complexity and flexibility required to integrate weather prediction with a power systems model in any region. However, there are over one million distinct ways to set up WRF. Here, we present a methodology for optimizing the WRF model physics for forecasting wind power density and solar irradiance using a genetic algorithm. The top five setups created by our algorithm outperform all of the recommended setups. Using the simulation results, we train a random forest model to identify which WRF parameters contribute to the lowest forecast errors and produce plots depicting the performance of key physics options to guide energy researchers in quickly setting up an accurate WRF model.