Training strengthens communities’ resilience to impacts of climate change