I used to be on Submarines.Not in usual situations, no. The only times shouting is appropriate in my experience is trying to be heard in a noisy environment / far away, when you really need someone's attention urgently or to indicate that you are not happy with their behaviour.
None of which are really appropriate if you can address someone at normal conversation volume and they aren't an immediate threat to themselves or others. All shouting does in that situation is ramp up the adrenaline and escalate confrontation. Either you have the authority to do something more than shouting, in which case do that, or you don't and shouting is just a way of showing that you've lost control of your emotions and the situation.
When I was a young sailor trying hard not to panic in one of my first real emergencies (flood alarm in the engine room), I was apparently getting rather loud when the officer of the watch leaned over to me and said tersely but in a very measured way, 'don't shout, it only tells me you're not in control'.
One of the best pieces of advice I've ever had.