Optimisation of the use of nitrogen in the treated wastewater reused for irrigation