Optimizing experimental design to estimate ammonia and nitrite