A Homogeneous Model
Rather than vertically integrating, we may suppose that the ocean is a homogeneous fluid obeying the shallow water equations
The potential vorticity equation $$ \frac{D}{Dt}\left(\frac{\underbrace{\zeta}_{\text{relative vorticity}} + \underbrace{f}_{\text{Coriolis}}}{\underbrace{h}_{\text{layer thickness}}}\right) = \frac{\underbrace{F}_{\text{friction/forcing}}}{h} $$
In an ocean with a rigid-lid and flat bottom gives the barotropic vorticity equation $$ \frac{D\zeta}{Dt} + \underbrace{\beta v}_{\text{planetary vorticity advection}} = \underbrace{F}_{\text{wind-stress curl + linear drag}} $$
Since the horizontal velocity is divergence-free (because of the flat-bottom and rigid-lid) we may represent it as a streamfunction, whence we obtain the closed equation $$ \frac{D}{Dt}\underbrace{\nabla^2 \psi}_{\text{relative vorticity}} + \underbrace{\beta \frac{\partial \psi}{\partial x}}_{\text{planetary vorticity advection}} = \underbrace{F_\tau(x,y)}_{\text{wind forcing}} - \underbrace{r \nabla^2 \psi}_{\text{linear drag}} $$ This equation is the 'time-dependent nonlinear Stommel problem'
The steady nonlinear problem is sometimes of interest too, and this is $$ \underbrace{J(\psi, \nabla^2 \psi)}_{\text{nonlinear advection}} + \underbrace{\beta \frac{\partial \psi}{\partial x}}_{\text{planetary vorticity advection}} = \underbrace{F_\tau(x,y)}_{\text{wind forcing}} - \underbrace{r \nabla^2 \psi}_{\text{linear drag}} $$

1Vallis, G.K. (2017) Atmospheric and Oceanic Fluid Dynamics: Fundamentals and Large-Scale Circulation. 2nd edn. Cambridge: Cambridge University Press.