Another interpretation (of Genesis 8:1): "Then God remembered Noah." It is written (Proverbs 12:10): "A righteous one knows the soul of his beast." The Righteous One of the world knows even the soul of His beast, even when He is angry. The attributes of the Holy One, blessed be He, are not like the attribute of flesh and blood. The attribute of flesh and blood: when a province rebels against him, he sends out his legions and destroys it, and he makes the good and the wicked equal as one, and there is no one there to say, "So-and-so is upright, leave him be" — rather they kill them all. But the Holy One, blessed be He, is not so. Rather, the whole generation provokes Him, and He is angry with them, yet there is but a single righteous one there, and He saves him. This is the meaning of "A righteous one knows the soul of his beast." And so it says (Nahum 1:7): "The Lord is good, a stronghold in the day of trouble, and He knows those who take refuge in Him." "But the compassion of the wicked is cruel" (Proverbs 12:10) — these are the generation of the flood, who were cruel. Our Rabbis said: At the hour when the Holy One, blessed be He, brought up the deep, and they saw the fountains rising over them, what did they do? They had many children, and each and every one would take his child and set him upon the deep, and the waters kept rising. This is the meaning of "But the compassion of the wicked is cruel." [And whence that they did so?] For Job said of them (Job 24:20): "The womb forgets him, the worm feeds sweetly upon him, he is no longer remembered" — his womb, that is, his children. And what did the Holy One, blessed be He, do to them? He brought down upon them a flood from above and shattered them, as it is said (Job 24:20): "And unrighteousness is broken like a tree." Rabbi Berekhyah said: They were exceedingly hard, and they were of great stature, and had He not exacted punishment upon them from above, the waters could not have prevailed against them. For so Job said (Job 22:20): "Surely our adversaries are cut off, and their remnant the fire has consumed." What is the meaning of this? Since the Holy One, blessed be He, saw that they had not died in the depths below, He brought down upon them fire from above and burned them, as it is said, "Surely our adversaries are cut off," and so forth. And not only that, but He turned the bird and the beast and the wild animal against them, and they made them perish, as it is said (Genesis 7:21): "And all flesh perished," and so forth. When they saw themselves that they were lost, they sought to overturn the ark. What did the Holy One, blessed be He, do? He surrounded the ark with lions, and they devoured them, as it is said (Genesis 7:16): "And the Lord shut him in." What is the meaning of "shut in"? As in the matter of which it is said (Daniel 6:23): "My God sent His angel and shut the mouths of the lions."
How God Saved Noah and Destroyed the Cruel Flood Generation
Midrash Tanchuma Buber, Noach 10:1
ד"א ויזכר אלהים את נח. כתיב ויודע צדיק נפש בהמתו (משלי יב י), יודע צדיק של עולם אפילו נפש בהמתו, אפילו כשהוא כועס, אין מדותיו של הקב"ה כמדת בשר ודם, מדת בשר ודם כשהמדינ מורדת עליו הוא משלח לגיונותיו ומחריבן, ומשוה טובים ורעים כאחת, ואין שם לומר איש פלוני כשר הוא, הניחו לו, אלא הכל הורגין, אבל הקב"ה אינו כן, אלא כל הדור מכעיסו, והוא כועס עליהן, ואין שם אלא צדיק אחד ומצילו, הוי אור יודע צדיק נפש בהמתו, וכן הוא אומר טוב ה' למעוז ביום צרה ויודע חוסי בו (נחום א ז). ורחמי רשעים אכזרי (משלי שם), אלו דור המבול שהיו אכזרים. אמרו רבותינו בשעה שהעלה הקב"ה את התהום, והיו רואים את המעינות עולות עליהם, מה היו עושין, היה להם בנים הרבה, והיה כל אחד ואחד נוטל את בנו, ונותנו על התהום, והיו המים מתגברים, הוי אומר ורחמי רשעים אכזרי, [ומנין שהיו עושין כן] שכן איוב אמר עליהם ישכחהו רחם מתקו רימה עוד (בל) [לא] יזכר (איוב כד כ), הרחם שלו שהיו בניו, ומה עשה להן הקב"ה, הוריד עליהן מבול של מעלה ושברן, שנאמר ותשבר כעץ עולה (שם שם). אמר ר' ברכיה קשים היו יתר מדאי, ובעלי קומה היו, ואילולי שפרע מהן מלמעלה, לא היו יכולין להם המים, שכן איוב אמר אם לא נכחד קימנו ויתרם אכלה אש (שם כב כ). מהו כך, כיון שראה הקב"ה שלא מתו בתהומות שלמטן, הוריד עליהן אש שלמעלה ושרפתן, שנאמר אם לא נכחד קימנו וגו', ולא עוד אלא שהפך עליהם העוף והבהמה והחיה, והן גועו אותן, שנאמר ויגוע כל בשר [וגו'] (בראשית ז כא), כיון שראו עצמן שהן אבודין, היו מבקשין להפוך את התבה, מה עשה הקב"ה, הקיף את התבה אריות, והיו אוכלין אותן, שנאמר ויסגור ה' בעדו (שם שם טז), מהו ויסגור, כענין שנאמר אלהא שלח מלאכא וסגר פום אריותא (דניאל ו כג).