You could say it happens once in a blue moon — a rare celestial trifecta. The last time it occurred in the Western Hemisphere was more than 150 years ago.

In the early hours on Wednesday, lunar revelers will witness a total lunar eclipse, a supermoon and a blue moon hovering over the western horizon.

“Each one of them by itself isn’t common, but putting all three of them together is rare,” said Ben Burress, staff astronomer at Oakland’s Chabot Space and Science Center.

The sun, the Earth and the moon neatly line up during a lunar eclipse. Because our planet blocks the sun’s rays, the moon appears darker in the sky.

Eagle-eyed early-risers can catch shadows starting to creep over the moon at 2:51 a.m. on Wednesday. The partial eclipse begins at 3:48 am. Totality will occur at 4:52 a.m., when the moon is fully immersed in the Earth’s shadow.

Each lunar cycle, the moon passes through perigee — the point in its elliptical orbit closest to Earth. On rare occasions, this event coincides with the full moon and produces a supermoon.

Supermoons can appear up to 14 percent larger and 30 percent brighter. Because of the eclipse, however, this particular moon will appear dimmer.

The best time to view the eclipse will be at 5:29 a.m., when onlookers can expect to see a dimly lit red moon.

Finally, at 6:08 a.m., the total eclipse will end, with the moon slipping back into a partial eclipse. The show ends at 7:11 a.m. — just in time for the morning commute. The second full moon in January, known as a blue moon, will sink below the horizon shortly after that.

Astronomy enthusiasts won’t be the only moon-watchers.

Researchers like Rick Elphic, a planetary scientist at NASA’s Ames Research Center in Mountain View, plan to monitor the eclipse from the ground and from the skies to gain valuable insight into the moon’s geological features.

To do this, NASA’s Lunar Reconnaissance Orbiter will attempt to map temperatures as the moon slips into the shadows. During a lunar eclipse, temperatures on the surface of the moon drop dramatically.

“The temperatures on the surface, and how they change, tell us a lot about how fluffy or compacted the soil is on the surface of the moon,” Elphic said.

Readings like these help scientists understand which areas of the moon are scientifically significant.

Researchers and revelers alike are hoping for one thing: clear skies. And so far, the forecasts look promising.

“There could be a few high clouds in the sky at the time, but as of right now there shouldn’t be any issues,” said Brian Mejia, a meteorologist with the National Weather Service in Monterey.

Since the moon will set low over the western horizon, likely tucked behind trees, buildings and hills, said Andrew Fraknoi, a retired professor of astronomy at Foothill College in Los Altos Hills. He suggests those hoping to view the eclipse plan ahead.

“If you live on the beach in Pacifica, you’re great to go,” Fraknoi said. But most other Bay Area stargazers should head to the hills to catch a better glimpse.

“If people are having to get up for work or school, or if they’re willing to get up, then this is very democratic — anyone can just go outside and look for the moon.”

Fraknoi insists it will be a spectacular show, but laments the timing. He would have preferred a slightly more forgiving schedule, perhaps on a weekend.

But, he said, “that’s just the way the sky did it.”