We present a new method to identify and characterize the structure of the intracluster medium (ICM) in simulated galaxy clusters. The method uses the median of gas properties, such as density and pressure, which we show to be very robust to the presence of gas inhomogeneities. In particular, we show that the radial profiles of median gas properties in cosmological simulations of clusters are sm...