LIVINGSTON, Mont.—When a torrential flood struck this town nestled on the banks of the Yellowstone River in 2022, it swamped areas that scientists had long predicted were susceptible to flooding. Those included a historic residential neighborhood and land that housed the local hospital, which had to be evacuated when floodwaters cut off access to it.