An important challenge in large-eddy simulations of the atmospheric boundary layer is the specification of the subgrid-scale (SGS) model coefficient(s) and, in particular, how to account for factors such as position in the flow, grid/filter scale and atmospheric stability. A dynamic SGS model (that assumes scale invariance of the coefficients) is implemented in simulations of a neutral boundary layer with a constant and uniform surface flux of a passive scalar. Results from our simulations show evidence that the lumped coefficient in the eddy-diffusion model computed with the dynamic procedure depends on scale. This scale dependence is stronger near the surface, and it is more important for the scalar than for the velocity field (Smagorinsky coefficient) due to the stronger anisotropic behaviour of scalars. Based on these results, a new scale-dependent dynamic model is developed for the eddy-diffusion lumped coefficient. The new model, which is similar to the one proposed earlier for the Smagorinsky coefficient, is fully dynamic, thus not requiring any parameter specification or tuning. Simulations with the scale-dependent dynamic model yield the expected trends of the coefficients as functions of position and filter/grid scale. Furthermore, in the surface layer the new model gives improved predictions of mean profiles and turbulence spectra as compared with the traditional scale-invariant dynamic model.