Abstract: A water-based heating or cooling plant incorporating a filtration device and a pipeline network for bleeding water from the heating or cooling plant to the filtration device, the filtration network for bleeding water from the heating or cooling plant to the filtration device, the filtration device having a tank with an upright column of horizontal layers of granulated filtration materials, the densities in the layers increasing from the layer at the top downwardly to the most dense bottom layer, at least one layer being a mechanical layer and at least one layer having a chemically active material to increase the pH value of the water to a magnitude exceeding neutral. The invention includes a method for operating the plant and for backwashing the granulated filtration material.