  Contradictory experiments have been reported about the dimensionality effect
on the charge-density-wave transition in 2H NbSe$_2$. While scanning tunnelling
experiments on single layers grown by molecular beam epitaxy measure a
charge-density-wave transition temperature in the monolayer similar to the
bulk, around 33 K, Raman experiments on exfoliated samples observe a large
enhancement of the transition temperature up to 145 K. By employing a
non-perturbative approach to deal with anharmonicity, we calculate from first
principles the temperature dependence of the phonon spectra both for bulk and
monolayer. In both cases, the charge-density-wave transition temperature is
estimated as the temperature at which the phonon energy of the mode driving the
structural instability vanishes. The obtained transition temperature in the
bulk is around 59 K, in rather good agreement with experiments, and it is just
slightly increased in the single-layer limit to 73 K, showing the weak
dependence of the transition on dimensionality. Environmental factors could
motivate the disagreement between the transition temperatures reported by
experiments. Our analysis also demonstrates the predominance of ionic
fluctuations over electronic ones in the melting of the charge-density-wave
order.
