A recently-developed large-eddy simulation framework is validated and used to investigate turbulent flow within and above wind farms under neutral conditions. Two different layouts are considered, consisting of thirty wind turbines occupying the same total area and arranged in aligned and staggered configurations, respectively. The subgrid-scale (SGS) turbulent stress is parametrized using a tuning-free Lagrangian scale-dependent dynamic SGS model. The turbine-induced forces are modelled using two types of actuator-disk models: (a) the ‘standard' actuator-disk model (ADM-NR), which calculates only the thrust force based on one-dimensional momentum theory and distributes it uniformly over the rotor area; and (b) the actuator-disk model with rotation (ADM-R), which uses blade-element momentum theory to calculate the lift and drag forces (that produce both thrust and rotation), and distributes them over the rotor disk based on the local blade and flow characteristics. Validation is performed by comparing simulation results with turbulence measurements collected with hot-wire anemometry inside and above an aligned model wind farm placed in a boundary-layer wind tunnel. In general, the ADM-R model yields improved predictions compared with the ADM-NR in the wakes of all the wind turbines, where including turbine-induced flow rotation and accounting for the non-uniformity of the turbine-induced forces in the ADM-R appear to be important. Another advantage of the ADM-R model is that, unlike the ADM-NR, it does not require a priori specification of the thrust coefficient (which varies within a wind farm). Finally, comparison of simulations of flow through both aligned and staggered wind farms shows important effects of farm layout on the flow structure and wind-turbine performance. For the limited-size wind farms considered in this study, the lateral interaction between cumulated wakes is stronger in the staggered case, which results in a farm wake that is more homogeneous in the spanwise direction, thus resembling more an internal boundary layer. Inside the staggered farm, the relatively longer separation between consecutive downwind turbines allows the wakes to recover more, exposing the turbines to higher local wind speeds (leading to higher turbine efficiency) and lower turbulence intensity levels (leading to lower fatigue loads), compared with the aligned farm. Above the wind farms, the area-averaged velocity profile is found to be logarithmic, with an effective wind-farm aerodynamic roughness that is larger for the staggered cas