Skip to content

Instantly share code, notes, and snippets.

@338rajesh
Created July 4, 2022 12:07
Show Gist options
  • Save 338rajesh/f756fa4a3a003574a3bc6ae28772ca4a to your computer and use it in GitHub Desktop.
Save 338rajesh/f756fa4a3a003574a3bc6ae28772ca4a to your computer and use it in GitHub Desktop.
Snippet for adding attributes on the root of h5 file in Julia
h5open(data_set_path, "w") do h5file_id
attributes(h5file_id)["eqrad"] = 1.0
attributes(h5file_id)["inclusion_volume_fraction"] = 32.0
attributes(h5file_id)["rve_xlb"] = bbox[1]
attributes(h5file_id)["rve_ylb"] = bbox[2]
attributes(h5file_id)["rve_xub"] = bbox[3]
attributes(h5file_id)["rve_yub"] = bbox[4]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment