The statistical mechanical description of two-dimensional inviscid fluid turbulence is reconsidered. Using this description, we make predictions about turbulent flow in a rapidly rotating laboratory annulus. Measurements on the continuously forced, weakly dissipative flow reveal coherent vortices in a mean zonal flow. Statistical mechanics has two crucial requirements for equilibrium: statistical independence of macro-cells (subsystems) and additivity of invariants of macro-cells. We investigate these requirements in the context of the annulus experiment. The energy invariant, an extensive quantity, should thus be additive, i.e. the interaction energy between a macro-cell and the rest of the system (reservoir) should be small, and this is verified experimentally. Similarly, we use additivity to select the appropriate Casimir invariants from the infinite set available in vortex dynamics, and we do this in such a way that the exchange of micro-cells within a macro-cell does not alter an invariant of a macro-cell. A novel feature of the present study is our choice of macro-cells, which are continuous phase-space curves based on mean values of the streamfunction. Quantities such as energy and enstrophy can be defined on each curve, and these lead to a local canonical distribution that is also defined on each curve. The distribution obtained describes the anisotropic and inhomogeneous properties of a flow. Our approach leads to the prediction that on a mean streamfunction curve there should be a linear relation between the ensemble-averaged potential vorticity and the time-averaged streamfunction, and our laboratory data are in good accord with this prediction. Further, the approach predicts that although the probability distribution function for potential vorticity in the entire system is non-Gaussian, the distribution function of micro-cells should be Gaussian on the macro-cells, i.e. for curves defined by mean values of the streamfunction. This prediction is also supported by the data. While the statistical mechanics approach used was motivated by and applied to experiments on turbulence in a rotating annulus, the approach is quite general and is applicable to a large class of Hamiltonian systems, including drift-wave plasma models, Vlasov–Poisson dynamics, and kinetic theories of stellar dynamics.