The detailed modeling of free-surface waves and their interaction with bottom-mounted or floating structures requires large computational resources, which is why efficient boundary conditions with low spurious reflection are desirable. The present work presents a review of existing generating-absorbing boundary conditions (GABCs) for dispersive waves and their reflection characteristics. Hereafter, an adaptation of the classical Sommerfeld condition is proposed by using a depth-varying coefficient to improve absorption efficiency over a range of wave numbers. An analytical model is proposed to analyse the reflection characteristics for both propagating and evanescent modes, and a considerable improvement in comparison to the Sommerfeld condition is documented over a broad frequency range (reflection coefficients below 5% for nondimensional wave numbers in the range [0, 10]). The new boundary condition is implemented in OpenFoam (R) (waves2Foam) and the functioning for regular, irregular, solitary, and phase-focused waves is presented.