Move a comment to a more sensible place
Add checks that the returned data arrays are the same shape as the position arrays. It turns out this is always the case, but no harm in checking (and warning if they are not)
Fix airly significant bug in which the position arrays were transposed relative to the data arrays.

The code now checks for the dimensions and warns if they have been flipped to match. There is no checking that the flip has worked because the xalt and yalt arrays complicate things too much for me to figure out today. If you want to implement that functionality, please do so!

I also added commented-out figure at the end to check the interpolation has worked properly, should you wish to check manually