Scan all possible vertical levels

For variables with one single level, handles the exception that level index is set to 0, as in SMG-THREDDS