I'm creating an hdf5 file for output in my python script, for example:
file = HDF5File(mesh.mpi_comm(), out_dir + 'example.h5', 'w')
file.write(mesh, 'mesh')
file.write(att1, 'att1')
file.write(att2, 'att2')
file.write(att3, 'att3')
When I open the hdf5 file each attribute I'm writing (mesh, att1, etc) is saved as a separate group within the file with the relevant datasets. Is it possible to add an additional attribute to these groups? I'd like to add a separate 'citation' attribute where I can insert a citation for the source of the dataset used to create the output. Thanks for the help!
Update:
I should have been more specific, the way it writes each group (att1, etc) is operating the way I desire. Each attribute is derived from a different dataset so I need to add an attribute to the group of the citation source which I currently have as a string in my source code.
i.e. if we take the first group 'att1' I need to assign it an additional attribute 'Citation' that is created as a string earlier in my script named 'cite_att1'