Does the なんだ at the end of
ここはどこなんだ
mean "what"?
Reason I'm asking for help on such a obvious question is my brain thinks なんだ is the explanatory んだ; which I know is wrong, but its the only answer my brain is supplying at the moment. And I doubt "なんだ" is "what", as that would make the full sentence translate as "What where is this place/here?" which does not sound correct in the least bit of sense.