Knut Ole Viken's history is tied to the forest. As a child he spent summers with his father in remote woodlands close to the Arctic Circle. There they measured the growth of trees, the foundation of Norway's wilderness.

27 years later, Viken has been working in the forest long enough to notice it change. Unlike many other forests, that change has been positive.

Norway was once at risk of losing much of its forests. After centuries of logging for timber and firewood, the country had consumed much of this previously vast natural resource.

All that has changed. Today, Norway has triple the amount of standing wood in forests than it had 100 years ago. The annual harvest of wood only takes about half the amount that grows each year, so overall the forests are growing. This forest growth is enough to offset roughly 60% of the country's annual greenhouse gas emissions.

"In the 19th century there was a lot of logging in Norway. We exported vast amounts of timber to Europe from our west coast," says Viken. "Locally, farmers were using firewood to warm their houses and the grazing from their animals prevented forests from recovering. That means that, when the forest was cut, there was no program for planting or regeneration."

Each 5-year cycle involves measuring 15,000 locations

In the late 1800s the government realized that soon there would be no forests left. They stepped in and did something rather radical: they started measuring the forest.

In 1919, the Norwegian government set out an ambitious plan. Norway would be the first country in the world to assess the state of all its forests.

While other European nations had measured areas piecemeal, Norway’s National Forest Inventory meant that the government would be able to use this information to assess the long-term trajectory of its forests. They could estimate which areas were healthier, which were growing faster, how much of the forest could be sustainably logged – and which aspects of the forest should be preserved as habitat for endangered species.

Viken is part of this long-term assessment. It has been going for almost a century, now run by the Norwegian Institute of Bioeconomy Research.

Only about 4% of the forest is protected for nature reserves and national parks

Every year, 25 forestry workers set out to take measurements across one-fifth of the long-term monitoring plots spread out over the entire country. After five years of this, the survey is complete and the program begins again, re-measuring the same locations. Each 5-year cycle involves measuring 15,000 locations.

It is a tricky business. "There can sometimes be a real struggle to get to the plot," says Viken. "There can be a lot of snow and wind, very wet and cold. We have a lot of days we're only able to get one plot and you can actually walk for hours to just get there."

The program is not without its critics.

Some visitors complain that the trees block the view of the majestic mountains and fjords that make Norway famous.

Others point out that, while there is more wood in the country than before, not much of the forest is pristine wilderness. Only about 4% of the forest is protected for nature reserves and national parks. The rest is managed for economic ends, mostly the sustainable wood harvest, and will eventually be cut down.

It is not clear how the trees will cope with a warmer climate

When the forest is cut it is often replaced through controlled reforestation programs. When industry replants the forest, what grows is often a less diverse group of trees than the previous stand.

So while there is more timber in these managed forests, there is often less biodiversity, and these regrown areas seldom resemble wild spaces.

In recent decades, the government has revised its approach. In particular, more attention is paid to preserving biodiversity, for instance preserving areas that harbour rare and endangered species. The new practices also include measuring the amount of dead wood on the forest floor, as it is a vital habitat for endangered insects.

That may well be good news. But Norway's forests now face an unprecedented challenge: man-made climate change.

The northern forests of Scandinavia, Canada, and Russia are some of the fastest warming places on Earth. It is not clear how the trees will cope with a warmer climate, so the government wants to find out.

"If we really want to understand how things will respond in the future, the best way to do that is to understand how they have responded in the past," says Chelsea Chisholm of the Center for Macroecology, Evolution, and Climate at the University of Copenhagen in Denmark.

That will be tricky, because all trees will respond differently. "Climate change isn't happening at the species level, it's happening at the individual tree level," says Chisholm. "The capacity of a given tree to respond to changes in temperature and precipitation over the course of its life is hardwired into its DNA."

Each tree has its own unique set of genes, which help to determine traits such as its height and the size and shape of its leaves. These traits are also affected by the tree's environment and life history – just as a human might have a gene that allows them to grow very tall, but still wind up short if they don't eat much as a child.

Chisholm and her colleagues are collecting trait and genetic data from individual trees, then combining it with the trees' life history – which in many cases has been tracked for almost 100 years.

By understanding how these trees have responded to the climate change that has already occurred over the last century, they hope to predict how they will respond to greater changes over the next one.

Humans rely on forests for many things: they provide fuel to heat our homes and products that bring economic security, and they are places where we can enjoy the wilderness.

Norway has brought its forests back from the brink of collapse, but it turns out that was only half the battle. The next challenge is to prepare them for a warmer future.