Driven by the goal of generating risk maps for flood events-characterized by various physical variables such as peak flow and volume, and measured at specific geographic locations-this work proposes several dissimilarity functions for use in unsupervised learning problems and, specifically, in clustering algorithms. These dissimilarities are rank-based, relying on the dependence occurring among the random variables involved, and assign the smallest values to pairs of subsets that are $\pi$-comonotonic. This concept is less restrictive than classical comonotonicity but, in the multivariate case, can offer a more intuitive understanding of compound phenomena. An application of these measures is presented through the analysis of flood risks using data from the Po river basin, with results compared to similar studies found in the literature.