Created
June 24, 2015 21:11
-
-
Save adamabernathy/a5b088392104bbb7c5e8 to your computer and use it in GitHub Desktop.
Read a variable from a HDF5 file in IDL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_hdf5,f,branch,var_name | |
fid = h5f_open(f) ; open file | |
gid = h5g_open(fid,branch) ; access the branch | |
did = h5d_open(gid,var_name) ; access the variable | |
var = h5d_read(did) ; read the variable | |
h5d_close,did ; close the variable | |
h5f_close,fid ; close file | |
return,var ; send back the data | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment