Mister Roberts

In the waning days of World War II, the United States Navy cargo ship Reluctant and her crew are stationed in the "backwater" areas of the Pacific Ocean. The executive officer/cargo chief, Lieutenant Junior Grade Douglas A. "Doug" Roberts (Henry Fonda), tries to shield the dispirited crew from the harsh and unpopular captain, Lieutenant Commander Morton (James Cagney). Eager to join the fighting, Roberts repeatedly requests a transfer. Morton is forced by regulation to forward his requests, but refuses to endorse them, which means they are always rejected. Roberts shares quarters with Ensign Frank Thurlowe Pulver (Jack Lemmon). Pulver spends most of his time idling in his bunk and avoids the captain at all costs, so much so, that Morton is actually unaware Pulver is part of the crew.
Roberts surreptitiously requests, and is granted crew liberty from one of Mortonâs superiors; a port captain who wishes to reward the Reluctant's crew for meeting a difficult resupply schedule. The liberty is supposed to be at their next resupply stop, but when the ship reaches an idyllic South Pacific island, Morton denies the crew their much-needed shore leave. In private, Morton tells Roberts that the crew will not get liberty as long as he continues to request a transfer and writes letters regarding disharmony aboard the ship, which endanger Morton's chances of promotion. Morton strikes a bargain with Roberts: In exchange for never requesting another transfer, never bending Morton's rules, and never revealing what has made him change his attitude, Morton will grant the crew liberty.
Ashore, the crew lets loose after months of pent-up frustration. Many crewmen are arrested and hauled back to the ship by the military police and the shore patrol. The next morning, Morton is reprimanded by the port captain and ordered to leave port immediately. Morton is almost speechless with rage at the black mark on his sterling record.
Meanwhile, the crewmen are mystified by Roberts's new strictness. Morton deceives them into thinking that Roberts is trying to get a promotion. When a crew member informs Roberts of a new Navy policy which might assist him in getting a transfer despite the captain's opposition, Roberts refuses to take advantage of it.
News of the Allied victory in Europe depresses Roberts further, knowing the war may end soon without his ever seeing combat. Inspired by a patriotic radio speech celebrating VE Day, Roberts throws Morton's prized palm tree overboard. The captain demands the identity of the culprit, but no one steps forward. He eventually realizes that Roberts is the only person aboard with the nerve to do it. Morton summons him to his quarters and accuses him of the deed. An open microphone reveals to the crew what changed Roberts.
Weeks later, Roberts receives an unexpected transfer. "Doc" (William Powell), the ship's doctor and Roberts' friend, confides to him that the crew risked court-martial by submitting a transfer request with Morton's forged imprimatur. Before he leaves, the crew presents Roberts with a handmade medal, the Order of the Palm, for "action against the enemy".
Several weeks later, Pulver, who has been appointed cargo officer, receives a couple of letters. The first is from Roberts, who speaks enthusiastically about his new assignment aboard the destroyer USS Livingston during the Battle of Okinawa. He goes on to say that he would rather have the Order of the Palm than the Congressional Medal of Honor. The second letter is from a college classmate of Pulver's who is also assigned to the Livingston, which reveals that Roberts was killed in a kamikaze attack shortly after the first letter had been posted.
Incensed, Pulver throws the captainâs replacement palm tree overboard. He then marches into Morton's cabin, openly bragging about it and brazenly demanding to know why Morton has cancelled the showing of a film that night. Morton slowly shakes his head, realizing that his problems have not gone away.

Question: Who is reprimanded by the port captain and told to leave port?
Answer: Morton