Costa Rica is pulling off a feat most countries just daydream about: For two straight months, the Central American country hasn’t burned any fossil fuels to generate electricity. That’s right: 100 percent renewable power.

This isn’t a blip, either. For 300 total days last year and 150 days so far this year, Costa Rica’s electricity has come entirely from renewable sources, mostly hydropower and geothermal. Heavy rains have helped four big hydroelectric dams run above their usual capacity, letting the country turn off its diesel generators.

Now, there’s a huge, huge caveat here: Costa Rica hasn’t eschewed all fossil fuels entirely. The country still has more than 1 million cars running on old-fashioned gasoline, which is why imported oil still supplies over half its total energy needs. The country also has cement plants that burn coal.

What Costa Rica’s doing is nevertheless impressive — and a reflection of how serious the tiny Central American country is about going green. At the same time, a closer look at the story shows just how difficult it would be for other countries to pull off something similar.

Most of Costa Rica's electricity is from hydro and geothermal

When many people think of "renewables," they tend to think of giant wind turbines or gleaming solar panels. But that's not what Costa Rica is relying on. For years, roughly 80 percent of the nation's electricity has come from a technology that’s more than a century old — hydroelectric dams:

This makes a difference. Unlike wind or solar, hydropower can run at all hours, making it quite reliable. Though they do have a catch: The output of these dams can fluctuate with the weather, since you need enough water in the reservoir to keep the turbines spinning.

Back in 2014, Costa Rica suffered a brutal drought, and the dams produced less power, forcing grid operators to rely more heavily on diesel generators. In 2015 and 2016, by contrast, the country experienced above-average rainfall at its four biggest reservoirs, allowing those hydroelectric dams to meet virtually all of the country's electricity needs.

Another 12 percent or so of Costa Rica's electricity comes from geothermal plants, which tap heat deep in the Earth's crust and can also run around the clock. In 2014, after that aforementioned drought, the nation's legislature approved a $958 million geothermal plant, backed by loans from Europe and Japan, that's now up and running.

The remainder of Costa Rica's electricity needs were supplied by wind — which is currently supplying 7 percent of electricity — a smaller amount of biomass, and a very minuscule bit of solar.

But there’s more to energy than just electricity — and Costa Rica still uses oil for cars

When people talk about decarbonization, they often focus solely on electricity — the stuff that keeps our lights on and powers our homes and businesses. In part that’s because there’s a lot of excitement around using renewables to generate power.

But electricity is only a small part of the total energy picture. And a look at Costa Rica nicely illustrates why.

The country of 4.9 million people also has plenty of cars and buses, which still run on gasoline and diesel. This accounts for about half of Costa Rica’s total energy use. The nation also has two large cement plants that burn coal and petroleum coke in their kilns, producing carbon dioxide emissions. Many homes also still burn wood for heating, which can often have harmful health impacts (although Costa Rica has been trying to substitute cleaner-burning natural gas).

You can see a breakdown of Costa Rica’s overall energy use here. It’s in Spanish, but you can see that imported oil (in red) accounts for over half of total energy needs:

Also note that Costa Rica is still a relatively poor country (its GDP per capita is about $11,000) and its per capita electricity consumption is about one-quarter of, say, France or Belgium. If Costa Rica was richer and used more electricity, then its current hydropower and geothermal plants wouldn't be enough to supply all of its needs.

That’s not to knock Costa Rica! Ever since emerging from military dictatorship in 1949, the country has taken environmentalism very seriously, in part to nurture its thriving ecotourism industry. The state-run utility is currently building dozens of wind farms and small dams around the country, with the aim of zeroing out the use of all fossil fuels for electricity — forever. Costa Rica is also planning to balance out other emissions with a program to protect its rainforests and plant more trees. The aim, eventually, is carbon neutrality.*

Cleaning up the transportation sector will be the toughest lift here, particularly since electric cars are still expensive and not widely available. In a recent TedSummit talk, Costa Rican climate advocate Monica Araya discussed some of the steps underway. Among other things, she notes, it may take redesigning cities around walking, cycling, and electrified public transportation rather than cars.

Why it's harder for other countries to do what Costa Rica did

So if Costa Rica can get 100 percent of its electricity from renewable sources, why couldn’t other countries do the same? Why can’t the United States, which is far richer?

One obstacle here is that hydropower and geothermal are very location-specific — and only a few countries are lucky enough to have such rich resources. Iceland gets nearly 100 percent of its electricity from these two sources. Paraguay gets almost all of its electricity from the massive Itaipú Dam. Brazil gets more than 75 percent of its power from hydropower. But those are exceptions. For most countries, hydropower can only satisfy a portion of their power needs.

The United States, for example, has already dammed up most of its suitable large rivers and still only gets 7 percent of its electricity from hydro. We could maybe eke out another 1 percent by retrofitting smaller dams that don't have power plants, but there's an upper limit here:

As for geothermal, the United States could arguably do more to harvest heat deep beneath the ground — we currently only get about 0.41 percent of our electricity from this. But that's also limited by location. It could be a boon for states like California, less so for Wisconsin:

Most other countries find themselves in similar situations. Hydropower already provides 16 percent of the world's electricity. In theory, we could try to double this by damming up every last big river on Earth, but that could end up displacing millions of people, destroying habitats, and, in some cases, exacerbating climate change (decaying vegetation in poorly built dams can lead to extra methane emissions). Not so easy to do.

Which means that for most countries, moving to 100 percent renewable power would largely entail building a lot more wind and solar. The good news is that the price of both has been tumbling. The not-so-good news is that these sources are still intermittent, and not quite as simple to scale up (although a lot of people are working on figuring this out, and of course there’s a lot of hope that energy storage could help). Some analysts think these sources could hit a ceiling long before 100 percent.

In that case, countries worried about greenhouse-gas emissions may have to turn to nuclear power (reliable but expensive and dogged by concerns about waste). Or coal or gas plants that could capture their carbon-dioxide output and bury it underground (expensive and not yet commercialized).

And, of course, that’s just electricity. To really tackle global warming, you’d also have to reduce emissions from the transportation sector (where cleaner electric cars are still a tiny fraction of the fleet) as well as industries like steel, iron, cement, and so on (where there’s been surprisingly little work on decarbonization, even though this is about 20 percent of the world’s emissions). There's a good reason why fossil fuels still provide about 86 percent of the world's energy, a fraction that hasn't budged for over a decade. Coal, oil, and gas are environmentally destructive, yes, but also remarkably convenient.

So most countries won't be able to follow the exact same path Costa Rica did. They'll have to find their own ways to clean up.

* Note: Costa Rica had previously set a goal of becoming the first carbon neutral country by 2021. The government has since backed away from that and is officially aiming for 2085.

Further reading

A visual tour of the world's CO2 emissions