“Imagine you’re living in Manhattan and your building just stops working: There’s no electricity, no running water, no waste removal.

“Now imagine that happening to every building in the city.”

This nightmare scenario, says director Jeff Orlowski, is essentially what’s happened to huge sections of Australia’s Great Barrier Reef — otherwise known, at least in Orlowski’s “Chasing Coral,” as “the Manhattan of the ocean.”

Like cities, says the Staten Island native and Stuyvesant High School grad, coral reefs are hosts to huge and diverse populations. When the coral dies, “everybody is now homeless,” he says, continuing his analogy. “The only option is to walk to Chicago, or walk to Philly. But every city is going through the same problems.”

It sounds like something out of an apocalyptic drama, but it’s a reality for the world’s oceans, where rising temperatures are killing off the reef ecosystem at an alarming rate. “Chasing Coral,” out Friday on Netflix and at the IFC Center in New York, uses cutting-edge cameras to show us the crisis, a harrowing barometer for climate change, in gorgeous and then devastating detail.

Hundreds of miles of the Great Barrier Reef are already dead. Closer to home, Florida’s lost 80 to 90 percent of its coral. Overall, says Orlowski, who directed the Emmy-winning 2012 doc “Chasing Ice,” about the Arctic, the world’s already lost half of its coral.

“The public doesn’t realize how significant climate change is,” says the 33-year-old Stanford University graduate. When he was younger, he recalls, “everything was, ‘Save the whales’ and ‘Save the elephant.’ Now we’re talking about entire ecosystems. The entire ocean is under threat. That’s where the organisms are that give us the majority of the oxygen we breathe on this planet, and that’s really scary.”

‘We’re talking about entire ecosystems. The entire ocean is under threat.’

Not only are coral reefs crucial to the planet’s survival, but they’re also a hotbed of gloriously strange life forms. One of the film’s narrators says he became interested in coral after the gradual disappearance of one of his favorite marine animals, the rust-colored, seahorselike weedy seadragon.

“Every dive, there’s something new and magical that you’ve never seen before,” Orlowski says. “The first couple dives are so overwhelming that you don’t notice all the intricacies. As you dive more, you start seeing new things. And a lot of them are really tiny. They look like alien creatures.”

But many reefs now look more like the lifeless surface of Mars. The “Coral” team observed another phenomenon in which dying coral turns a stunningly bright, fluorescent color — what one scientist observed seems like a last-ditch plea for attention.

Orlowski says this hypercolor death process hasn’t been documented much yet. “When we first started filming, I had heard rumors from scientists of, ‘Yeah, sometimes they do these weird colors.’ Our film is really one of the only places where you can see that.”

Somber as its message is, “Chasing Coral” ends on a note of optimism. “The thing that gives me hope is that we’re seeing this shift in technology that’s also growing far faster than anybody expected,” Orlowski says. “We’re seeing renewable energy, we’re seeing electric cars. All of this is happening so rapidly that it does give me hope that we can shift faster than the ongoing destruction.”

Because in the end, he says, “This is not about ‘save the planet.’ It’s a very selfish motivation: If we don’t fix this, human civilization is going to be f–ked.”