Kim Stanley Robinson is, uncharacteristically, at a loss. As a science fiction writer, he is famed for dreaming up utopian futures. But when we meet for lunch in his Californian hometown, at times he struggles to maintain his cool.

“What the hell do we write at this point in history?” he asks. “My utopia has reached this low bar: if we avoid a mass extinction event, then, ‘Yay! Leave it at that.’”

Robinson has not always felt so cynical. Across a career spanning over 30 years, he has built a reputation as a pragmatic optimist. From his breakthrough Mars trilogy in the 1990s, about colonising the barren planet, to his latest novel, Red Moon, set at a lunar mine and in China, his novels have deployed science and diplomacy to explore how crises might play out in similar-but-better political worlds. If the Gulf Stream stalls, try adding salt. If climate change exacerbates cross-border conflict, try building better structures of international cooperation.

“I don’t think prediction is the name of the game,” he says. Instead, speculative fiction is “more of a modelling exercise. Like running a computer program over and over again. You run this line in history, see what the conclusions are, and don’t worry about the fact that it’s one of an infinite spread.”

Robinson’s work has been compared to the ecologically-minded fiction of Ursula K Le Guin, and has proved popular with both climate activists and the billionaires of Silicon Valley. The science fiction community showers him with prizes, Google and Facebook invite him to their conferences. Time magazine nominated him a “Hero of the Environment” in 2008. In a recent New York Times interview, the famously cheerful actor Tom Hanks cited Robinson’s books as something that helps him stay hopeful.

Yet when it comes to the warming climate, there are limits to Robinson’s optimism. “Trying to imagine how we redirect the immense inertia of our current system gets quite frightening,” he concedes.

In previous decades, it didn’t matter so much which modelling exercise you picked to run, Robinson explains. Whether you set your story on Earth or another planet, it was simply a blank slate for testing out ideas. But as climate disaster looms, immersive “space opera” stories seem a distraction.

“Given our current situation, you write that stuff and you’re just contributing to an entertainment industry; a Hollywood culture of mass media. You’re not doing anything useful – and fiction can be so useful that there is a moral imperative to be so.”

Finding the golden mean between optimism and pessimism is not easy when writing about climate change, as Jonathan Franzen found after his recent New Yorker essay, “What if we Stopped Pretending the Climate Apocalypse can be Stopped?”, provoked a severe backlash from readers and activists. In this context, Robinson’s commitment to hope is increasingly valuable, and his thinking increasingly relevant.

Advisers to the Democratic congresswoman Alexandria Ocasio-Cortez have sought him out to discuss the environment. But he doesn’t like to think in terms of political parties: “I’d just say I’m an American leftist. The left’s an honourable tradition and a very broad band from Bill Clinton to Xi Jinping. Anything that seems to be progressive in a way that a social scientist or an ordinary person in the street could agree with: health insurance, a pension, and the right to a job.”

His outlook is rooted less in ideology and more in the lived experiences of landscape – specifically the boldly fragile beauty of California’s terraformed farms and coast. “California’s different: it’s the fifth biggest economy in the world, it’s the gold rush, Hollywood, Silicon Valley, and it’s too lucky. I wish the whole United States was being led by California, that would get faster solutions. On the other hand, the inequality here is getting as bad as anywhere.”

While growing up in 1950s Orange County, on the outskirts of LA, Robinson would happily lose himself in two things: books and fruit bushes. He was “living Huckleberry Finn”: chasing rabbits through orange and avocado groves, bow and arrow in hand. A decade later, those same orchards were being torn out for freeways and housing. “It was an industrial operation: come in, cut ’em down, chop ’em up,” he remembers of the trees that used to stand in giant rows.

Robinson’s subsequent “allergy” to ill-considered development has only intensified as extreme weather puts the region under stress. The most destructive wildfire in Californian history swept through hills north of his Davis home town in November 2018, filling the basin of land between the Sierra Nevada mountains and the sea with smoke – and driving the novelist out of the garden where he writes each day. “You could taste it; it burned your eyes.”

Such man-made – or man-exacerbated – natural disasters are woven through Robinson’s fiction. In his first novel The Wild Shore (1984), California is rebuilt on greener principles in the aftermath of nuclear war. In a trilogy written in the 2000s (later condensed into a single volume titled Green Earth and published in 2015) politicians tackled an unfolding climate crisis on a global scale. In that novel, the account of a progressive, democratically elected government guided by experts, scientists and a John-McCain-style war hero president is the fullest expression of Robinson’s political fantasy. The book even includes a brief history of Roosevelt’s New Deal. “There’s what I call the technocrat class, a kind of HG Wells scientific meritocracy, and it’s for them to advise the political class: this will work, this won’t work, try that,” he says.

Failing to consult the technocrats can lead to “lunatic” suggestions, Robinson has found. The radical left’s position of leaving the remaining wilderness entirely alone won’t work, he argues, as climate change requires management. Yet interventions suggested by technophiles, such as sucking carbon out of the atmosphere with hi-tech “vacuum cleaners”, are equally problematic.

Robinson favours actions with multiple benefits, from growing more forests, to supporting women’s rights around the world and making agriculture “a carbon-negative business”. His 2017 novel New York 2140, about a city sinking under both rising tides and capitalist excess, explicitly links the fight to lower emissions with the need to reduce global inequality.

The novel anticipated conversations taking place in Washington today – and the character Charlotte Armstrong, a

politically minded social worker who runs the co-op, bears striking resemblance to Ocasio-Cortez, who was elected to the House of Representatives a year after 2140 was published. “By accident,” says Robinson, “I was ahead of the curve.”

***

If there is a downside to fiction driven by science and politics, it is that characters like Armstrong can come across as thin; their inner lives secondary to servicing the plot. But social and economic context does shape personality. “I’ve met probably ten or a dozen billionaires; they’re all men, they’re all very peculiar,” Robinson notes of Silicon Valley tycoons like Elon Musk. “It’s the Midas touch: once you’ve got that much money you’re in a weird social situation and you don’t know if anybody likes you or not.”

When asked for an example of someone he admires, Robinson cites his wife, Lisa Howland Nowell: a chemist and government scientist. “She studies what happens to pesticides when their work is done. There’s sometimes 256 pesticides in a single spreadsheet,” he marvels, “this is who I really write about.”

In his novels, the characters who shine the brightest are those who end up acting against their own interests or instincts. In 2140, it’s a selfish, rosé-drinking hedge-fund trader who – despite himself – helps Charlotte Armstrong bring down the banks.

Robinson seems to share some of this inner conflict. As our lunch ends, he heads off to help arrange the flowers at a dinner for the homeless. He does this not because he believes in charity (he doesn’t, and doesn’t think those receiving it like it much either), but to support his wife, who runs the event.

For all its detailed world-building, therefore, Robinson’s fiction has at its heart the mystery of how people and societies make decisions. He writes in 2140: “Individuals make history, but it’s also a collective thing, a wave that people ride in their time, a wave made of individual actions. So ultimately history is another particle/wave duality that no one can parse or understand.” Not understanding is OK, the novels imply, as long as we strive for more knowledge: by reading, listening to experts – and keeping the conversation open between those who see things in different ways.

Acknowledging this is vital, as the response to the climate crisis will have to emerge from our messy and imperfect present. But it is not an easy task, and work on his new novel, set in our current century, is leaving Robinson feeling “particularly fragile and desperate”.

Yet he is resolved to keep trying. “No one solution will solve the climate change problem,” he says.“So you’ve just got to try everything that seems good.”

“Red Moon” by Kim Stanley Robinson is published by Orbit