James E. Talmage writes apostasy brought the Flood.
James E. Talmage, "Natural Phenomena Related to Human History," The Latter-day Saints' Millennial Star 83, no. 25 (June 23, 1921): 388–89
Abject apostasy from the laws of God in Noah's time brought about the Deluge, in which "all the fountains of the great deep were broken up, and the windows [more properly flood-gates] of heaven were open."
Enoch, who lived before Noah, was sent to proclaim repentance to the degenerate race, and so great was the power and authority vested in him that "he spake the word of the Lord, and the earth trembled, and the mountains fled, even according to his command; and the rivers of water were turned out of their course." He foresaw the coming of the Noachian flood, and the events of history, including the Savior's ministry, down to the days of the Lord's second advent, when "the heavens shall be darkened, and a veil of darkness shall cover the earth; and the heavens .shall shake, and also the earth" (Pearl of Great Price, pp. 42 and 44).