Code associated with Hernández-Carrasco et al. manuscript examining the potential ecological consequences of altered seasonality. The script FIG_3_demo_mechanisms.R recreates Fig. 3 in the manuscript.