Initialise the level index with an empty value since it is tested later (alternative is to check it exists before checking if it is empty). This approach seemed neater. This is only relevant in cases where we aren't extracting a 4D variable (e.g. temp_2).