Surface wavepackets subject to an abrupt depth change. Part 1. Second-order theory. (19th March 2021)