The get_frame code always assumed a dataset rank of three, so this doesn't actually change much, but its one less dynamically allocated buffer to keep track of.
Little to no error reporting, still fairly brittle and not very well tested.