  We investigate a model of thin layer turbulence that follows the evolution of
the two-dimensional motions ${\bf u}_{_{2D}} (x,y)$ along the horizontal
directions $(x,y)$ coupled to a single Fourier mode along the vertical
direction ($z$) of the form ${\bf u}_q (x, y, z)=[v_x(x,y) \sin(qz),
v_y(x,y)\sin(qz), v_z(x,y)\cos(qz)\, ]$, reducing thus the system to two
coupled, two-dimensional equations. The reduced dimensionality of the model
allows a thorough investigation of the transition from a forward to an inverse
cascade of energy as the thickness of the layer $H=\pi/q$ is varied. Starting
from a thick layer and reducing its thickness it is shown that two critical
heights are met (i) one for which the forward unidirectional cascade (similar
to three-dimensional turbulence) transitions to a bidirectional cascade
transferring energy to both small and large scales and (ii) one for which the
bidirectional cascade transitions to a unidirectional inverse cascade when the
layer becomes very thin (similar to two-dimensional turbulence). The two
critical heights are shown to have different properties close to criticality
that we are able to analyze with numerical simulations for a wide range of
Reynolds numbers and aspect ratios.
