Adjust the distance threshold. This is a bit of a clunky approach but it seems to work OK for the majority of points along the boundary. There is probably a more robust way to do this which involves checking the maximum depth on the boundary node and comparing that with the last valid HYCOM value and reacting accordinly, but it's late and I'm happy with this compromise.