Effect of surface gravity waves on the heat flux