I wonder if Patrick O'Brian read through this book. (I know he read many naval dispatches in the course of his research.) It never ceases to amaze me how completely he managed to inhabit this world in his fiction. His prose is indistinguishable from every piece of primary source material I have ever read regarding the British navy during the Napoleanic wars.
Although perhaps lacking in realistic portions of "rum, sodomy and the lash" (do I misremember an odd keelhauling in all the twenty plus books?), as expectable from a polite gentleman.
From my recollections (I read through the whole series about a year ago), there was plenty of rum involved... If the amounts of alcohol that nearly everyone was drinking at all times is accurate, they would be considered complete, irredeemable alcoholics today.
Of course, Maturin is up there with Sherlock in the list of high-functioning literary drug addicts.
I should assume keel hauling would have to be a false memory. It was never very common in the British Navy and abolished far before then. However, I believe it's referenced to as a comparison to the brutality of flogging around the fleet as a punishment in one book.
Not only that, his numerous scenes where Jack is writing dispatches, the pains he takes, and the politics of those dispatches made many of these seem almost absurdly familiar in tone having read the series.
My favorite, FWIW, is the 18th-century battle tweet:
'“I shall renew the action and try to distroy the rest if possible”.... Not only does it say, “Look at what I have done” but also, “Look at what I am doing”. This is not a proper battle report as much as an 18th-century battle tweet.'