; Get the Scientific Data information from an HDF file Function get_sd, filename, name ;Attempt to catch some errors CATCH, Error_status If Error_status NE 0 then begin Print, 'Error index: ', Error_status Print, 'Error message: ', !ERR_STRING var = -99999. return, var endif sd_id = hdf_sd_start(filename,/read) index = hdf_sd_nametoindex(sd_id, name) sds_id = hdf_sd_select(sd_id,index) hdf_sd_getdata, sds_id, var hdf_sd_endaccess, sds_id hdf_sd_end, sd_id return, var end