  We prove a variational principle for the upper and lower metric mean
dimension of level sets \[ \left\{x\in X:
\lim_{n\to\infty}\frac{1}{n}\sum_{j=0}^{n-1}\varphi(f^{j}(x))=\alpha\right\} \]
associated to continuous potentials $\varphi:X\to \mathbb R$ and continuous
dynamics $f:X\to X$ defined on compact metric spaces and exhibiting the
specification property. This result relates the upper and lower metric mean
dimension of the above mentioned sets with growth rates of measure-theoretic
entropy of partitions decreasing in diameter associated to some special
measures. Moreover, we present several examples to which our result may be
applied to. Similar results were previously known for the topological entropy
and for the topological pressure.
