Image copyright The Bristol Port Company HO Image caption Bristol is one of the major UK ports for import and export for the automotive trade

A storm is brewing as clouds gather over Bristol Port, with the rain set to fall on tens of thousands of vehicles parked in the port's car compounds, ready for export by ship, or destined for UK dealerships.

It is an apt backdrop for the UK automotive sector's current predicament.

"Brexit has derailed the industry," says Sarwant Singh, senior partner and global head of automotive and transportation at consultants Frost & Sullivan.

"The uncertainty causes people not to buy cars."

The number of cars sold in the UK dropped 5.7% in 2017, according to industry body the Society of Motor Manufacturers & Traders, and ratings agency Moody's predicts a further 5.5% fall this year.

There has been little respite from foreign markets, with exports slipping 1% last year.

Each year, about 80% of the vehicles built in the UK are exported, so smooth international trade relations are vital for the automotive sector's continued prosperity.

But these days, the relations are as choppy as the sea in the Bristol Channel.

Image copyright Getty Images Image caption Vauxhall, owned by France's PSA Group, makes the Astra at Ellesmere Port

Industry executives' main fear is that Brexit will result in heightened barriers to trade, not only with the European Union, but with the rest of the world too, once the transition period ends on 31 December 2020.

The prospect of an escalating trade dispute between the US and its main trading partners, the EU and China, also looms large, after US President Donald Trump's recent threat to tax cars imported into the world's largest market.

"All of Europe is exposed," says Justin Cox, director of global production at consultants LMC Automotive, "but some plants are more exposed than others, and it so happens that several of those are in the UK."

Then there's China, the world's second-largest car market. Trading relations with China are already complicated, and may well be subject to even greater complexity in future.

"A UK-China free trade agreement will be neither easy nor clearly advantageous for the UK," says Bruegel, a European think tank that specialises in economics.

Part of the issue, it says, is that the UK would like to land better trade deals with China when it leaves the bloc than the ones the EU already has in place. But being smaller, the UK will be in a weaker position during trade talks, so there are no guarantees China will be prepared to offer better terms.

On top of this, UK automotive trade with China - and other fast-growing markets such as India, Brazil and Russia - could suffer, depending on the terms of a post-Brexit trade deal with the EU, Mr Singh says.

That's because the UK might not be able to piggyback on the EU's existing bilateral trade agreements with third countries, including those entered into since the Brexit vote with Canada and Japan. Instead, it would face years of protracted trade talks with dozens of countries.

Image copyright Getty Images Image caption Despite uncertainty about Brexit, BMW has said it will assemble its new Mini in the UK

Getting a good Brexit deal is also important because of the interdependence of European automotive companies.

"The motor industry has taken advantage of the EU's single market as much as, perhaps more than, any other industry," says Mike Hawes, chief executive of SMMT.

As a result, EU customers buy about €15bn ($18.5bn; £13bn) worth of British-made cars per year, accounting for some 53% of the UK's vehicle exports, according to the European Automobile Manufacturers Association (ACEA).

Conversely, EU manufacturers deliver 81% of the cars imported by the UK, to the tune of about €45bn, a trade imbalance that Brexit supporters hope will give the UK leverage during trade talks.

At the same time, about 80% of the parts and components used to build cars in the UK are also imported from the EU, while 70% of the parts and components made in the UK are exported to EU countries.

"Any changes to the deep economic and regulatory integration between the EU and the UK will have an adverse impact on automobile manufacturers with operations in the EU and/or the UK, as well as on the European economy in general," the ACEA says.

Image copyright Getty Images Image caption EU manufacturers deliver 81% of the cars imported by the UK

Hence, both the UK and the European car industries are keen to see a final UK-EU deal that retains frictionless trade in the long-term.

"Anything short of single market membership could be a problem for the UK," says Simon Dorris, managing partner at Lansdowne Consulting.

Free trade is indeed key to future prosperity, not just within Europe but beyond, according to Prof Patrick Minford of Cardiff University, who chairs Economists for Free Trade, a group of pro-Brexit economists.

Its much debated paper, From Project Fear to Project Prosperity, suggests fears of rising trade barriers for carmakers after Brexit are misplaced.

Prime Minister Theresa May has said that Brexit presents an "opportunity to strike free trade deals around the world".

"Auto manufacturers will improve profitability post-Brexit," Prof Minford predicts.

Motor vehicle production, 2017

UK production: 1.75 million motor vehicles. Exports to the EU: 800,000

EU 27 production: 19.69 million motor vehicles. Exports to the UK: 2.3 million

Source: ACEA

Despite the uncertainty about a future trade deal, a number of big carmakers have committed to building more cars in the UK since the Brexit vote, including Nissan, BMW, Toyota, and last week Vauxhall, which is owned by French group PSA.

But Parliament's cross-party Business, Energy and Industrial Strategy Committee is pessimistic, recently warning that "there are no advantages to be gained from Brexit for the automotive industry for the foreseeable future".

Image copyright Getty Images Image caption The UK's best-selling car is the compact Ford Fiesta

The UK prime minister's desire for free trade is shared by the global motor industry more generally.

Executives are nevertheless pragmatic, and accept that although international trade is governed by rules policed by the World Trade Organization, free trade is rarely a reality.

Trade-distorting subsidies and a variety of measures, such as regulatory barriers, internal tax measures, and intellectual property rights, still impede the free flow of goods, even when trade agreements are in place, according to the European Commission.

The EU, for instance, will not import cars unless they meet EU safety and emissions requirements.

Moreover, trade agreements are generally conditional. For instance, cars exported from the EU must be predominantly made within the EU to be allowed free entry into other markets.

Such "Rules of Origin" could complicate exports for UK carmakers after Brexit, as an estimated 55%-75% of the parts and components that make up a car built in Britain are imported, according to Mr Hawes of SMMT.

Global Trade

More from the BBC's series taking an international perspective on trade:

Whatever level of access UK-made cars get to markets around the world after Brexit, the manufacturers ultimately have to try ensure that their vehicles will be popular with overseas buyers.

Mr Hawes says that this is not always easy, citing the fact that the UK's best-selling car is the compact Ford Fiesta, whereas the most popular vehicle in the US is the large Ford F150 pick-up truck.

Consequently, there are reasons to question whether the US market is the most natural one to focus on for UK manufacturers, which tend to produce cars that suit British and European consumers, he observes.

"So it's also about producing the right car for the market," he says, pointing to how Honda is producing the Civic in Swindon for global markets. "They have shown it can be done".