This is just one of the times that God was personally involved in controlling the weather (I am assuming there was no rain during the famine) to produce His desired outcome. God told Pharaoh what He was about to do.
Gen 41:15 Pharaoh said to Joseph, “I had a dream, and no one can interpret it. But I have heard it said of you that when you hear a dream you can interpret it.” 16 “I cannot do it,” Joseph replied to Pharaoh, “but God will give Pharaoh the answer he desires.” 25 Then Joseph said to Pharaoh, "The dreams of Pharaoh are one and the same. God has revealed to Pharaoh what he is about to do . 26 The seven good cows are seven years, and the seven good heads of grain are seven years; it is one and the same dream. 27 The seven lean, ugly cows that came up afterward are seven years, and so are the seven worthless heads of grain scorched by the east wind: They are seven years of famine. 28 "It is just as I said to Pharaoh: God has shown Pharaoh what he is about to do . 29 Seven years of great abundance are coming throughout the land of Egypt, 30 but seven years of famine will follow them. Then all the abundance in Egypt will be forgotten, and the famine will ravage the land. 31 The abundance in the land will not be remembered, because the famine that follows it will be so severe. 32 The reason the dream was given to Pharaoh in two forms is that the matter has been firmly decided by God, and God will do it soon.
This is a predetermined and God acting event. He is personally in control of it. Not arbitrary weather patterns. It brought Israel to Egypt and later God raised up Pharaoh for the purpose of showing His great power in delivering Israel from bondage. It was God’s plan and His personal, hands on involvement that produced the good years and the bad. God is telling Pharaoh “He will do it soon”. Blunt, to the point, no other option. God will do it.
Without this knowledge from God, people would say, “Well it looks like the weather patterns are going to bring us good weather and we should have a good growing season this year.” Then the next year they say, “Well, it looks like the weather patterns are looking like last year so we should have another good growing season.” And ect. Then on the eighth year they say, “Well, this year looks like the weather isn’t going to give us a good growing season.” The next year, the same weather happens and a famine is created.
Now man in all his knowledge could see the weather patterns but his willful ignorance of God, blinds him to what God is doing. It’s no different today, man’s blindness and willful ignorance of the Sovereign ruler of all creation, allows him to see the near potential effects of the weather and therefore they say, “God is not involved, it’s all just natural processes ”. Man in his ignorance does not glorify the creator of heaven and earth. They declare themselves to have knowledge and wisdom and that they don’t need God. They have made themselves to be gods and whether they say it or not, they want to shake off the chains of submission to God, but God will say, Ps 2:1 Why do the nations conspire and the peoples plot in vain? 2 The kings of the earth take their stand and the rulers gather together against the Lord and against his Anointed One. 3 “Let us break their chains,” they say, “and throw off their fetters.” 4 The One enthroned in heaven laughs; the Lord scoffs at them. 5 Then he rebukes them in his anger and terrifies them in his wrath, saying, 6 "I have installed my King on Zion, my holy hill."