A model for the height of the internal boundary layer over an area with an irregular coastline