John Lanchester’s new novel, “The Wall,” sounds like the best-timed book of the year. It arrives smack dab in the heat of a constitutional crisis over President Trump’s determination to build a barrier along our southern border — Congress be damned.

Lanchester, who lives in London, is well-equipped to write about this confrontation tearing up America. Not only is he one of the best financial journalists, he’s also a novelist with a keen eye for how politics and money corral ordinary people’s lives.

But Lanchester doesn’t mention Trump or his wall in “The Wall.” He doesn’t mention the United States or Britain, where Brexit has arisen from a similar hostility toward immigrants. Instead, he abandons the sharp realism of his previous novels, such as “Capital,” and gives us a fable about a wall.

This is not so much a departure from Trump’s rhetoric as an attempt to make it concrete. After all, the president has been spinning fables about his “beautiful wall” for years. Lanchester merely imagines such a structure completed on a colossal scale, and then he speculates about the paranoid society that would develop behind it.

“The Wall” opens in a grim future — not too far off — after the Change. We don’t get much explanation, but it seems clear that climate change has dramatically raised the world’s oceans, destroyed whole countries and precipitated a massive immigration crisis — pretty much what scientists have told us lies ahead if we don’t reverse the GOP’s suicide pact.

The novel takes place in an island nation, something like England, that is now entirely surrounded by a thick wall designed to repel hordes of desperate refugees, called the Others. “It’s cold on the wall,” the book begins. “That’s the first thing everybody tells you, and the first thing you notice when you’re sent there, and it’s the thing you think about all the time you’re on it.” And it’s the thing Lanchester’s narrator spends an awful lot of time repeating. “It’s cold on the wall.” Got it.

That’s the voice of Kavanagh, a young man just beginning his stint as a Defender. So urgent is this national work that everybody in the country serves two years on the Wall — except members of the elite, who live in unimaginable luxury. Kavanagh, our Everyman, describes his fellow Defenders, the sweet camaraderie that develops among them, and the dull work of standing on this 6,000-mile wall and staring out at the dark sea for 12 hours at a time. Aside from random inspections from their captain, only one thing keeps these men and women awake: If any Others manage to enter the country on their watch, the Defenders at fault are thrown over the wall and set adrift.

As a parable, this is all highly relevant. As a novel, it’s fairly dull. Boredom is a hard state to portray effectively without succumbing to it. And Lanchester doesn’t have the chilling style of, say, Cormac McCarthy or the wry satire of Margaret Atwood, which could have charged this apocalyptic vision. We’re stuck in Kavanagh’s equitable mind as he struggles to acclimate to the Wall, begins dating one of his fellow Defenders and dreams vaguely of a better future.

There are moments of excitement — incursions from those mysterious Others — but what the story really needs is a richer sense of this complex society. Lanchester hints, for instance, at a sharp generational conflict between “the olds,” who ruined the planet, and the new generation, which must now live in this hellhole. “The life advice, the knowing better, the back-in-our-day wisdom which, according to books and films, was a big part of the whole deal between parents and children, just doesn’t work,” Kavanagh says. That sounds like the 1960s with twice as much carbon dioxide in the atmosphere, and it’s definitely a future possibility worth exploring, but the point is only glancingly developed.

In a similar way, we never really get to see those Others, though the novel is largely about how cruel and artificial such demarcations are. To a large extent this limitation stems from the restraints that Lanchester has set upon his form. Floating somewhere between realism and fabulism, “The Wall” doesn’t fully harness the benefits of either mode. It’s not a haunting allegory like José Saramago’s “The Stone Raft” nor a moving work of social realism like T.C. Boyle’s “The Tortilla Curtain.”

Which is a shame because Lanchester knows how societies function and fail to function. He understands class conflicts on a profound level. All his previous insight about the way different groups of people live together and contend for resources could have illuminated this dystopia with real fire.

But once again, as with so much contemporary political fiction, Trump’s America has outstripped a fine novelist’s imaginative power. Bleak as the drowned world of “The Wall” is, it can’t compete with those newspaper images of immigrant children stored in chain-link pens, the president’s xenophobic rants or the EPA’s rejection of scientific evidence.

As the seas rise and nations pull up their drawbridges in fear, we deserve novels commensurate to that emergency. Anything else just feels lukewarm.

Ron Charles writes about books for The Washington Post and hosts

More novels about climate change:

The Wall

By John Lanchester

W.W. Norton. 288 pp. $25.95