M-20 J (201) / Allegro
Flight Crew Flight Instructor; Flight Crew Instrument; Flight Crew Commercial
Flight Crew Last 90 Days 47; Flight Crew Total 1010; Flight Crew Type 100
Situational Awareness; Distraction
Aircraft Equipment Problem Critical; Deviation / Discrepancy - Procedural Clearance
Air Traffic Control Provided Assistance; Flight Crew Returned To Departure Airport; Flight Crew Landed As Precaution; Flight Crew Landed in Emergency Condition
Human Factors; Aircraft
I was conducting a post-maintenance flight over the airport before continuing on course to my final destination. The reason for the post-maintenance flight was the mags had been overhauled. The plan was to circle over the airport twice before proceeding to [my] destination.  The preflight revealed no issues. The initial runup revealed no issues. Tower cleared me for takeoff.  On the downwind is when I pulled the RPM and throttle back; the engine began to run rough.  I scanned the cylinder head temperature's (CHT) and found one cylinder reading 400 degrees F - not normal! I decided to turn base to the runway that was outside my window. I realized it was not the runway I was given the option for. On short final; I told tower that I had a rough running engine so that I would be given clearance to land runway 03L. I was given clearance and landed without issue. I conducted a second runup and the mags failed the check. I parked the airplane and called the mechanic familiar with my airplane and issue.  It was clear to me that I was task saturated because of the mechanical issue and being single crew resource. This was the reason for losing situational awareness of the runway environment. I was concerned that an engine failure was imminent.
After takeoff; the engine started running rough and one Cylinder Head Temperature was reading high; while paying attention to those issues; the pilot lost runway orientation; and landed without incident.