When Spanish genetics researcher Pablo Carbonell spots a green rectangle among the endless grey rows on his computer's screen, it could be good news for winemakers struggling with the impact of a warmer climate.
The green reveals a change from the local grapevine genome's archetype that indicates a longer ripeness cycle, increasingly coveted by winemakers in Spain and worldwide.
Rising temperatures mean grapes have been maturing faster than before, leading to higher alcohol contents and weaker colours and aromas that can jeopardise wines' character.
Few research laboratories are as systematic in pursuing that goal as the one in La Rioja where Carbonell works, but its findings point to a future in which scientific investigation could become a key aspect of wine production.
The publicly-funded Vine and Wine Research Institute, known by its Spanish acronym ICVV, is studying the genomes of the most commonly used grape varieties in the Spanish region, where wine has been made since the Middle Ages.
It has determined that vines aged 35 years and older appear to cope better with climate change because they are more genetically diverse.
The lab's ultimate goal is to ensure winemakers plant specific vines proven to be "more adaptable to climate change conditions", said Carbonell.
Much is at stake for Spain, the world's third-largest wine producer after Italy and France and the leader in exports and vineyard surface area. Its industry is valued at over €5 billion ($4.94 billion).
Impact Of Climate Change
The United Nations Intergovernmental Panel on Climate Change warned recently of the risk that Europe will suffer 'losses in crop production due to compound heat, dry conditions and extreme weather'.
Its report will be among the issues for discussion at the COP27 climate summit taking place from 6-18 November in Egypt.
This summer was Spain's hottest since records began in 1961, with temperatures 2.2 degrees Celsius above average.
In La Rioja, minimum temperatures rose by an average of 0.9 C, and top temperatures by 0.7 C, between 1950 and 2018, according to a study by geographer Raquel Aransay.
The harvest moved forward by 2.4 days per decade and the alcohol content of wines increased 1.3 degrees per decade in 1992-2019, she said.
The northern region accounts for just 0.7% of Spain's population but produces 21% of its wine. Its more than 500 wineries produce 350 million bottles annually, with some vintages valued at as much as 5,000 euros per bottle.
The industry is worth around €1.5 billion a year, accounting for 20% of the region's economy.
"We are very worried about climate change," said Iñigo Torres, director of Grupo Rioja, an association representing 60 wineries that together account for 80% of sales.
Torres noted that harvesting this year started more than two weeks earlier than the historical average, altering grapes' ideal balance for winemaking.
Production has been below average in the past four years due to less rain and higher temperatures, decreasing by 5%-10% as the number of adequate grapes has declined, he said.
New Old Wine
On a recent morning at the ICVV, located outside La Rioja's capital Logroño, centrifuges were beeping and steam from liquid nitrogen was rising out of a bucket as a researcher prepared to extract DNA from crushed vine leaves.
It is the only laboratory in Spain and one of a few worldwide conducting full molecular analysis of vines, said ICVV director Jose Miguel Martinez Zapater.
Their samples come from a nearby vineyard, used as a scientific bank, where cuttings of old vines up to 100 years old have been planted since the 1980s.
"The technique of resequencing genomes allows for the identification of specific mutations responsible for diseases in human populations," he said. "The same technology is applied for grapevines, but we are looking for traits that can make the vines be better adapted to environmental conditions."
Scorching temperatures could eventually cause winemaking to cease in parts of Spain, Zapater warned.
The ICVV, which has an annual budget of 6 million euros and around 100 workers, this year started using its vineyard to produce wine experimentally, concluding so far that climate-resilient vines still yield good wine with Rioja's features.
Other research teams are similarly seeking to recover old grape varieties with long ripening cycles, and to study the result of crossing varieties.
About 60 km (37 miles) north from the lab, local winery RODA is also looking to the past for future climate solutions.
Hoping to protect its vines from rising temperatures, RODA last year planted a new vineyard with curved rows to better retain water from rainfall in hilly Cellorigo, which is among the coldest towns in La Rioja.
The grapevines were transplanted after being carefully selected from another vineyard where RODA studies the behaviour of old vines - some up to 110 years old.
"Our biggest concern is what will happen in 20 or 30 years. We will probably need to change varietals but we don't really know how things will come out," said agricultural engineer Maria Santolaya, of RODA's technical team, as she reflected on the recent sweltering summer.
"We hope to not have many years like this one because it has been very problematic".