Date: 201507
Local time of day: 1201-1800
Location: ZKC.ARTCC, KS
Flight conditions: IMC
Weather elements / visibility: Icing
Light: Daylight
Aircraft: B737-700
Flight phase: Cruise
Airspace: Class A ZKC
Reporter organization: Air Carrier
Reporter function: First Officer; Pilot Flying
Anomaly: Aircraft Equipment Problem Less Severe; Inflight Event / Encounter Weather / Turbulence
Detector: Person Flight Crew
When detected: In-flight
Result: Air Traffic Control Issued New Clearance; Flight Crew Took Evasive Action; Flight Crew Overcame Equipment Problem
Contributing factors: Aircraft; Weather
Primary problem: Weather

Narrative: We were enroute at FL390; heading East. We were deviating around an extensive line of thunderstorms; which were well to our South. We were in solid IMC; downwind of the storm system. The radar showed the line of storms to our South; of which I believe the most severe echoes were about 40-50 miles off our right side.I noticed that we were accumulating ice on the windshield wipers; especially ice behind the windshield wiper shaft and bolt; as though air currents were swirling the airflow in such a manner to build ice on the back-side. The windshield was also exhibiting some areas of frost buildup and some small lines of water running; as though the windshield was melting that frost.I remarked that this was unusual to be accumulating ice at FL390; and as the Pilot Flying (PF); I asked the Captain if he had any objection to turning on engine anti-ice. He agreed; so I turned on engine anti-ice. I then said; 'We should probably descend into warmer temperatures. Do you agree?' He did; and as Pilot Monitoring (PM); he contacted the Center Controller and requested a descent.The Controller gave us an initial descent; and with engine anti-ice on; I began a 1;000 FPM descent out of FL390. At FL380; the left BLEED TRIP OFF light illuminated. I called for the Bleed Trip Off Checklist; and the Captain ran it. Upon resetting the system; the left bleed system became restored; but the right BLEED TRIP OFF light illuminated. We both stated that this was odd; and we ran the checklist again; this time for the right side. Upon resetting the system; both left and right BLEED TRIP OFF lights illuminated; and L and R duct pressure dropped to zero.We immediately saw the cabin altitude climbing from its normal 8;500 feet. I increased the descent rate and extended the speedbrakes to the flight detent. The cabin altitude quickly reached 10;000 feet; the cabin altitude warning horn activated; and we performed the immediate action items. On oxygen masks; the Captain declared an emergency with ATC; and I kept the aircraft in its maximum descent rate. A new thunderstorm cell was appearing in front of our path; about 20 miles ahead; so I began further deviation to the North around that cell.At some point; the Captain called the cabin to check on their status; and the cabin remained above 10;000 feet; but well below 14;000 feet. I was busy flying the aircraft and maneuvering it to avoid the cell in front of us; and the Captain was coordinating with ATC.By FL250; I realized that we needed to run the remaining checklist items. At FL220; in the rapid descent; the bleed air system suddenly reset itself (with no action on our part). Both BLEED TRIP OFF lights extinguished; and normal duct pressure was restored. The cabin quickly returned to around 8;000 feet.Altitude was now FL195; and we notified ATC that the cabin was pressurizing normally; and we informed them that we could maintain our present altitude. ATC cleared us to maintain FL210; and I climbed to that altitude; continuing to avoid radar echoes in our path. With normal cabin pressure restored; we took off the masks; making communications much easier.The high-altitude icing that we experienced was very odd. I've never seen that in my 11;000 hours of flying. We were downwind of the massive line of storms; but I felt that our distance was very sufficient to avoid any hazards. I don't know why both bleed air systems shut down; but I wonder if the high-altitude icing we encountered affected the internal workings of the engine and bleed air valves in any way. I have no way of knowing.




Synopsis: B737-700 First Officer (FO) reported encountering icing conditions at FL390 that could have been a factor in the later failure of both bleed valves that resulted in loss of cabin pressure.