Photo credit: National Trust for Scotland, Culzean Castle, Garden & Country Park
This is possibly by Charles Brooking, perhaps overpainted in the sky or otherwise not at his best, but it looks a bit above Francis Swaine as the other obvious alternative.
As the painting is on loan from the Kennedy family, I wondered whether this work could have been commissioined by Captain Archibald Kennedy RN (1736-1794). He had an eventful career in the Navy, but his appointments appear restricted to 32-gun, 5th rate frigates. Whereas the ship in the painting is a 50-gun vessel. Whoever the artist is, I suggest that the work is retitled as this is a typical ship's portrait, showing the same vessel as she appears from different aspects.
Presumably, Pieter, this painting is not to be confused with either of the two listed in David Joel's book as at Culzean Castle. It definitely isn't his '26B' and the measurements do not correspond with his undescribed '234E'. To me it does look like Brooking, with some unhelpful, later re-working of the sky, as you suggest; he can be a bit weaker sometimes.
Archibald Kennedy's d.o.b (in New York) does not appear to be known but must predate 1736 given he was commissioned in 1744. Even allowing that he could by date have bought this from Brooking (d, 1759) it is perhaps unlikely given his known movements and that the ship shown is clearly not of a size on which he served. Odd too, if by Brooking, that there is no apparent mention by David Joel -though I can't think of another likely candidate.
My tuppence worth Pieter - from the image it doesn't quite look good enough to be by Brooking. Sea is stilted and sky is naive. As you and James say could be over restored, be interesting to see under UV. The set-up of ships is of course spot on for Brooking - perhaps someone following in his style ? Auction houses would catalogue as Circle/Follower of Brooking to be safe.
I agree: one can't go further than 'manner of' at present, and certainly mid-century rather than late, but that's at least an advance on 'British school'.
Several sources put Archibald Kennedy's birth as being in 1718.
It show a plate of a portrait of Captain Archibald Kennedy (1718-1794), by John Wollaston, as painted about 1752, and which is held in the Pennsylvania Museum
Another image of Archibald Kennedy (1718 - 1794) can be seen here: