In order to clarify the effects of windbreaks on flow and to determine where to set windbreaks for the optimum prevention of wind erosion in a complex terrain, a three-dimensional numerical model for simulating wind distribution over a real complex terrain with a variation of relative height less than 100 m is used. The three-dimensional, time-dependent Navier–Stokes equation written with generalized coordinates and the Smagorinsky-type scheme for turbulent parameterization are use in the model. Numerical simulations of windbreak effect on wind speed distribution over a sand dune are carried out by erecting windbreak hedges at different places. The influence of topography and windbreaks on wind distribution, for example the location of the maximum wind speed reduction, are well simulated. Thus, the best setting place of windbreaks for the prevention of wind erosion may be decided by simulating the wind distribution over real terrain using the model. An example, using a 2 m high windbreak hedge for preventing sand shifting around a barchan sand dune, which is 5 m high, 64 m wide and 96 m long, is given and the effect of the windbreak hedge is discussed. The simulation results show that the best place should be at 18–22 m in front of the top of the sand dune.