  A data-driven turbulence model for coarse-grained numerical simulations of
two-dimensional Rayleigh-B\'enard convection is proposed. The model starts from
high-fidelity data and is based on adjusting the Fourier coefficients of the
numerical solution, with the aim of accurately reproducing the kinetic energy
spectra as seen in the high-fidelity reference findings. No assumptions about
the underlying PDE or numerical discretization are used in the formulation of
the model. We also develop a constraint on the heat flux to guarantee accurate
Nusselt number estimates on coarse computational grids and high Rayleigh
numbers. Model performance is assessed in coarse numerical simulations at
$Ra=10^{10}$. We focus on key features including kinetic energy spectra,
wall-normal flow statistics, and global flow statistics. The method of
data-driven modeling of flow dynamics is found to reproduce the reference
kinetic energy spectra well across all scales and yields good results for flow
statistics and average heat transfer, leading to computationally cheap
surrogate models. Large-scale forcing extracted from the high-fidelity
simulation leads to accurate Nusselt number predictions across two decades of
Rayleigh numbers, centered around the targeted reference at $Ra=10^{10}$.
