Image copyright Getty Images Image caption Protests calling for greater action over climate change have been held in Madrid ahead of the event

World leaders are heading to Madrid for the high-level stage of the COP25 UN climate conference.

The outcome of the talks could have a huge bearing on the Glasgow event next year.

So far the negotiations have been slow and frustration at the speed of progress is growing.

But climate scientist Prof Sandy Tudhope from Edinburgh University believes there is still time to turn them around.

He said: "I'm going to be optimistic about that because it is doable but what it will require is a lot of goodwill - a lot of really open transparent but astute diplomacy.

"I'm optimistic because we have to be optimistic. Climate change is a challenge but we can use it as a way to have a fairer and better environment."

Image copyright Getty Images Image caption Activist Greta Thunberg arrived in Europe after a voyage across the Atlantic by yacht

About 29,000 delegates are registered to attend the event in Madrid where the rulebook for the 2015 Paris Agreement is being finalised.

The arrival of environment ministers and - for some countries - prime ministers and presidents might jolt negotiations into action on the main sticking points: carbon markets and financing for loss and damage.

But those issues don't go away if an agreement isn't reached at the end of the week and it could hang over to the Glasgow COP.

'Good story'

Prof Piers Forster, a member of the Committee on Climate Change which advises governments, said the UK would then have to step up.

He added: "We have to build it around creating a good story about the different world we want to create and what sort of world we want for our children and grandchildren.

"We have to really make sure that we do bring everyone with us on this kind of journey."

Image copyright Getty Images Image caption Demonstrators have urged politicians to act now before it is too late

While there is much excitement about Glasgow being the focus next year, there is also concern.

Friends of the Earth Scotland wants poorer, developing nations to have more involvement, and not just at the top table.

But they have expressed concerns that current border control policies would be restrictive.

Mary Church, head of campaigns, said: "We are calling on the Scottish government and the UK government to do everything that they can to ensure that there is strong global-south representation when the COP comes to Glasgow.

"That means ensuring smooth visa processes, particular for people in Africa and west Africa who face really serious challenges getting visas to the UK."

Communities' influence

Spain stepped in to host the conference just a few weeks ago after civil unrest in Chile forced the government to cancel.

Despite being a last minute substitute, attention is paid to the environmental credentials of Madrid just as it will be to Glasgow next year.

But that does not faze city council leader Susan Aitken.

She said: "We expect there to be a very significant fringe to COP26 next November and that's where we can make sure that our communities will be involved, that they can have a say, that they can influence what the world leaders decide."

Of course much of that influence will come from the streets and Glasgow will have to brace itself for big protests like those seen in Madrid.

With climate change only growing in political significance, all eyes will be Scotland in a year's time.