  The simulation of complex nonlinear engineering systems such as compressible
fluid flows may be targeted to make more efficient and accurate the
approximation of a specific (scalar) quantity of interest of the system.
Putting aside modeling error and parametric uncertainty, this may be achieved
by combining goal-oriented error estimates and adaptive anisotropic spatial
mesh refinements. To this end, an elegant and efficient framework is the one of
(Riemannian) metric-based adaptation where a goal-based a priori error
estimation is used as indicator for adaptivity. This work proposes a novel
extension of this approach to the case of aforementioned system approximations
bearing a stochastic component. In this case, an optimisation problem leading
to the best control of the distinct sources of errors is formulated in the
continuous framework of the Riemannian metric space. Algorithmic developments
are also presented in order to quantify and adaptively adjust the error
components in the deterministic and stochastic approximation spaces. The
capability of the proposed method is tested on various problems including a
supersonic scramjet inlet subject to geometrical and operational parametric
uncertainties. It is demonstrated to accurately capture discontinuous features
of stochastic compressible flows impacting pressure-related quantities of
interest, while balancing computational budget and refinements in both spaces.
