Glasgow was a vital cog in the machine of Britain's Industrial Revolution, which brought the baleful impact of carbon emissions and eventually climate change to the world.

Today, the venue for the COP26 environmental summit is home to a pioneering project to counteract the effects of planetary warming, centred on Glasgow's Forth and Clyde Canal.

Coinciding with COP26, its managers have launched "Europe's first 'smart canal'" to combat flooding in what is already Britain's wettest city.

According to Peter Robinson, chief engineer of Scottish Canals, climate modelling forecasts that Glasgow's rainfall will rise by another third in the next 50 years.

But riding a canal barge to present the new project, he told AFP: "We've applied 21st-century thinking to an 18th-century asset."

In anticipation of heavy rain, computer systems can automatically adjust the canal's levels to divert water to the Firth of Forth and sea beyond, east of Glasgow.

The spare capacity created can then retain some of the rainwater to prevent flooding of the city centre, about 15 minutes away by foot.

The technology-driven transformation is a far cry from the canal's part in Glasgow's rise, fall and more recent rebirth.

It was the artery that turned Glasgow into the "second city" of Britain's Empire, after London, before the city fell on hard times after World War II.

"Two hundred years ago timber was coming through here, stone, coal were coming through here," Robinson said.

Scottish engineer James Watt, a graduate of Glasgow University, was one of the pioneers of the Industrial Revolution when in 1765 he transformed the power and efficiency of the steam engine.

The idea came to Watt while he walked in one of the city's parks, recalled Ewan Gibbs, an expert in economic and social history at Glasgow University today.

"We could loosely say that was the first point of the modern carbon economy," he said.

The canal opened in 1790 and was used to transport coal by barge to Glasgow from Scotland's largest coalfield in nearby Lanarkshire.

Steel mills proliferated alongside it with the 19th century growth of heavy industry, shipbuilding and finance.

But as that industry fell away after the war, urban squalor took over and canals like the Forth and Clyde became "completely derelict, they were full of shopping trolleys", commented Amelia Morgan, director of safety at Scottish Canals.

The 57-kilometre (36-mile) Forth and Clyde itself, running off the River Clyde, acted as a "barrier" between deprived areas to its north and the far more affluent city centre to the south, she said.

It lacked bridges, leading to long diversions for residents wanting to go from north to south.

But urban regeneration since the 1980s has helped revitalise the city, and newly bridges connect the canal's two halves today.

"We have repurposed this canal," Robinson said.

"It had a purpose that helped to create Glasgow and now it has another purpose that is making it sustainable."