Another interpretation of "Go forth from the ark" (Genesis 8:16): David said before the Holy One, blessed be He: Master of the World, "Bring my soul out of prison" (Psalms 142:8). When Noah was inside the ark, he prayed continually, as it is said, "Therefore let every pious one pray to You at a time of finding; surely when the great waters overflow, they shall not reach him" (Psalms 32:6). And what did he pray? "Bring my soul out of prison." The Holy One, blessed be He, said to him: It is a decree from before Me that twelve months be completed; if they are not completed, you do not go forth. And likewise Isaiah said, "In a time of favor I have answered you [and in a day of salvation I have helped you]… saying to the prisoners, Go forth" (Isaiah 49:8-9). This refers to Noah and his sons, who were bound from sexual relations. And so Joseph did: when he saw that two years of famine were destined to come, he attended to being fruitful and multiplying before they came, as it is said, "And to Joseph were born two sons [before the year of famine came]" (Genesis 41:50). And so did Noah and his sons; and the cattle, the beasts, and the birds did not attend to being fruitful and multiplying when they entered the ark, for thus the Holy One, blessed be He, commanded them when they entered the ark. From where? "And Noah went in, and his sons" (Genesis 7:7) — the males by themselves; "and his wife and his sons' wives" (ibid.) — the females by themselves. Thus all the days that Noah was in the ark, Noah and his sons and all who were with him were bound from sexual relations. The Holy One, blessed be He, said to them: Is it possible that I should be angry and destroying the world while you are building it up? Rather, when the flood passes, you shall attend to being fruitful and multiplying, as it is said, "saying to the prisoners, Go forth" (Isaiah 49:9). And when the earth had dried, the Holy One, blessed be He, said to him, "Go forth from the ark, [you and your wife]" (Genesis 8:16), and He permitted them to be fruitful and multiply; and He also permitted the cattle, the beasts, and the birds, as it is said, "and let them swarm in the earth and be fruitful and multiply" (Genesis 8:17). Noah said to Him: Master of the World, perhaps You will bring a flood upon the world. He said to him: Thus I have sworn, that I will not again bring a flood, as it is said, "And the Lord smelled the pleasing aroma, [and the Lord said in His heart: I will not again curse the ground any more…]" (Genesis 8:21). How did He swear to him? Our Rabbis say: He swore to him by the covenant of Abraham, as it is said, "And You made with him the covenant" (Nehemiah 9:8). And so Isaiah said, "For this is to Me as the waters of Noah, [concerning which I swore that the waters of Noah would no more pass over the earth]" (Isaiah 54:9). You find that nevertheless, forty days in every year those waters used to make a mark upon the world, until Solomon arose and built the Temple, and those forty days ceased, as it is said, "And in the eleventh year, in the month of Bul, [was the house finished]" (I Kings 6:38). What is "in the month of Bul"? In the month of ears of grain (shibbolim) for the cattle from the house. Another interpretation: "in the month of Bul" — at the time when the earth makes clods upon clods (bulim bulim). Another interpretation: "in the month of Bul" — lacking [the letter] mem, corresponding to the forty days that were cut off from the world. And if to Noah the Holy One, blessed be He, swore by the covenant of our father Abraham and fulfilled it, then to Zion, to whom He swore three oaths, how much more so will He fulfill them. And these are the three oaths: [He swore by the covenant of our father Abraham, as it is said, "For this is to Me as the waters of Noah."] He swore by His own soul, as it were, as it is said, "The Lord God has sworn by His soul" (Amos 6:8); and He swore by the Sabbath, as it is said, "and on the seventh day He ceased and was refreshed" (Exodus 31:17); [and He swore by the Torah, as it is said,] "The Lord has sworn by His right hand" (Isaiah 62:8) — this is the Torah, as it is said, "from His right hand a fiery law for them" (Deuteronomy 33:2). And what did He swear to Jerusalem? That He would build it, as it is said, "The Lord builds Jerusalem" (Psalms 147:2). Rabbi Samuel bar Nahmani said: It is a tradition of aggadah that Jerusalem will not be built until all the exiles are gathered in. If a person says to you that all the exiles have been gathered in but Jerusalem is not built, do not believe him, as it is said, "The Lord builds Jerusalem," and afterward, "He gathers in the dispersed of Israel" (ibid.). Israel said before the Holy One, blessed be He: Master of the World, was not Jerusalem already built and destroyed? He said to them: Because of iniquities it was destroyed, and you were exiled from within it; but now I am building it, and I will not destroy it forever, as it is said, "For the Lord has built Zion; He has appeared in His glory" (Psalms 102:17).
Why Noah and the Animals Were Forbidden to Mate in the Ark
Midrash Tanchuma Buber, Noach 17:1
ד"א [צא מן התבה]. אמר דוד לפני הקב"ה רבונו של עולם הוציאה ממסגר נפשי (תהלים קמב ח), כשהיה נח בתוך התבה היה תדיר מתפלל, שנאמר על זאת יתפלל כל חסיד אליך לעת מצוא רק לשטף מים רבים אליו לא יגיעו (שם לב ו), ומה היה מתפלל, הוציאה ממסגר נפשי, א"ל הקב"ה גזירה היא מלפני שישתלמו שנים עשר חודש, אם אינן משתלמין אין אתה יוצא, וכן אמר ישעיה בעת רצון עניתיך [וגו'] לאמר לאסורים צאו (ישעיה מט ח ט), זה נח ובניו שהיו אסורים בתשמיש המטה, וכן עשה יוסף כשראה שני רעבון עתידות לבוא, נזקק לפריה ורביה עד שלא באו, שנא' וליוסף ילד שני בנים [בטרם תבא שנת הרעב] (בראשית מא נ) וכן עשו נח ובניו והבהמה והחיה והעוף לא נזקקו לפריה ורביה כשנכנסו לתבה, שכן צוה להם הקב"ה כשנכנסו לתבה, מנין ויבא נח ובניו (בראשית ז ז), הזכרים לעצמן, ואשתו ונשי בניו (שם) הנקבות לעצמן, כך כל הימים שהיה נח בתבה, היו נח ובניו וכל אשר אתו אסורים בתשמיש המטה, אמר להם הקב"ה אפשר שאהא כועס ומחריב את העולם ואתה בונה, אלא כשיעבור המבול אתם נזקקים לפריה ורביה, שנא' לאמר לאסורים צאו (ישעיה מט ט) וכיון שיבשה הארץ אמר לו הקב"ה צא מן התבה [אתה ואשתך] (בראשית ח טז), והתיר להם פריה ורביה, ואף לבהמה ולחיה ולעוף התיר, שנאמר ושרצו בארץ ופרו ורבו (שם שם יז), א"ל נח רבונו של עולם שמא אתה מביא מבול לעולם, א"ל כך נשבעתי שאיני מביא עוד מבול, שנאמר וירח ה' את ריח הניחח [ויאמר ה' אל לבו לא אוסיף לקלל עוד את האדמה וגו' (שם שם כא) ] היאך נשבע לו, רבותינו אומרים בברית אברהם נשבע לו, שנאמר וכרות עמו הברית (נחמיה ט ח), וכן ישעיה אמר כי מי נח זאת לי [אשר נשבעתי מעבור מי נח עוד על הארץ] (ישעיה נד ט), אתה מוצא אע"פ כן ארבעים יום בכל שנה היו עושין אותן המים רושם בעולם, עד שעמד שלמה, ובנה את בית המקדש, ופסקו אותן מ' יום, שנא' (ובשנת אחת) [ובשנה האחת] עשרה בירח בול (מ"א ו לח), מהו בירח בול, בירח שבלים לבהמה מן הבית. ד"א בירח בול, בזמן שהארץ עושה בולים בולים. ד"א בירח בול, חסר מ', כנגד ארבעים יום שנפסקו מן העולם, ומה אם לנח נשבע הקב"ה בבריתו של אברהם אבינו וקיים, ולציון נשבע שלש שבועות, על אחת כמה וכמה שיקיים, ואלו הן שלש שבועות (נשבע בבריתו של אברהם אבינו שנאמר כי מי נח זאת לי). בנפשו נשבע כביכול, שנאמר נשבע ה' אלהים בנפשו (עמוס ו ח), ובשבת נשבע, שנאמר וביום השביעי שבת וינפש (שמות לא יז), (וכתיב) [ובתורה נשבע, שנאמר] נשבע ה' בימינו (ישעיה סב ח), זה תורה, שנאמר מימינו אש דת למו (דברים לג ב), ומה נשבע לירושלים שיבנה אותה, שנאמר בונה ירושלים ה' (תהלים קמז ב). אמר ר' שמואל בר נחמני מסורת אגדה היא שאין ירושלים נבנית עד שיתכנסו כל הגליות, אם יאמר לך אדם שנתכנסו כל הגליות ואין ירושלים נבנית, אל תאמן, שנאמר בונה ירושלים ה', ואחר כך נדחי ישראל יכנס (שם), אמרו ישראל לפני הקב"ה רבונו של עולם לא כבר נבנית ירושלים וחרבה, אמר להם על ידי עונות חרבה וגליתם מתוכה, אבל עתה אני בונה אותה, ואיני מחריבה לעולם, שנאמר כי בנה ה' ציון נראה בכבודו (שם קב יז).