New York City has nearly 1 million buildings and nearly all of them (roughly 900,000) could be heated and cooled by the earth without burning any fossil fuels.

A recent report found that New York City was the most wasteful megacity in the world, and its buildings consume two-thirds of the energy we use. Over half of that energy is for space heating alone. Fossil fuels burnt for that purpose cause nearly 40 percent of CO2 emissions in America.

Solar, wind and hydropower are all necessary if we’re going to provide electricity without accelerating climate change, but none of these are great for heating and cooling buildings. The leading technology for this is called ground source heat pumps, which use energy from the sun’s heat trapped just below the earth’s surface. As air temperature fluctuates wildly throughout the year, the ground 20 feet below the surface stays steady, between 50 and 60 degrees.

A ban on fossil fuel systems would spur a geoexchange explosion.

Ground source heat pumps are exchange systems. In the winter, they absorb the heat from the earth, concentrate it with a heat pump, and deliver it throughout a building by ductwork. In the summer, they absorb the heat from the building and release it to the cooler earth.

Currently, they have high upfront costs due to drilling and installation. But a recent study of the cost to switch in New York City showed that they quickly pay an impressive return-on-investment, breaking even within three to 12 years depending on what kind of system they replace.

You might assume that such projects of this scope are unworkable in a dense city like New York, but there is massive, glorious proof of the possible in the very center of the city. St. Patrick’s Cathedral recently drilled and installed a new geothermal heating and cooling system. St. Patrick led the snakes out of Ireland—perhaps St. Patrick’s can lead the fossil furnaces out of New York.

Once geothermal technology gains more attention, Bob Wyman, a local energy consultant, forecasts a tipping point, where the city bans the construction of new fossil fuel furnaces (a policy just enacted in Denmark). Such a ban on fossil fuel systems would spur a geoexchange explosion, as architects learn about the systems and financers capitalize on the long-term opportunity. The state can lower the barriers to acceptance of the technology by offering subsidies to homeowners and landlords. But the biggest motivation will come from high heating and cooling costs, as well as the unbearable cost to the city from climate change.

Bill Nowack is the executive director of NY-GEO, and an expert in geothermal energy. According to one estimate he shared with me, between 80 and 90 percent of buildings can be heated by ground source heat pumps. It is not for every part of the city and will be easiest to incorporate in the outer boroughs and more residential areas without existing underground infrastructures. An estimate by John Rhyner—a licensed professional geologist—showed that almost all of Staten Island, 70 percent of Queens, and half of Brooklyn residential footage could be heated with this technology.

According to Mr. Nowak, the installers are already doing brisk business as word spreads, but the lack of governmental support for the technology has made progress far slower than it could be. Last year, Gov. Andrew Cuomo vetoed two bills that would have done the most toward jump-starting the geoexchange revolution. His support for the ground source heat pump future will be critical.

We have the breakthrough technology; all we need is breakthrough politics to build a city of the future, harvesting the steady heat of the earth.

New York City is an island city. It is one of the most vulnerable cities in the world to climate change. The city we love will drown if we don’t lead the world in clean energy. It is time to dig deep.

Zephyr Teachout is an associate law professor at Fordham Law School.