In Bereshis 7:11-12 it says:
וַאֲרֻבֹּ֥ת הַשָּׁמַ֖יִם נִפְתָּֽחוּ וַֽיְהִ֥י הַגֶּ֖שֶׁם עַל־הָאָ֑רֶץ אַרְבָּעִ֣ים י֔וֹם וְאַרְבָּעִ֖ים לָֽיְלָה
And the floodgates of the sky broke open. The rain fell on the earth forty days and forty nights.
And Malachi 3:10:
אִם־לֹ֧א אֶפְתַּ֣ח לָכֶ֗ם אֵ֚ת אֲרֻבּ֣וֹת הַשָּׁמַ֔יִם וַהֲרִיקֹתִ֥י לָכֶ֛ם בְּרָכָ֖ה עַד־בְּלִי־דָֽי׃
I will surely open the floodgates of the sky for you and pour down blessings on you;
It sounds from the above verses that rain comes from the waters above the firmament. Other places in Tanakh seem to associate clouds with rain (somewhere in Yirmiyahu).
Does rain come from the "upper waters" above the firmament or from clouds?