Estimating species’ climatic niches
For each season (i.e., breeding and wintering) and each population (i.e., using only individuals genetically assigned to that population), we estimated the realized climate niche by projecting the occurrences into a climate space defined by temperature and precipitation, thus obtaining a cloud of points. Temperature and precipitation values for population \(j\) and for a given season were obtained by sampling 10,000 points randomly across the seasonally occupied ecoregions, each ecoregion \(k\) weighted by \(W_{j,k}\).
Following Broennimann et al . (2012), we then used a kernel density function on a 50×50 pixel grid super-imposed onto the two-dimensional climate space to estimate niche density. This analysis was conducted using the “kde2d” function in R, with a bandwidth of 1 and only keeping the top 95% of the density kernel, setting the rest of the pixels to 0. Niche overlap across seasons for a given population was computed using Schoener’s D metric, which varies between 0 (no overlap) and 1 (complete overlap; Broennimann et al. 2012).
We also estimated the population’s realized niche along single climate axes, i.e., the thermal niche and the precipitation niche. To estimate these one-dimensional niche densities, we used Gaussian density kernels with a bandwidth of 0.25 (see Figs. S1–S6). Niche overlap for a population was calculated as the area of overlap between the breeding and wintering density kernels divided by the total combined area of these kernel densities, which varies between 0 (no overlap) and 1 (complete overlap).