The influence of water depth on the heaving and pitching motions of a ship moving in longitudinal regular head waves