The oil companies know it. The car dealers selling top of the range Porsches get it, as do the hoteliers and the restaurateurs. Change is coming to Aberdeen: the UK centre of North Sea fossil fuel production since the 1970s is trying to avoid becoming the city of stranded assets.The Granite city became Scotland’s boom town almost by accident. It was Dundee down the coast that was originally identified as a probable hub for offshore production when exploratory work established large reserves of oil and gas under the continental shelf.Aberdeen has never looked back. Kirsty Blackman, the MP for Aberdeen North and the Scottish National party’s Westminster spokesperson on the economy, says there are more cars with personalised number plates on the city’s streets than anywhere else in the UK bar central London. Aberdeen is the one city where taxi drivers can quote the spot price for a barrel of crude oil. “Everybody knows people who go offshore,” Blackman says.The Total Culzean platform is 45 miles east of Aberdeen. Photograph: Andy Buchanan/AFP/Getty ImagesYet the UK government’s decision to target net carbon zero emissions by 2050, a deadline the Scottish government has advanced by five years, has forced a change of direction. As delegates descend on Glasgow for the Cop26 climate summit, Aberdeen is looking to a future without fossil fuels.Sir Ian Wood, who became one of the country’s wealthiest men through the oil and gas activities of his Wood Group, notes that crude production is barely one-third of the 4.5m barrels a day (B/D) at its peak, and will be down to just 400,000 B/D by 2050.He says the Wood Group is already diversifying out of oil and gas, which now account for just 25% of its activities. “The aim is to turn Aberdeen from the oil and gas region of Europe to the all-energy region of Europe,” he says.Wood wants the city and the wider Grampian region to diversify into renewable energy life sciences, food and drink, the digital economy and tourism. A proposed energy transition zone – sited next to the city’s new south harbour development – is expected to create 2,500 green sector jobs by 2030 in high-skills areas such as hydrogen manufacturing and refuelling facilities.Will the lights go out? Union Street in Aberdeen. Photograph: Simon Price/AlamySome say it has taken a long time for the penny to drop in Aberdeen. “They should have been thinking about this ages ago,” says Andrew Carter, the chief executive of the Centre for Cities thinktank. “I never got the impression they were fully committed or serious about it.”But Carter says Aberdeen is better placed to weather structural change to its local economy than other cities. “Our data shows a pretty dynamic economy. Business startups are good. There is a fair-size stock of activities going on and more than 50% of people have a degree or higher. It is better placed than some one-industry towns, such as Sunderland were Nissan to leave.”Wind turbines off the coast of Aberdeen. Photograph: Murdo MacLeod/The GuardianFraser Milne is the engineering and products director of the Balmoral Group, which was set up in 1980 when the oil boom was at its height. He says the company is now pivoting its subsea products business towards the renewables sector. At the moment 7% of Balmoral’s £100m turnover is from the offshore wind sector, but Milne says: “We expect growth to be 30% in the next three years – possibly higher.”Oil and gas account for at least one-third of the local economy once all the knock-on activities are taken into account.There was a time “when every time the oil price went up the cowboy hats went back on again”, says Russell Borthwick, the chief executive of the Aberdeen and Grampian chamber of commerce. The aim now is not just be a net zero city but to help other cities achieve net zero as well, he says.Ever since the first barrel of crude was brought ashore in 1975, oil has been a political issue, with a long-running dispute over whether the proceeds should go to Scotland or the UK. The argument now is over whether the 10bn-20bn barrels of crude that could be pumped should be left in the ground.Extinction Rebellion protesters block the entrance to the headquarters of Shell in Aberdeen in January 2020. Photograph: Extinction Rebellion/PAThe Scottish Green party, which is in coalition with the SNP at Holyrood, wants the transition away from fossil fuels accelerated, with no further licences for North Sea oil production. The Greens say two-thirds of Scots back their plan to start winding down extraction, adding that the way ahead is to provide alternative futures for communities that rely on fossil fuels and not leave them “waiting until we’ve extracted every last bit of oil”.Sign up to the daily Business Today email or follow Guardian Business on Twitter at @BusinessDesk The oil industry says the transition cannot be rushed without causing damage to jobs and increasing dependency on imported fossil fuels.Deirdre Michie, the chief executive of the trade body Oil & Gas UK, says steps are being taken to decarbonise the supply of oil and gas from the North Sea through carbon capture and storage, and hydrogen as a power source.“I don’t want to see us stop overnight because we have been there with the mining industry. We want it to be a glide path,” she says.The Unite union has 9,000 members working offshore, and its regional organiser John Boland worries that few of them will find jobs servicing giant wind turbines. “We find ourselves in uneasy agreement with the industry,” he says. “There has to be a transition but it has to be smooth and there have to be jobs at the end of it. There’s a lot of talk about it but I am tempted to ask: what are the green jobs?”Employees work on the Total Culzean platform on the North Sea, about 45 miles east of Aberdeen. Photograph: Andy Buchanan/AFP/Getty ImagesWhere there is agreement is that investment in renewables needs to accelerated and transition needs to be planned.Phil Kirk, the chief executive Europe for Harbour Energy, the largest UK-listed independent oil and gas company, says the government must encourage the next generation of North Sea development – everything from hydrocarbon production and carbon capture and storage to floating wind turbines and green and blue hydrogen.“It is, I expect, a huge political regret that we missed out on a manufacturing windfall from wind. We have massively invested in wind but we don’t make a lot of the kit here,” Kirk says.“Transition won’t happen overnight unless we want to turn off the lights and shut down our industry and the hospitals. We are going to have plan carefully and understand the consequences of any hasty decisions – for the UK and not just for Aberdeen.”