حَدَّثَنَا إِسْحَاقُ بْنُ إِبْرَاهِيمَ بْنِ حَبِيبِ بْنِ الشَّهِيدِ الْبَصْرِيُّ، حَدَّثَنَا مُحَمَّدُ بْنُ فُضَيْلٍ، حَدَّثَنَا الأَعْمَشُ، عَنْ حَبِيبِ بْنِ أَبِي ثَابِتٍ، عَنْ ذَرٍّ، عَنْ سَعِيدِ بْنِ عَبْدِ الرَّحْمَنِ بْنِ أَبْزَى، عَنْ أَبِيهِ، عَنْ أُبَىِّ بْنِ كَعْبٍ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ لاَ تَسُبُّوا الرِّيحَ فَإِذَا رَأَيْتُمْ مَا تَكْرَهُونَ فَقُولُوا اللَّهُمَّ إِنَّا نَسْأَلُكَ مِنْ خَيْرِ هَذِهِ الرِّيحِ وَخَيْرِ مَا فِيهَا وَخَيْرِ مَا أُمِرَتْ بِهِ وَنَعُوذُ بِكَ مِنْ شَرِّ هَذِهِ الرِّيحِ وَشَرِّ مَا فِيهَا وَشَرِّ مَا أُمِرَتْ بِهِ ‏"‏ ‏.‏ قَالَ وَفِي الْبَابِ عَنْ عَائِشَةَ وَأَبِي هُرَيْرَةَ وَعُثْمَانَ بْنِ أَبِي الْعَاصِي وَأَنَسٍ وَابْنِ عَبَّاسٍ وَجَابِرٍ ‏.‏ قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ صَحِيحٌ ‏.‏

It was narrated from Ubayy bin Ka'b that the Messenger of Allah(s.a.w) said: "Do not curse the wind. When you see what you dislike, then say: 'Allahumma inna nas-aluka min khairi hadhihir-rih, wa khairi ma fiha wa khairi ma umirat bihi wa na'udhu bika min sharri hadhihir-rih wa sharri ma fiha wa sharri ma umirat bihi' ('O Allah! Indeed we ask you of the good of this wind, and the good of what is in it, and the good of what it has been commanded. And we seek refuge in You from the evil of this wind, and the evil of what is in it, and the evil of what it has been commanded.)" Translation Not Available

Book Ref: Jamiya Tirmidhi Book 33 Hadith 2252
Web Ref:  Jamiya Tirmidhi Vol 4 Book 7 Hadith 2252