Using an autonomous underwater vehicle to track the thermocline based on peak-gradient detection