That's a swamp cooler on one of my neighbors house. We have that also. It cools by evaporative water system and it puts humidity into the house. Air conditioning is drying and we already have almost no humidity so we need the moisture in the air in the house.
Why the roof though? We have them up in north texas but we always had ours in a window. I have noticed a lot on roofs "out west" and figured a reason but didn't know why. Also brick the norm around here but block and stucco seems more popular the further west we go.