Date: 201309
Local time of day: 1801-2400
Location: MMEX.ARTCC, FO
Flight conditions: Marginal
Weather elements / visibility: Thunderstorm
Aircraft: B737-800
Operator: Air Carrier
Operating under: Part 121
Flight plan: IFR
Mission: Passenger
Flight phase: Cruise
ATC / advisory: Center MMEX
Reporter organization: Air Carrier
Reporter function: Pilot Not Flying; First Officer
Reporter qualification: Flight Crew Air Transport Pilot (ATP)
Human factors: Confusion; Communication Breakdown; Training / Qualification
Second reporter function: Captain; Pilot Flying
Anomaly: Conflict Airborne Conflict; Deviation - Track / Heading All Types; Deviation / Discrepancy - Procedural FAR; Deviation / Discrepancy - Procedural Clearance; Deviation / Discrepancy - Procedural Published Material / Policy; Inflight Event / Encounter Weather / Turbulence
Detector: Person Air Traffic Control; Person Flight Crew
When detected: In-flight
Result: Flight Crew Returned To Clearance; Flight Crew Took Evasive Action; Flight Crew Became Reoriented
Contributing factors: Human Factors; Weather
Primary problem: Human Factors

Narrative: We were holding over SMO at 14;000 FT due to weather at the airport. There was also a thunderstorm near the holding fix which we flew into. I was the non-flying pilot and was task saturated trying to get the weather for our alternate and QRO; so we could decide where to divert. I didn't know the ICAO identifiers to get the weather which made the whole process quite difficult. We decided to go to our alternate. We were given a fix to go to along with the routing and given a climb to FL240; our cruise altitude to our alternate. Neither of us heard the routing. So I called back to question it. I put the first fix in the box but did not but did not execute it because I was unsure of the routing. I told the Captain it was in the box but not executed and pointed to the fix and the dashed line. It appeared that he was on the way in heading select so I went back to getting the weather and routing. I was heads-down. ATC then asked where we were going. I looked up; saw that we were in a right turn level at 15;000. The fix we were cleared to was to our left requiring a left turn. I pointed to the fix on the PFD and told the Captain that's where we need to go; turn left. He said he knew that and needed the weather. I went back to getting the weather after I thought things were being corrected. Then with panic in his voice; ATC questioned us again as to why we were still turning right. He gave us a heading to 270; but we were still in a right turn. I said we are turning right; we need to turn left. The reply was; I know. I said we are turning right go left...no reply; so I took control of the airplane by turning off the autopilot and turning to the 270 heading. The speed-bug was set at 200 KTS and we were not climbing so I spun the bug to 250 and hit N1 for the climb. At this point; we came out of the clouds and I saw another plane off to our right and about 1;000 FT higher. It was never a factor but I'm assuming the cause for the concern on ATC's part. Once we were pointing in the right direction and climbing; the Captain took the airplane back but could not get any of the automation to work. The autopilot wouldn't turn on; the command bars were gone; and none of the automation was working correctly. I could see that the Captain was getting wrapped up in the automation again while hand-flying. I told him to fly the plane and I would figure it out. Once it got figured out; the autopilot was engaged and we proceeded to our alternate for an uneventful landing.There were a couple things that went wrong. First; I was heads-down getting weather when that wasn't important at that moment. Second; there was a breakdown in the automation and situational awareness. Discussing this at length with the Captain; we determined that the first fix was not executed. So the holding pattern was still active. The initial turn to the fix was done via heading select. When LNAV was selected; the plane turned right to recapture the holding track. I didn't see any of that as I was heads down. There was weather; terrain; communication trouble; automation trouble/confusion; and lack of correctly prioritizing tasks. There was a lot going on all at the same time.


Second narrative: While holding at SMO waiting for weather to improve at our destination we decided to divert to our alternate. I was flying the aircraft as Captain. We were cleared out of the holding pattern to a fix then jet route to our alternate. Initially I selected a heading to the cleared fix and the aircraft began to turn in that direction. The new fix was inserted on 1L of the FMC but not executed. LNAV was selected and the plane turned to re-intercept the holding pattern. The autopilot was disconnected and the plane was manually returned to the correct course. No loss of separation occurred and the flight proceeded to our alternate without incident.Maintain better situation awareness especially in high threat airports and confirm the automation is doing what it is supposed to.


Synopsis: A B737-800 Captain failed to turn right on an initial heading to their alternate after exiting holding so the First Officer took control in repose to ATC's concern about the wrong direction toward traffic.