A numerical exploration of inertial equilibrium states obtained with a primitive equation ocean model suggests that they can be described using statistical mechanics theory developed in the framework of quasi-geostrophy. The performance of the numerical model is first assessed with respect to the quasi-geostrophic model considering a series of experiments in the quasi-geostrophic range, in a closed basin with flat bottom and varying Rossby numbers. The results show that our model is consistent with the quasi-geostrophic model even in terms of dependence from boundary conditions and eddy viscosity values, and that the free surface contribution is negligible. As in the quasi-geostrophic experiments, a tendency toward Fofonoff flows is observed. This tendency remains in a second series of experiments performed outside the quasi-geostrophic range, namely with flows with higher Rossby numbers and with steep topography, characterized by sloping boundaries with an order one fractional change in the depth. It is only close to the boundaries that ageostrophic effects modify the flows. In conclusion, the fact that statistical mechanics theory, initially developed in the framework of quasi-geostrophy, holds for more realistic flows with steep topography supports development of subgrid scale parameterizations based on statistical mechanics theory, to be used in realistic general circulation models.