A submarine pen (U-Boot-Bunker in German) is a type of submarine base that acts as a bunker to protect submarines from air attack. The term is generally applied to submarine bases constructed during World War II. Note the open sides.
The Nazis built submarine pens with thick concrete roofs in France (photo above), Germany and Norway. These proved almost impervious to common, garden, Allied bombs. Explosions were fine but penetrating thick concrete was the difficult part.
This is where deep penetrating 12,000 lb "Tallboy" bombs dropped by the "Dambusters" of No. 617 Squadron came in (in 1944 - 45). They penetrated the thick roofs of the pens - destroying the subs and all inside. Near misses resulted in mini-earthquakes - also sub-wrecking.
Hence the youtube below features not just a sturdy roof but a whole town/base complex under the ground, behind heavy doors.
Youtube uploaded by Seth Miller Sep 6, 2012. In the 1950s the Soviets built the Balaklava (in Crimea) submarine pen and nuclear weapon bunker complex (above). The complex was surrounded by base worker accommodation in what was yet another Soviet "secret city" (only authorised entry and not marked on map). The base was decommissioned in the 90s for various reasons including Russia terminating almost all SSN and SSBN patrols.
Balaklava complex become a nuclear museum with a small surrounding community. But I don't know whether the museum is still open to the public after Russia's takeover of Crimea in 2014?