Processes at the air-sea interface govern the climate mean state and variability by determining the exchange of momentum, heat, and water between the atmosphere and ocean. Traditional climate models compute those exchanges across the air-sea interface by assuming an ocean surface with roughness determined by atmospheric wind and stability conditions, essentially assuming ocean surface waves are in equilibrium states. In reality, that is rarely the case. Such effects have been emphasized in numerical weather predictions for weather systems like tropical cyclones. An accurate representation of ocean surface waves requires a prognostic ocean surface wave model. The addition of WAVEWATCH III to the Community Earth System Model version 2 (CESM2) makes it possible to parameterize the impacts of ocean surface waves on the momentum and energy exchange. This study documents the implementation of a sea-state-dependent surface flux scheme in CESM2. It considers the effects of waves on ocean surface roughness and those of sea spray on sensible and latent heat. It is found that the new scheme significantly impacts mean atmospheric circulation and the upper ocean. The errors in mean atmospheric circulation and surface temperature patterns are reduced. The modified surface flux lowers the eddy-driven jet speed and weakens the Hadley circulation. Global sea surface temperature (SST) warm bias is reduced due to the cooling of the Southern Ocean and eastern boundary currents. In particular, some parts of eastern and central Pacific exhibit a weak cooling trend in the simulation for recent decades, reducing the existing SST trend bias in CESM2.