Reading an attribute (or an object) from MODIS hdf4 in fortran


#1

Hello,
I posted this question before in “Uncategorized” forum but it gains little traction
under a different header so trying my luck here.
I cannot easily find an answer to the problem below in the manual.
MODIS (hdf4) files contain objects that look like e.g.

“\n”,

" OBJECT = LONGNAME\n",

" NUM_VAL = 1\n",

" VALUE = “MODIS/Terra Aerosol 5-Min L2 Swath 10km”\n",

" END_OBJECT = LONGNAME\n",

“\n”,

“END_GROUP = ARCHIVEDMETADATA\n”,

“\n”,

“END\n”,

How to obtain the value of object “LONGNAME” in fortran ie.
(VALUE = “MODIS/Terra Aerosol 5-Min L2 Swath 10km”\n") ?

Thanks,

Mark


#2

Hello!

That content is part of the HDF-EOS metadata. Are you using the HDF-EOS2 library to read such files? Loook under HDF-EOS at https://wiki.earthdata.nasa.gov/display/DAS/Toolkit+Downloads for an applicable API.

A great place to ask your question is the HDF-EOS Info Center at https://hdfeos.org/.

-Aleksandar