The accumulated effect of energy extraction by wind turbines in a wind farm leads to a collective interaction between the farm and the atmospheric boundary layer (ABL). To date, many aspects of wind-farm--ABL interaction are still not entirely understood, and wind-farm boundary layers remain an active field of research. In addition to measurement campaigns and wind-tunnel experiments, numerical simulations provide an indispensable tool to study the complex flow phenomena in and around large wind farms in an idealised and controlled environment. The general purpose of the present dissertation is to improve the current understanding of the flow through large wind farms and the interaction with the atmospheric boundary layer. The main focus thereby lies on the influence of atmospheric stability, inversion layers and Coriolis effects on wind-energy extraction in large wind farms.