Dynamics of gravity currents in the presence of surface waves