I could not figure out how to read the metadata contained in the following HDF file. I could successfully read the datasets and attributes as follows:
infile ='MOD07_L2.A2014126.0640.006.2014126214544.hdf'
indata = SD(infile, SDC.READ)
datasets = indata.datasets()
print datasets
reqdata = indata.select('Processing_Flag')
attributes = reqdata.attributes()
print datasets
I hope someone can help me.
You can access the metadata, AKA file attributes, in a similar manner to the way you are accessing the data attributes.