Abstract. Terrestrial ecosystem models can provide major insights into the responses of Earth's ecosystems to environmental changes and rising levels of atmospheric CO2. To achieve this goal, biosphere models need mechanistic formulations of the processes that drive the ecosystem functioning from diurnal to decadal timescales. However, the subsequent complexity of model equations is associated with unknown or poorly calibrated parameters that limit the accuracy of long-term simulations of carbon or water fluxes and their interannual variations. In this study, we develop a data assimilation framework to constrain the parameters of a mechanistic land surface model (ORCHIDEE) with eddy-covariance observations of CO2 and latent heat fluxes made during the years 2001–2004 at the temperate beech forest site of Hesse, in eastern France. As a first technical issue, we show that for a complex process-based model such as ORCHIDEE with many (28) parameters to be retrieved, a Monte Carlo approach (genetic algorithm, GA) provides more reliable optimal parameter values than a gradient-based minimization algorithm (variational scheme). The GA allows the global minimum to be found more efficiently, whilst the variational scheme often provides values relative to local minima. The ORCHIDEE model is then optimized for each year, and for the whole 2001–2004 period. We first find that a reduced (<10) set of parameters can be tightly constrained by the eddy-covariance observations, with a typical error reduction of 90%. We then show that including contrasted weather regimes (dry in 2003 and wet in 2002) is necessary to optimize a few specific parameters (like the temperature dependence of the photosynthetic activity). Furthermore, we find that parameters inverted from 4 years of flux measurements are successful at enhancing the model fit to the data on several timescales (from monthly to interannual), resulting in a typical modeling efficiency of 92% over the 2001–2004 period (Nash–Sutcliffe coefficient). This suggests that ORCHIDEE is able robustly to predict, after optimization, the fluxes of CO2 and the latent heat of a specific temperate beech forest (Hesse site). Finally, it is shown that using only 1 year of data does not produce robust enough optimized parameter sets in order to simulate properly the year-to-year flux variability. This emphasizes the need to assimilate data over several years, including contrasted weather regimes, to improve the simulated flux interannual variability.