A fourth-order finite difference method is proposed and studied for the primitive equations (PEs) of large-scale atmospheric and oceanic flow based on mean vorticity formulation. Since the vertical average of the horizontal velocity field is divergence-free, we can introduce mean vorticity and mean stream function which are connected by a 2-D Poisson equation. As a result, the PEs can be reformulated such that the prognostic equation for the horizontal velocity is replaced by evolutionary equations for the mean vorticity field and the vertical derivative of the horizontal velocity. The mean vorticity equation is approximated by a compact difference scheme due to the difficulty of the mean vorticity boundary condition, while fourth-order long-stencil approximations are utilized to deal with transport type equations for computational convenience. The numerical values for the total velocity field (both horizontal and vertical) are statically determined by a discrete realization of a differential equation at each fixed horizontal point. The method is highly efficient and is capable of producing highly resolved solutions at a reasonable computational cost. The full fourth-order accuracy is checked by an example of the reformulated PEs with force terms. Additionally, numerical results of a large-scale oceanic circulation are presented. © 2008 Global-Science Press.