Section 251(2) in The Naval Ceremonial, Conditions Of Service And Miscellaneous Regulations, 1964
(2)Joint Service with Land or Air Forces. - When officers of the Navy are employed on shore, on joint service with the land or air forces, their relative rank shall carry with it all the precedence and advantages, except command, attaching to the rank with which it corresponds, and shall regulate the choice of quarters.