Wofano Wotanto
Hero
Really depends on how much BS-tech is in use, but yeah, no real spaceship obeying the laws of physics would make a good sub. Once you throw in nonsense like gravity control, high-output drives that don't consume realistic amounts of reaction mass, and force fields to handle pressure variation you can handwave away almost anything, though.It would probably be more relevant to ask if a space ship can function as a submarine, since the trope seems to crop up more often (especially if JJ Abram’s is involved).
Answer is still “no”.
OTOH, if you built the fool thing in orbit so you didn't have to worry about lifting off from a planetary surface, you could probably engineer a one-way drop sub sort of thing that (for ex) could be towed from (say) a colonized Mars to Earth by a dedicated interplanetary spacecraft, detach and make an ocean landing (not a re-entry technically, since it never left Earth), and then use specialized submarine systems to tool around under the sea to its heart's content. It couldn't return to orbit, but you might be able to get the crew and some payload back the orbiting ship that brought it here with a much smaller one-use "takeoff module" akin to the way the Apollos recovered their crew. You'd need orders of magnitude more lift capacity to take off from Earth so the engineering gets much more difficult. If you could use (say) a mix of drop tanks for initial launch, air-breathing ramjets to get as much altitude as possible, and a final booster stage to reach an orbital altitude where the mothership can pick you up it might work, but it's a real stretch even with tech that's somehow managed to colonize Mars.
Why you'd want to go explore Earth's oceans from Mars could be an interesting story, I'm just thinking about the tech end here. Maybe the surface is uninhabitable for some reason and the Mars colony is transporting some vital but low-mass cargo (a vaccine? self-replicating nanotech?) to whatever Earthling population is holding out in undersea settlements?
It would probably be simpler to engineer a "drop-sub" for exploring under the ice of Europa, assuming the much longer interplanetary trip was practical in the first place. Breaching the ice cover would be an issue, but the far smaller gravity well makes eventual crew recovery easier - we already know how to do that sort of thing from Apollo, and that ages ago with far cruder tech. You'd need modified aquatic propulsion systems too - much less water pressure and lower gravity than Earthly seas, after all.
This is the kind of moderately hard scifi story I wish we'd see more of, if it wasn't obvious. The ubiquitous far-out magic-tech stuff is comfort food, but getting something crunchy in the mix now and then adds to the meal.
No, that's not the one I'm thinking of, but it certainly is a good example of the trope.A quick search seems to point at the "Looking Glass" series by John Ringo. In the second book of the series, entitled "Vorpal Blade", they convert the USS Nebraska into a spaceship.
Ah, ding, you jarred my brain into activity again. The one I was thinking of was the Jao Empire trilogy by Eric Flint - Course of Empire, Crucible of Empire, and Span of Empire (the last of which I don't think I read). First book came out five years before Vorpal Sword, and really flips off the "subs would overheat" video hard - the climactic battle sees the thing dipping into the photosphere of the sun, because magic space-BS tech, that's why.