Port admiral
Port admiral is an honorary rank in the United States Navy, and a former appointment in the British Royal Navy.
Royal Navy
In British naval usage, the term 'port admiral' had two distinct (and somewhat contradictory) meanings, one generic, one specific.
Generic use
Historically, 'port admiral' was used as a generic term for the senior naval officer having authority over all commissioned ships and naval personnel stationed at a particular home base or anchorage. (Those appointed as Flag Officers Commanding or Commanding-in-Chief of a particular area or Fleet often functioned as the local port admiral in this sense.)
By this definition, the port admiral did not have oversight of the local Royal Navy Dockyard (if any); Dockyards (including ships laid up 'in ordinary') were overseen by an independent official: usually a resident Commissioner appointed by the Navy Board (prior to 1832) or a Admiral-superintendent appointed by the Admiralty (1832-1971). The distinction is seen in informal correspondence such as the following, dated 1837: "The Devonport regatta ... was attended by the Port-Admiral, the Admiral-Superintendent of the Dockyard ... and other persons of consideration."