This is a finite-difference, three-layer, quasi-geosotrophic model. The governing equations are the conservation of potential vorticity in each layer with added viscous terms and wind forcing (Pedlosky, 1987). This model simulates the mildatitude dynamics in the ocean. The nonlinear term is discretized with Arakawa energy, enstrophy and symmetry conserving scheme. Partial slip boundary conditions are applied. To compile, please, type "make qg_dg".