SH4 has the actual torpedo problems built in. Yes, magnetic exploders had problems in heavy weather, and they had problems in northern climates, closer to the magnetic north pole.
Here's the bad news: Captains reported premature detonations, and were advised to adjust the settings on the exploders. It didn't help. And, unlike the game, there was no switch that could be turned on and off. The magnetic exploders had to be removed manually, which took at least an hour to accomplish. The problems began to mount until mid-1940, when all torpedoes had the magnetic exploders removed at the depots.
Want to play realistically? In 1939 the magnetic exploders are there to stay. In 1940 it's a toss-up whether you use them or not. In 1941 and most of 1942 they don't exist. Toward the end of 1942 they should be back, and they should work properly.
Life is not fun for a u-boat kaleun.