This might seem like a strange reference source, but the strategic-level game War in the Pacific has a rather extensive naval database and has been pretty throughly modded and vetted by Pacific War enthusiasts since it came out 4 years ago. According to it the Gato Class is eligible for upgrade to a 40mm gun starting in June of 1943 assuming it's at a major port.