I think it's having its magnetic signature wiped clean?
If I remember right, all subs have to be put in a 'cage' of live electric cables like that every once in a while to get rid of any magnetic charge that may have built up in the hull when at sea.
De-magnetizing makes it harder for enemy sensors to detect them when they're submerged.