I am confining my answer to your question regarding the storm in Chapter 39, since eNotes has a policy against answering more than one question per posting. However, you can ask your question about Chapter 51 in a separate posting as early as tomorrow.
Chapter 39 is probably the most important chapter in Great Expectations because it chronicles the return of the fearsome convict Pip met on the marshes early in the story and his horrified realization that he was completely deluded about the source of his income. Dickens opens the chapter with a description (as perhaps only Dickens could write) of a terrible storm. Some of the most stirring visual and auditory details in his description are as follows:
Day after day, a vast heavy veil had been driving over London from the East, and it drove still, as if in the East there were an Eternity of cloud and wind.
A storm coming from the East would be coming from such cold regions as Norway, Sweden and Finland.
. . . the wind rushing up the river shook the house that night, like discharges of cannon, or breakings of a sea.
Occasionally, the smoke came rolling down the chimney as though it could not bear to go out into such a night . . .
. . . I saw that the lamps in the court were blown out, and that the lamps on the bridges and the shore were shuddering, and that the coal fires in barges on the river were being carried away before the wind like red-hot splashes in the rain.
A storm like this can have a powerful effect on the nerves. It seems appropriate that Abel Magwitch should arrive on such a night, as if he has been carried by the wind and is bringing a storm into Pip's life--although Magwitch has been through so many hardships during his troubled life that he seems relatively indifferent to the cold wind and heavy rain. Pip is keeping himself as safe and comfortable as possible, sitting in front of a fire in a comfortable chair and reading a book. He presents the picture of an English gentleman which Magwitch had imagined in far-off Australia.
The most striking passage in the book occurs in Chapter 39 when Magwitch not only reveals himself as Pip's benefactor but explains why and how he did what he did. It practically encapsulates the whole story of Great Expectations in one paragraph of colorful dialogue.
"Yes, Pip, dear boy, I've made a gentleman on you! It's me wot has done it! I swore that time, sure as ever I earned a guinea, that guinea should go to you. I swore afterwards, such as ever I spec'lated and got rich, you should get rich. I lived rough, that you should live smooth. I worked hard that you should be above work. What odds, dear boy? Do I tell it fur you to feel a obligation? Not a bit. I tell it, fur you to know as that there hunted dunghill dog wot you kep life in, got his head so high that he could make a gentleman--and, Pip, you're him!"