Hi,
As I understand, there could be two possible options.
Option 1. You can always do a ncdump -h output_ray.hdf5 or output_aux.hdf5 in the terminal, i.e. in your output directory and it will list the groups, attributes, and variables for each of the HDF5 files that you provide as inputs.
But I understand that you would want to have a pythonic way of doing the same. The thing is rh15dout is written as a class that has several instances and attributes so if you simply do a print(data.files) it outputs whatever it has written from the beginning. So I am not 100% sure if that is what you want, but you can always print that to find the list of all variables present in data.files using the way Elena mentioned. But if you want to achieve the "labels" as you describe, I use the following:
Option 2: Using h5py
In your output directory simply load individual files using h5py.
import h5py
data = h5py.File('output_aux.hdf5','r')
for group in data.keys():
print(group)
This will print out all the groups you have, something like atom_MG or atom_XX or molecule_XX.
The same is possible with output_indata.hdf5.
Remember, that output_ax.hdf5 and output_indata.hdf5 do not directly provide you access to variables present inside them. You first have to access the groups such as atom_XX in output_aux or atmos, height, mpi, and input in output_indata.hdf5. The output_ray.hdf5 file, for example, has no groups (but one root group itself) so doing a data_ray.keys(), will list all possible variables right away that you have in there. This is the way the outputs are written using RH1.5D.
And finally when you want to access the variables inside a group as in atom_XX or atmos from either output_aux.hdf5 or output_indata.hdf5, you can do something like a "nested keys()" (this is NOT the right terminology but I like to use it

) like this:
say you read aux file in data:
data = h5py.File('output_aux.hdf5','r')
for group in data.keys():
print('This is a group named', group, 'and it contains the following variables/datasets:')
for dset in data[group].keys():
print(dset)
________________________________________________________________________
This will print:
This is a group named atom_MG and it contains the following variables/datasets:
continuum
height
level
line
x
y
I hope it helps you a bit? Maybe there could be a better way that someone else might propose?
Cheers,
PS- Sorry I still do not know how add code blocks or highlight in this portal. So I simply wrote it as it is, unlike the way shown by Elena
