The chemistry and deposition of nitrogen species in the tropasphere