It's not about AC fault here, the fault code and fan's controll is managed by the ECM too as the fan(s) are used for both aircon and additional engine cooling too in case of too hight engine temperatures. As the OP didnt say what engine but he said that it stays on 10 minutes after the ignition was off i presumed it's a V8 cos it's the only one with that 10 min operation, maybe the 300tdis with ECM too? (it behaves quite the same like the D2):
Condenser Fan Operation (MFI–V8)
The Condenser Fans Motors (M113, M121) on
vehicles equipped with MFI–V8 engines operate
when any of the following conditions occur:
1. Coolant temperature exceeds 100 C (212 F).
2. The air conditioning system is operating.
3. The Engine Control Module (ECM) (Z132)
determines that fuel temperature exceeds
70 C and coolant temperature exceeds 110 C
after engine shutdown. When this occurs, the
fans are on for approximately 10 minutes
after the engine is shut off.