Hadithcore
Al-Adab Al-Mufrad, 719

Ubayy bin Kab (ra) said," Do not denounce wind. When you behold in it something that you dislike make this supplication:

(O Allah! We ask you the good of this wind and the good of what is therein and the good with which it is sent.)

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

References2 variants
In-Book Reference
Book 31, Hadith 116
English Reference
Book 31, Hadith 719