The Messenger of Allah ﷺ said, "Do not curse the wind. When you see something in it that you dislike, say, 'O Allah, we ask You for the good of this wind, the good within it, and the good of what it has been commanded to do, and we seek refuge in You from the evil of this wind, the evil within it, and the evil of what it has been commanded to do.'"
قال رسول الله ﷺ: لا تسبوا الريح فإذا رأيتم ما تكرهون فقولوا: اللهم إنا نسألك من خير هذه الريح، وخير ما فيها، وخير ما أمرت به، ونعوذ بك من شر هذه الريح، وشر ما فيها، وشر ما أمرت به.
Tirmidhi (2252), Nasai in Amal al-Yawm wal-Layla (934), Abdullah bin Ahmad in Zawaid al-Musnad (21139), and Tahawi in Sharh Mushkil (918) all narrated it through the route of Muhammad bin Fudayl, who said, Amash narrated to us, from Habib bin Abu Thabit, from Dhar bin Abdullah, from Saeed bin Abdul-Rahman bin Abza, from his father, from Ubayy bin Kaab, and he mentioned it.Tirmidhi said, "This is a hasan sahih hadith." I say, rather it is only hasan, for Muhammad bin Fudayl, who is the son of Ghazwan, is hasan al-hadith.There has been disagreement over the isnad of this hadith. Some dropped Dhar bin Abdullah from it, while others retained him, and the correct view is that he should be retained. Some transmitted it as raised (to the Prophet), while others transmitted it as stopped (at the companion), and the raising is an accepted addition, especially since a number of narrators raised it.Nasai, in Amal al-Yawm wal-Layla (933-939), set out a lengthy discussion of the disagreement without explicitly stating a preference, but Tahawi, in Sharh Mushkil (918), reported from Nasai that he deemed the stopped version correct.And Allah knows best.