The character of Tyler (Matther McConnaughey) is given the rank of Lieutenant in the film, which is completely unrealistic/wrong. An Executive Officer would be a Commander. Further, towards the beginning of the film, Tyler is mad that he didn't get assigned his own boat. If he were a Lieutenant, this would require a leap of 2 ranks (skipping Lt. Commander and Commander).
My only explanation for this is that whoever was in charge of this information knew absolutely nothing about military ranks and used an Army/Marine Corps rank listing when picking out the ranks of the characters (where Lieutenant is just below Captain). However, in the Navy, a Captain is more the equivalent of an Army Colonel.