Torrential rains and widespread flooding in Texas have brought relief from a yearslong drought to many parts of the state. Such unpredictable and heavy rains are a big part of what climate scientists say that many Texans can expect in years to come.

The relief has come at a great cost. The death toll from storms across the state and Oklahoma has reached at least 19, by some estimates, and the property damage is so extensive that Gov. Greg Abbott of Texas has declared some 40 counties disaster areas.

It was not long ago that the state was dealing with a searing drought. In 2011, the drought was so pronounced that the governor then, Rick Perry, proclaimed three days in April “days of prayer for rain in Texas.” Parts of the state began to see the drought ease by 2012, but much of it has remained parched.

Now, Texans are more likely to be asking for divine intervention to provide a little sunshine. Reservoirs that had reached historically low levels are brimming, or at least rising fast. The water level at Lake Travis near Austin rose nearly 24 feet in the last week. It was just 34.2 percent full a year ago; today it is 65.5 percent full. Across the state, reservoirs have collected about eight million acre feet of water, rising to 82 percent full from 73 percent full in a month, according to the Texas Water Development Board.