Why is there a drain trap high on a wall above an air gap?
Assuming that it's a condensate line for rooftop HVAC equipment, the trap is required to prevent contamination of the habitable space by exhaust gases. It's also possible that an inducer fan could draw air through an un-trapped drain.