1. Air freshener. Don't rely on this alone, but it will help mask the smell.
2. Proper ventilation. You might think that fans blowing that weed smell out of the closet isn't good. But if you let the weed smell build up, it will just pour out of the closet eventually, and it will be very strong.
3. I've heard of using carbon filters. I know nothing about them. I don't even know if I'm thinking of the right thing. But I would google carbon filters and see what's up with them.