  The ergodic hypothesis is examined for energetically open fluid systems
represented by the barotropic Navier--Stokes equations with general
inflow/outflow boundary conditions. We show that any globally bounded
trajectory generates a stationary statistical solution, which is interpreted as
a stochastic process with continuous trajectories supported by the family of
weak solutions of the problem. The abstract Birkhoff--Khinchin theorem is
applied to obtain convergence (in expectation and a.s.) of ergodic averages for
any bounded Borel measurable function of state variables associated to any
stationary solution. Finally, we show that validity of the ergodic hypothesis
is determined by the behavior of entire solutions (i.e. a solution defined for
any $t\in R$). In particular, the ergodic averages converge for any trajectory
provided its $\omega-$limit set in the trajectory space supports a unique (in
law) stationary solution.
