2012 Mazda Mazda5 - Loud fan

Intermittent extremely loud fan (?) noise coming from motor area; stopped car, turned off engine, and noise is gone when re-starting. Not sure if its from the heater / ac fan or the engine cooling fan.

Loud how? Sqealy? Rat-tat-tat-tat-y? Just the whoosh of a fan?

Did it just start this? Did you just buy the car?

Mostly, why is this a concern?

HVAC fan noise would be under the dah on passenger side.

If you turn the HVAC fan to Off, that should take that fan out of the equation - although in some cars it always runs at a low speed. Does turning the HVAC fan to different speeds change the sound?

The radiator/cooling fan(s) may each have their own logic. The AC fan may run whenever the AC or defrost is on. The engine cooling fan should run only when the engine is well warmed up and the car is sitting still or moving slowly (creating little cooling of the radiator.) Both of these fans at the radiator can be turned on by applying 12V from the battery to them. You’d unplug them and then hook up wires from the battery to each. Before bothering with any of that, with the engine off grasp each fan and wiggle it, looking for play or binding in its rotation, and rotate it seeing if a blade contacts the housing.

Good luck and please let us know what you find.