IBM’s Watson super computer is learning to become a master winemaker.

At a vast vineyard outside Modesto, Calif., E&J Gallo Winery is testing a new irrigation system developed with IBM to grow grapes using less water. The plan is to eventually apply the lessons learned to Watson so that IBM’s data crunching technology can help farmers around the world.

Cutting water use can save huge amounts of money in the agriculture industry. It can also play a big role in water conservation, especially during droughts like the one that has plagued California for several years.

“Water conservation has been a central focus,” said Dr. Nick Dokoozlian, vice president, viticulture, chemistry, and enology at E&J Gallo. “Our stewardship of water continues.”

Even before teaming with IBM IBM , Gallo had used some cutting edge technology to make its huge farming operations more efficient. Data scientists working for the company routinely analyzed satellite imagery of nearly 20,000 acres of grape vines to judge their health.

However, Gallo’s irrigation system was imprecise, Dokoozlian explained. Workers could only adjust the irrigation for plots as big as 10 acres, and not individual plants.

Gallo’s vineyard outside of Modesto, Calif.

Based on satellite imagery, Dokoozlian could see that some vines could be healthier. But sending workers to water individual plants would be too much work.

To solve the problem, Dokoozlian tapped IBM to help Gallo create a customized irrigation system that could automatically water small sections of vines based on the analyzed satellite data. The irrigation system combines the vineyard’s data analysis with customized hardware.

“This is Star Wars technology,” Dokoozlian said.

Hendrik Hamann, a research manager in IBM’s physical sciences department and the Watson research group, led the project. He had little experience working with wineries, but lots of experience studying energy management, sensor networks, and the physical sciences.

 

Central control computer

He and Dokoozlian worked out the technical requirements. They also tapped irrigation-manufacturing company Netafim to develop the irrigation system’s piping, valves, and related infrastructure.

IBM built a computer that acts as the control center for the 10-acre plot of Cabernet Sauvignon that serves as the test bed. Housed in an oversized electrical box near the field, it controls the irrigation schedule and contains a cellular link to a Gallo-run computer network in Modesto, where Gallo’s data science team is based.

Staff can control water to 140 individual sections in the vineyard—15 meters by 15 meters each—that contain 40 to 50 vines. Adjustments to the electronics and valves help them control the amount of water fed to the irrigation line running through the vines.

Control box for irrigation system

“We know how much water to apply,” said Dokoozlian. “We just needed someone to help us to get the correct amount of water to each field.”

So far, Dokoozlian said Gallo, founded more than 80 years ago, is pleased with the results. Compared with before, the new system has cut water use 25%. Meanwhile, crop yield improved 26% in 2014, according to a research paper by IBM and Gallo.

And yes, the wine produced from the experiment over the past three years is just fine. Last year, the harvest ended up as a version of Darkhorse Wines Cabernet Sauvignon.

 

IBM irrigation drip system.

 

Still, considering the irrigation system is only a prototype, there’s room for improvement. It’s too complex for a typical farm manager to operate, Dokoozlian said. Additionally, the system involves exposed wires and boxes filled with electronics, which makes it look more like a science project and less like a commercially viable project. Hamann acknowledged the inconvenience of a vast spider web of wires, and said that plans are in the works for a wireless-based system that’s easier to operate.

“This is the first step,” said Dokoozlian.

Currently, IBM is working on similar irrigation systems for other types of crops including almond, citrus, and Marigold flowers. The technology giant wants to take what it learned from its experiment with Gallo and apply it to its other projects.

Hendrik Hamann, a research manager in IBM’s physical sciences department and Watson research group

IBM is hoping that it will one day be able to sell data analytic technology to farmers that they can access through IBM’s cloud computing system. The farmers would wire up their irrigation systems while IBM would crunch the numbers.

It’s similar to how healthcare companies can access Watson to analyze their data. Still, IBM would face a number of challengers in data analytics for agriculture. It’s a hot sector that includes a number of companies that sell similar precision irrigation systems like Canada-based Hortau and Wisconsin-based Wellntel.

“It is fair to say we spent a fair amount of money,” Hamann said about the cost of the Gallo experiment. But he said it was worth it to learn by doing.

Subscribe to Data Sheet, Fortune’s daily newsletter on the business of technology.

For more on IBM, check out the following Fortune video: