This could be difficult to apply for such an extended period of time, but I generally have good results by just breathing exclusively through my mouth. Pretend you're underwater and breathing through a snorkel.
This technique has gotten me through many a fart and temporary sewage/fertilizer exposure.
I like anime because I'm weird.