Monitoring of photosynthesis can prevent ecological disasters