The storm had already claimed the lives of at least two people in China's Hainan and 16 people in the Philippines
Opener Cook was 129 not out while Trott was unbeaten on 125 as England reached 287 for two, trailing the tourists by 113 runs at the close on day three.
The duo dragged England back into the match on a placid batting surface with their fluid strokeplay.
Nightwatchman James Anderson (1) was the only wicket to fall in the day after the morning session had been washed out. But thereafter, Cook, with his fifth century in eight tests, and Trott dominated a day that was occasionally entertaining and turgid at other times.
They continued their prolific form from the recent Ashes series when Cook plundered 766 runs at an average of 127.66 and Trott racked up 445 at 89. There, they also they put on 329 together in Brisbane.
Conditions in Wales were much different to Brisbane, with the sky murkier and the pitch slower. But the batsmen displayed the same determined mindset to bring England back from adversity.
Cook now wants to make sure the hosts put enough runs on the board so that they do not have to bat again in the second innings.
“It’s nice to score a few again and continue from Australia. It’s pleasing personally but it also puts us in a position where we can win this game,” said the 26-year-old.
“This is an opportunity for Trotty and I to make big ones. The only way we can win this game is to bat once and bat big.”
Tailender Anderson, diagnosed with a side strain that will prevent him from bowling any further in the match, was caught at slip by Mahela Jayawardene off Ajantha Mendis attempting an ugly slog in the third over of the day.
It took England 22 balls to score their first runs in the day, when Cook on-drove Suranga Lakmal through midwicket for two after a misfield. They scored just 30 runs in the first hour but thereafter the runs came much more easily.
The 100 was raised by an elegant off-drive from Trott which slowed in the damp outfield and brought him three runs.
Later an attempted quick single to extra cover off Farveez Maharoof earned Trott five runs as Lakmal’s errant throw went for four overthrows.
Sri Lanka should have run Trott out when he was on 59 after he scampered through for a quick single to Thisara Perera but his throw from five metres was wide and Trott survived despite being a metre short of his ground.
Cook batted patiently and his scoring rate at one point in the evening session almost ground to a halt, when he also could have been caught at short leg by Tharanga Paranavitana off Herath, but the fielder could not hold on to a tough chance.
Cook registered his 17th test ton with a backward cut for four off Lakmal, while Trott raised his sixth test century and the 200 partnership with a square drive off Lakmal.
Sri Lanka, minus the now-retired spinner Muttiah Muralitharan, looked a tired bunch late on and Mendis’s knee-high full-toss to Trott three overs from the close, which was struck to the cover boundary, demonstrated their lethargy.
Attendance was again disappointing with 10,500 tickets sold, well short of the ground’s 15,000 capacity.
The storm had already claimed the lives of at least two people in China's Hainan and 16 people in the Philippines
Dubai Police have asked drivers to be extra cautious
The former all-rounder has returned to cricket during the past year after a horrific car crash at the end of 2022
Dubai Police have asked drivers to be extra cautious
The country has set a new Guinness World Record by creating the largest falcon hood, beating the previous record of 1.65 metres
Hamas' health ministry said that 94,616 people have been wounded since the conflict began on October 7
In most Islamic countries, including the Gulf countries, the Prophet's birthday is observed on 12 Rabi’ Al-Awwal 1444
Traffic will be diverted to the opposite side during this period