When a 7.9-magnitude earthquake shook the Gulf of Alaska on Tuesday, tsunami experts knew almost immediately that a turbulent surge of water had been set in motion and just how fast it was traveling. The wave was on pace to strike California in four hours, and several cities, including San Francisco, alerted residents that danger could be headed their way.

It was a false alarm — no blast of seawater arrived. The problem, experts say, is that scientific models that are good at projecting the trajectory of tsunamis are not so good at forecasting their strength.

“In a sense, it’s like what happens with sound in a Gothic cathedral,” said Lori Dengler, a professor of geology at Humboldt State University. “We have a good picture of what it looks like, but the sounds echo in very different ways. ... How many wave surges are there going to be? When is the largest one going to happen? These sorts of details are hard to assess.”

Tuesday’s tsunami was unleashed by a 1:32 a.m. quake off the southern coast of Alaska, near Kodiak Island. No major damage was reported, but within minutes, the National Tsunami Warning Center sent out a warning — the highest level of notification — to residents on coasts of Alaska and British Columbia. It told residents to head to higher ground immediately, prompting people to jam roads leading away from the coast and flock to evacuation centers.

For California, Oregon and Washington state, the warning center issued a tsunami watch, the lowest of its three levels of alerts. The notification, which means the threat is still being evaluated, is based only on the size of the earthquake and the location. Scientists at the warning center take those factors and run computer models that consider what happened in past tsunamis, in an effort to get a read on what will unfold this time.

While the models are usually accurate in projecting the course of a tsunami, scientists say there are too many factors to know immediately how much water has been displaced. Tsunamis can be triggered by earthquakes, landslides and glacial ice breaks, each of which affects the sea differently.

How the the blast of water then moves across the open ocean and how the geography along the coast will affect it present another round of variables.

“We can’t really predict how big the tsunami is going to be until we start seeing it,” said Mika McKinnon, a geophysicist from the Bay Area who now works in British Columbia.

McKinnon and other experts evaluate the strength of tsunamis using the hundreds of seafloor gauges maintained by the National Oceanic and Atmospheric Administration. Readings may come many minutes or hours after the tsunami is first detected.

In the case of Tuesday’s seismic wave, the tsunami was found to be the result of a strike-slip earthquake, in which the ground moves horizontally and tends to push out less water than a quake that shifts the ground vertically. The tsunami watch was called off at about 4 a.m. for California, Oregon and Washington. Local governments sent out a new spate of emails or messages through services like Nixle to let residents know the threat was over.

Had the threat been elevated to the next level, an advisory, or to a warning, public outreach would have been different. California’s Standardized Emergency Management System would have been activated and universal cell phone alerts would have gone out, said David Hale of the National Tsunami Warning Center. In the case of a warning, sirens also would have blared.

“If our model indicated that California was due to get hit with something, then that same warning for Alaska would have included California,” Hale said.

Anyone in an area that has been placed under a tsunami warning should “try to get at least a mile inland from the beach or at least 100 feet in elevation from the beach,” Hale said.

Heading to the fifth floor or higher in a concrete-reinforced building will work, Hale said. “Vertical evacuation is as effective as horizontal,” he said.

McKinnon said scientists are slowly becoming more adept at assessing the strength of tsunamis. The technology for measuring how much water is displaced by an earthquake is developing. More wave gauges are being installed on the ocean floor. And more extensive mapping of the coastline is enabling better insights of how waves are absorbed.

“The tsunami models are getting better and better all the time,” McKinnon said. “The more earthquakes and tsunamis we see, the more we’ll learn and the better we’ll be able to predict what happens.”

Kurtis Alexander and Josh Koehn are San Francisco Chronicle staff writers. Email: kalexander@sfchronicle.com josh.koehn@sfchronicle.com Twitter: @kurtisalexander @Josh_Koehn