In the first half of 2019, Scotland generated enough wind energy to power its homes almost twice over. The country is moving aggressively toward goals of producing half its energy from renewable sources by 2030 and achieving net zero emissions of greenhouse gases by 2045.

From January through June, Scottish wind turbines generated 9.8 million megawatt-hours of electricity, enough to power 4.47 million homes. Scotland actually has 2.46 million homes.

The energy statistics come from WeatherEnergy, a unit of the European Commission. Of course, businesses and other entities need electricity as well as homes. Still, it's an impressive feat.

"These figures show harnessing Scotland's plentiful onshore wind potential can provide clean, green energy for millions of homes across not only Scotland but England as well," said Robin Parker, climate and energy policy manager for the World Wide Fund for Nature (WWF) Scotland. Parker was quoted in a WWF Scotland news release that publicized the energy numbers.

ScottishPower, one of the "Big Six" largest energy suppliers in the United Kingdom, has moved to 100% renewable energy after closing its coal-fired power plants and selling its natural gas plants. "From now on," says its website, "our focus will be on wind energy, smart grids, and driving the change to a cleaner, electric future."

Last month, the company announced plans to add a gigantic 50 megawatt lithium-ion battery to the UK's largest wind farm, Whitelee. The battery array will cover an area half the size of a soccer field and will have more than double the power capacity of any existing battery in the UK.

"By integrating storage technologies with onshore wind, we are blowing away one of the myths about renewable generation not being available when you need it," said Keith Anderson, ScottishPower's chief executive, in a news release.

"Natural resources like wind and solar are variable in their very nature, and by using a battery we can ensure we optimize our ability to use the resource most effectively."

Construction is scheduled to start early in 2020, with the battery coming on line by the end of the year. ScottishPower has nearly 40 other wind farms. It said it planned to add batteries to many of them as well.

Battery storage addresses one of the major drawbacks of wind and solar energy: its variability. The battery will allow the wind farm to store excess energy produced during times of high wind or low demand. For example, the wind turbines could charge the battery overnight, when demand is low. The battery could release electricity in the morning, when demand from homes and businesses rises as people wake up and head to work.

"Over a period of time, we will get to use much more wind output from the project and across the whole of the country," Anderson told The Guardian, "because even at times of low demand we will be able to capture far more of the wind rather than wasting that potential energy."

Batteries can also help stabilize the power grid during fluctuations in either energy supply or demand. "They can react in milliseconds and are incredibly useful as a virtually instantaneous tool for the energy system operator," Anderson said.