FrigiFresh is what dealers tend to use to clear up anything from the A/C system.
As noted, pulling the cabin filter is recommended to allow really getting the cleaner down into the system good. Drain check, etc, and even having a mech do a complete flush of the thing may be needed if really bad, as crud gets in there and is good breeding ground for mildew, molds, etc.
However, A/C gunk usually smells more like stale sweatsocks, rotten straw, not barnyard.
I'd suspect Urea as most have noted if it smells like stale barnyard.
You can always remember the old rancher's saying "smells like money"