Texas really can't seem to catch a break. A month ago, the Lone Star state was in the middle of a dry emergency: Its reservoirs were draining, its depleted aquifers were sucking in the earth above. As of Wednesday, though, the state is saturated. Four weeks of dousing storms have swept away property, roads, lives, and prompted governor Greg Abbott to declare 37 counties as disaster areas.

The devastation caused by these floods is heart-wrenching. But you could consider Texas' weather whiplash to be a good thing: These dousing storms, which seem more and more like the consequence of a strengthening El Niño, have brought an end to a four-year water shortage. Just how much of a silver lining these floods are creating, though, depends on the particular geography of Texas' different regions—it is a gigantic place, y'all. And the land's composition also plays a crucial role in just how bad the flooding has gotten.

"Texas is a big state, and there is a big contrast in what happens when rain falls," says Ronald Kaiser, a water expert at Texas A&M in College Station. There's no perfect way to slice up the state's water resources, but broadly, you can think of it in four parts.

East of highway I-35 to the Gulf Coast—crowned by Houston—is low and flat, with dense soils and a shallow clay layer that makes it easy to flood. This is where rain falls hardest, rivers run thickest, and most of the state's reservoirs are located. "There's a joke that if it's overcast in Houston you'll get flooding," says Kaiser. Which is why things got so bad so quickly when 10 inches fell on the city Monday night. Talk about a punchline.

Texas Water Development Board

From a water supply standpoint, the storms were great for this part of the state. As you can see in the graphic on the left, every reservoir in the eastern part of the state is above 90 percent full (the graphic was updated May 28). But the area also set itself up for more devastating consequences from the rainfall, because during the drought east Texas water districts were pumping groundwater. This leads to so-called subsidence: The ground literally loses elevation as the water is sucked out from under it. Because it's so low and flat there, even a foot of shrinkage can lead to a lot more standing water. Though subsidence has mostly stabilized in recent years, in the past parts the Houston area were sinking at rates up to three inches a year. Add that to .08 inches of sea level rise a year, and Houston was primed for flood.

Moving west, Texas starts to get hilly, the dirt shallow, and the water table lower. The I-35 corridor—Dallas to Austin to San Antonio—goes from high plains to hills to choppy canyon. "Hill country is limestone and rock and hills, so the water runs off very quickly," says Kaiser. These turbulent canyons are what shuttled the devastating flows into Wemberly and San Marcos.

What do those deadly flash floods mean for the drought? The cities here pull from the Edwards Aquifer, a massive limestone groundwater source that fits under most of the central state. The aquifer is porous, cracked, carved out, so water trickles in easy, especially at a huge, crescent-shaped exposed area called the recharge zone that runs roughly alongside the I-35 and then curves south and west. "It has a lot of crevice, fractures, caves. As rains happen, they flow over the limestone surface, and that rapidly recharges the water table directly," rather than having to percolate through layers of soil and bedrock, says Larry French, the director of groundwater resources with the Texas Water Development Board. Though not as easy to monitor as the reservoirs, French says this aquifer rose about seven to eight feet over the past week. Which is a lot, considering the aquifer is over 1,250 square miles in area.

The Panhandle, on the other hand, is mostly flat, desert plain. High and very dry. Dominated by agriculture, the state's thirstiest region drinks from the famous—and threatened—Ogallala Aquifer. Like east Texas, this land is shrinking from subsidence. And unlike the central Edwards Aquifer, the Ogallala is covered by a thick clay layer that prevents all but the tiniest percentage of water from filtering down. "You can have whatever rain you want, and you get almost no recharge," says Todd Caldwell, a hydrologist at the University of Texas in Austin. Amarillo, which is smack dab in the middle of the panhandle, had its second wettest May in recorded history—nearly 10 inches. But it would be optimistic to think than more than an inch of that made its way into the Ogallala.

The western end of Texas, propped under New Mexico like an elbow, was the only part of Texas skipped by the storms. Compared to the rest of the state—which saw averages ranging from 10 to 20 inches—May was dry. But despite the west's missing out—and the Panhandle's runoff—things are looking up for Texas. "I think it’s safe to say that on a statewide basis this ended the drought," says Ruben Solis, French's surface water counterpart at the Texas State Water Development Board.

And the floods might even help scientists get a better grasp on the long term flood situation. Caldwell is a hydrologist who studies soil moisture, and he took advantage of the recent storms to do some field work calibrating his radiometers. These metal pronged, plastic-headed instruments capture moisture data from the soil and calibrate that data with readings from SMAP, NASA's soil mapping satellite. Why is this so important? “Soil moisture controls the exchange of energy with the atmosphere,” says Caldwell. Dry soils heat up, and wet soils evaporate, so knowing the wetness of any particular patch of dirt helps scientists get better at predicting temperature and precipitation.

So, could other states benefit from a big drought-busting, El Niño driven megastorm? Not quite. “If you had rain like this in California I’d call it a wet drought," says Kaiser. For one, California gets most of its water from snow stored in the mountains. And most of its reservoirs are in the northern part of the state. If Texas-style floods did hit, they’d come south, wash out places like LA and San Diego, then run off to sea with little catchment.

And Lone Star State’s salvation didn’t come for free. “Rain just doesn’t fall in a civilized fashion in Texas,” reminds Kaiser. Death, destruction, delay are how much of the world will pay for water in a warmer, drier, more extreme world of weather.