An analytical study of the frictional response of coastal currents and upwelling to wind stress