I've been researching the British Navy for a Napolenonic War-era novel and I've found a lot of resources for the various details I'll need to know, but there's one thing I've had trouble finding. Is there a legitimate reason for the officers of a ship to be ashore for any significant length of time? "Shore leave" apparently wasn't a thing during this era because of the fear of desertion. The only sources I've been able to find about the crew of a ship being ashore during are for very temporary liberty when in a port to resupply or if one of the officers is injured and he has to recuperate. Would a crew be ashore for a time if their ship was damaged enough in a battle to need extensive repairs or would they just be reassigned?
Basically, what I need to know is how likely it is that during wartime an officer aboard a British ship would be at home long enough to fall in love and get married? Or do I need to injure him in some way or maybe even date it later so it's after the war?