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determine concentration of nitrate in mobile water calculate nitrate in surface runoff calculate nitrate in tile flow take no3 from tile layer and all lower layers assume rising water table will move nitrates up subtract tile no3 from soil layers calculate nitrate in lateral flow calculate nitrate in percolate last layer leaches from soil profile