SAN FRANCISCO — Outside a courtroom where a much-anticipated court hearing on climate science took place on Wednesday is an old photo of San Francisco’s coastline. Dated 1865, it features an area of the city known as North Beach, which back then was covered in ramshackle wooden houses on a sandy slope nuzzled up against the shore. Since then, the coastline has been extended, filled in with sand (and most likely boats and other strange things) to stretch several blocks farther into the brackish waters of the San Francisco Bay. A sea wall, badly in need of repair, keeps the bay at bay.

That very sea wall is at the heart of the court case — The People of the State of California v. BP P.L.C. et al. — that was the reason for Wednesday’s spectacle. The cities of Oakland and San Francisco are suing the five biggest fossil fuel companies on the planet — BP, Chevron, ConocoPhillips, Exxon Mobil and Royal Dutch Shell — for billions of dollars for past damages and to prevent future flooding from sea level rise. Since the companies extracted fuel that altered the planet, the argument goes, they should pay for the consequences. It’s a modern version of “you break it, you buy it.” The oil companies have filed to dismiss the lawsuit on many grounds, including that it’s the government’s job to set and enforce carbon dioxide levels — not theirs.

On Wednesday, no one was yet on trial. U.S. District Judge William Alsup made that very clear to the throng of spectators who filled the chambers, a spillover courtroom and the halls outside. Instead, we were there to see a tutorial, an effort to help this self-described “poor judge” learn the science behind the case. It was going to be a boring morning full of numbers and diagrams, he warned the audience.

But in this polarized moment, a public tussling over the basics of climate science, however cursory, is anything but boring. And as each side in the case presented a history of climate change science, it was striking just how much the two sides agreed on: Climate change is happening, and humans are in large part responsible. But that’s not really what this court case is about. Rather, it’s about who knew what and when, how much uncertainty there is around future predictions and who should be held responsible (and liable) for a future with higher seas and more extreme weather events. That’s where the cities’ and corporations’ use of evidence diverged.

First up: the scientists.

At a big rectangular table in the center of the room, the cities were represented by Steve Berman, a lawyer known for his ability to get big settlements out of big corporations, as well as some of their own lawyers. But aside from a few introductory remarks, Berman left the talking to a few of the world’s leading experts on climate change. First, he called Myles Allen, who is a professor of geosystem science at Oxford University and was tasked with providing a historiography of climate change research.

In true scientist fashion, the talk was filled with jargon and complicated scientific concepts. Alsup, who made clear that he would call out confusing charts or unclear explanations, asked Allen what made carbon dioxide, which is emitted from burning fossil fuels and have led to a warming planet, special. Allen, equal to the task, began to pantomime his answer. Arms stretched out to the side, fists in a ball, he shimmied left and right, showing how the charge on a carbon dioxide molecule could be unevenly distributed, absorbing the infrared waves that are naturally emitted from Earth, unlike oxygen and nitrogen, whose charge is symmetric. That infrared gets trapped within Earth’s atmosphere, instead of escaping, causing the planet to warm.

After walking through key figures and research from the last century of climate science, Allen concluded by saying that we’ve known that the planet was warming since the 1970s. And crucially, he said, we knew back then that we might not know how bad climate change would be, or be able to feel and see the effects of that warming, until it was already too late.

The next speaker, Gary Griggs, an oceanographer who works at the University of California, Santa Cruz, was deep into an explanation of sea level rise when a loud, piercing alarm went off. “Coastal flood alert,” Alsup quipped as soon as it finished. The room broke out in laughter. It wasn’t clear whether it was real or a drill, but nature has a way of making itself known.

Next up: the lawyers.

While the cities relied on scientists, the energy companies relied on lawyers. One in particular: Theodore Boutrous, a lawyer for Chevron (which is headquartered in the Bay Area) did all of the talking. And he got straight to the point, answering the question on everyone’s mind: Yes, Chevron accepts the scientific consensus on climate change. And in honor of that consensus, he’d be relying almost entirely on the work of the Intergovernmental Panel on Climate Change, a United Nations-backed consortium meant to provide a scientific view of what climate change is doing to the planet, to lay out his understanding of the science and the history.

He kicked off by quoting from the IPCC’s most recent report, from 2013, citing population growth and economic changes as the most important drivers of climate change. The report, he noted, says nothing about fossil-fuel extraction as a driver of climate change.

Boutrous offered a history lesson that had a lot in common with Allen’s, but with a much greater focus on the uncertainty around both the science and the impacts of climate change on the Bay Area. He illustrated that uncertainty in various ways, describing how theories that posited alternative roles of carbon dioxide in the atmosphere held sway through at least the 1950s. Boutros also showed how actual temperatures hadn’t been as extreme as many climate forecasts predicted in the years leading up to the report. Alsup asked if his point was that the models exaggerated the impact of humans on the climate. “Instead of doom and gloom, it’s just gloom?” he asked the lawyer. Boutrous chuckled and moved on.

Boutrous concluded by showing a map of sea level rise, saying that sea levels had fallen around San Francisco in the years leading up to the 2013 IPCC report. There’s a lot of uncertainty about the future, he concluded, noting that San Francisco and Oakland had reported that exact message to bond investors in 2017, when the cities said they couldn’t predict whether major flooding or storms might have a major, adverse impact on the local economy.

Finally, the tutorial pivoted back to the cities, so it pivoted back to the scientists. Don Wuebbles, who is a professor of atmospheric science at the University of Illinois and co-wrote the 2007 IPCC report that helped the organization win the Nobel Peace Prize, was the final scientist called by the cities. He began by pointing out that he’d also led the writing of the first chapter in the 2013 IPCC report that Boutrous had so carefully recounted. “I think it’s important to recognize that science did not stop; there’s a lot we’ve learned in the last five years,” Wuebbles said. That’s why he’d be using data from the U.S. Global Change Research Program, which produces more frequent, national reports on climate change to make his presentation.

The year after the most recent IPCC report was published was the hottest on record, Wuebbles told the court. Then 2015 topped 2014, and 2016 topped 2015. Temperatures are going up, precipitation is increasing, extreme events are more frequent. Looking at a broader set of years, sea level has risen around the San Francisco Bay. Alsup asked Wuebbles whether he disagreed with Boutrous’s recounting of the science.

Not really, since the lawyer had based his presentation on the IPCC, and a report that Wuebbles was heavily involved with. But Wuebbles’s point was that the IPCC report doesn’t tell all of what we know in 2018. The IPCC report might not be wrong, but that doesn’t mean that it gives the best picture of what’s right.

As the tutorial concluded, Alsup had a few final remarks. “I wore my science tie today,” he said, pointing to the solar system hanging around his neck before standing up to leave. “I hope someone takes note of that.”