The feasibility of using a subgrid-scale eddy parameterization, based on statistical mechanics of potential vorticity, is investigated. A specific implementation is derived for the somewhat classic barotropic vorticity equation in the case of a fully eddy-active, wind-driven, midlatitude ocean on the beta plane. The subgrid-scale eddy fluxes are determined by a principle of maximum entropy production so that these fluxes always efficiently drive the system toward statistical equilibrium. In the absence of forcing and friction, the system then reaches this equilibrium, while conserving all the constants of motion of the inviscid barotropic equations. It is shown that this equilibrium is close to a Fofonoff flow, like that obtained with truncated spectral models, although the statistical approach is different. The subgrid-scale model is then validated in a more realistic case, with wind forcing and friction. The results of this model at a coarse resolution are compared with reference simulations at a resolution four times higher. The mean flow is correctly recovered, as well as the variability properties, such-as the kinetic energy fields and the eddy flux of potential vorticity. Although only the barotropic dynamics of a homogeneous wind-driven ocean flow has been considered at this stage, there is no formal obstacle for a generalization to multilayer baroclinic flows.