A ubiquitous arrangement in nature is a free-flowing fluid coupled to a porous medium, for example a river or lake lying above a porous bed. Depending on the environmental conditions, thermal convection can occur and may be confined to the clear fluid region, forming shallow convection cells, or it can penetrate into the porous medium, forming deep cells. Here, we combine three complementary approaches – linear stability analysis, fully nonlinear numerical simulations and a coarse-grained model – to determine the circumstances that lead to each configuration. The coarse-grained model yields an explicit formula for the transition between deep and shallow convection in the physically relevant limit of small Darcy number. Near the onset of convection, all three of the approaches agree, validating the predictive capability of the explicit formula. The numerical simulations extend these results into the strongly nonlinear regime, revealing novel hybrid configurations in which the flow exhibits a dynamic shift from shallow to deep convection. This hybrid shallow-to-deep convection begins with small, random initial data, progresses through a metastable shallow state and arrives at the preferred steady state of deep convection. We construct a phase diagram that incorporates information from all three approaches and depicts the regions in parameter space that give rise to each convective state.