Communities with more fish species are more productive and more resilient to rising temperatures and temperature swings, says a study.