Jami` at-Tirmidhi #1978
Chapters on Righteousness And Maintaining Good Relations With Relatives 27:84
'Ibn 'Abbas narrated that a man cursed the wind in the presence of the Prophet, so he said:
"Do not curse the wind, for it is merely doing as ordered , and whoever curses something undeservingly, then the curse returns upon him."