Many compressible flow and aeroacoustic computations rely on accurate nonreflecting or radiation boundary conditions. When the equations and boundary conditions are discretized using a finite-difference scheme, the dispersive nature of the discretized equations can lead to spurious numerical reflections not seen in the continuous boundary value problem. Here we construct discretely nonreflecting boundary conditions, which account for the particular finite-difference scheme used, and are designed to minimize these spurious numerical reflections. Stable boundary conditions that are local and nonreflecting to arbitrarily high order of accuracy are obtained, and test cases are presented for the linearized Euler equations. For the cases presented, reflections for a pressure pulse leaving the boundary are reduced by up to two orders of magnitude over typical ad hoc closures, and for a vorticity pulse, reflections are reduced by up to four orders of magnitude.