Motivated by the dynamics within terrestrial bodies, we consider a rotating, strongly thermally stratified fluid within a spherical shell subject to a prescribed laterally inhomogeneous heat-flux condition at the outer boundary. Using a numerical model, we explore a broad range of three key dimensionless numbers: a thermal stratification parameter (the relative size of boundary temperature gradients to imposed vertical temperature gradients),
$10^{-3}\leqslant S\leqslant 10^{4}$
, a buoyancy parameter (the strength of applied boundary heat-flux anomalies),
$10^{-2}\leqslant B\leqslant 10^{6}$
, and the Ekman number (ratio of viscous to Coriolis forces),
$10^{-6}\leqslant E\leqslant 10^{-4}$
. We find both steady and time-dependent solutions and delineate the regime boundaries. We focus on steady-state solutions, for which a clear transition is found between a low
$S$
regime, in which buoyancy dominates the dynamics, and a high
$S$
regime, in which stratification dominates. For the low-
$S$
regime, we find that the characteristic flow speed scales as
$B^{2/3}$
, whereas for high-
$S$
, the radial and horizontal velocities scale respectively as
$u_{r}\sim S^{-1}$
,
$u_{h}\sim S^{-3/4}B^{1/4}$
and are confined within a thin layer of depth
$(SB)^{-1/4}$
at the outer edge of the domain. For the Earth, if lower mantle heterogeneous structure is due principally to chemical anomalies, we estimate that the core is in the high-
$S$
regime and steady flows arising from strong outer boundary thermal anomalies cannot penetrate the stable layer. However, if the mantle heterogeneities are due to thermal anomalies and the heat-flux variation is large, the core will be in a low-
$S$
regime in which the stable layer is likely penetrated by boundary-driven flows.