A classification algorithm for selective dynamical downscaling of precipitation extremes