We present a clustering algorithm for hierarchical traffic grooming in large WDM networks. In hierarchical grooming, the network is decomposed into clusters, and one hub node in each cluster is responsible for grooming traffic from and to the cluster. Hierarchical grooming scales to large network sizes and facilitates the control and management of traffic and network resources. Yet determining the size and composition of clusters so as to yield good grooming solutions is a challenging task. We identify the grooming-specific factors affecting the selection of clusters, and we develop a parameterized clustering algorithm that can achieve a desired tradeoff among various goals.