My how things have changed, I really must be getting old, in my day D stood for Devonport, P for Portsmouth, C for Chatham and indicated the home port of the individual rating.
Incidentally my was D081 etc
I joined in 1952. My number was prefixed by D/JX.
D was for Devonport which later changed to P when I transfered to Portsmouth.
J was for continuous service. ie. staight 12 as opposed to SS wich was for 7 and 5.
X was be cause we joined after the Invergordon mutiny which was about pay cuts to the Navy. Anyone who joined after the mutiny was on a different pay scheme. Some time in the late 50s or early 60s the X was dropped because there was nobody left who was in before the mutiny.