When surprise hailstorms hit the 6,000 acres Trevor Scherman plants each year with peas, wheat, canola and lentils, his first move isn’t to his truck to assess the damage. These days, it’s to his iPad.

Nine mini-weather stations from the Canadian firm Farmer’s Edge, along with daily satellite imagery from San Francisco-based Planet, provide Scherman with an intimate assessment for each of his fields. The stations, which include a soil probe, measure moisture and temperature in the air and in the root zone, wind speed and direction, and even dew point.

The companies are part of a wave of emerging high-tech firms helping farmers fight a historic foe — bad weather — that’s getting wilder and more capricious. At the same time, seed sellers Bayer, Syngenta and DowDuPont are scouring for more crop genes that will let them geo-engineer plants to thrive in tough weather.

“We see right now a new paradigm in the production of corn and soybeans,” said Al Dutcher, an agricultural climatologist with Nebraska’s climatologist’s office. “Technological advances are outpacing the problems.”

Investments in agriculture technology companies are growing, hitting $6.7 billion in the past five years, and the number of venture capital deals are increasing, said Finistere Ventures, a San Diego-based venture capital firm. Through October 2018, there were 28 deals globally for companies making sensors and smart farm equipment, and 19 for imagery companies.

At the same time, traditional seed companies are searching for more ways to protect plants from climate change’s new weather patterns. They’re exploring the genetics of African corn varieties that can go weeks without water as well as Southeast Asia crops that have natural guards against diseases that warmer, more humid weather encourage.

Genes that help Mexican corn flourish in heat have been bred for wider use by Bayer. Originally meant for farms in the U.S. South, they’re now used as far north as Minnesota.

“Growers, really their biggest risk factor is the weather, and it always has been,” said Nathan Fields, vice president of production and sustainability at the National Corn Growers Association. “It’s getting more dramatic, but they’ve adapted in the past. … It’s more intense, but the seed produced today, the germ plasm, is producing incredible plants that can withstand a lot of this.”

The next innovation in corn is coming to the market in the early part of the next decade. Bayer and BASF are working on seeds that limit plant height, with the aim to improve their ability to survive high winds, said Bob Reiter, Bayer’s head of research and development.

It isn’t an easy battle. Farmers are seeing more intensely erratic weather than they ever have. Fields near Wilmington, N.C., for instance, got more than a month’s worth of rain in a single day as Hurricane Florence swept over the state in September. Two farms a hundred miles apart might see floods in one, and drought in the other.

“We’ve got to work with nature instead of trying to change it,” said Del Ficke, a Nebraska farmer whose state was recently victimized by record flooding that caused 75 counties to declare emergencies. “Whether you believe in climate change or not, it’s changing.”