Comprehensive Examples

This page provides comprehensive examples on how to access and visualize various NASA HDF/HDF-EOS files using IDL ®, MATLAB® and NCL. Other tools and programming languages examples can be found here.

Please read this special note first before you proceed further.

For a list of examples for the different data centers, click on the examples in the table below.

NASA Data Centers Product Examples using different tools
GESDISC [Examples]
LAADS
LAADS Product Type File Codes Plots Note
MOD
more examples
Swath MOD07_L2.A2010001.0000.005.2010004001518.hdf NCL MATLAB IDL
IDL(p)
NCL MATLAB(p) IDL
IDL(p)
NCL plots include both global and polar views.
MOD021KM.A2000055.0000.005.2010041143816.hdf
MOD03.A2000055.0000.005.2010029175839.hdf (m)
NCL MATLAB IDL NCL(p) MATLAB(p) IDL(p)
MOD05_L2.A2010001.0000.005.2010005211557.hdf
MOD03.A2010001.0000.005.2010003235220.hdf (m)
NCL MATLAB IDL
IDL(p)
NCL MATLAB(p) IDL
IDL(p)
MOD06_L2.A2010001.0000.005.2010005213214.hdf
MOD03.A2010001.0000.005.2010003235220.hdf (m)
NCL MATLAB IDL
IDL(p)
NCL MATLAB(p) IDL
IDL(p)
MODARNSS.Abracos_Hill.A2000080.1515.005.2007164153544.hdf NCL MATLAB(z) IDL
IDL(z)
NCL MATLAB(z)
IDL
IDL(z)
IDL plot has a regional view, not a global view.
MODATML2.A2000055.0000.005.2006253045900.hdf NCL MATLAB(z) IDL
IDL(z)
NCL MATLAB IDL
IDL(z)
Multiply scale factor and add offset on lat/lon.
IDL plot has a regional view, not a global view.
IDL(z) avoids region with fill value.
Grid MOD08_D3.A2010001.005.2010006233008.hdf NCL MATLAB IDL NCL MATLAB IDL
MYD
more examples
Swath MYD07_L2.A2002184.2200.005.2006133121629.hdf NCL MATLAB
MATLAB(z)
IDL
IDL(z)
NCL MATLAB
MATLAB(z)
IDL
IDL(z)
MYD021KM.A2002226.0000.005.2009193222735.hdf
MYD03.A2002226.0000.005.2009193071127.hdf (m)
NCL MATLAB
MATLAB(z)
IDL
IDL(z)
NCL MATLAB
MATLAB(z)
IDL
IDL(z)
Field: EV_1KM_Emissive
NCL(z) MATLAB
MATLAB(z)
IDL
IDL(z)
NCL(z) MATLAB
MATLAB(z)
IDL
IDL(z)
Field: EV_Band26
MYD02HKM.A2010031.0035.005.2010031183706.hdf

lat_MYD02HKM.A2010031.0035.005.2010031183706.output

lon_MYD02HKM.A2010031.0035.005.2010031183706.output
NCL(p) MATLAB(p) IDL(p) NCL(p) MATLAB(p) IDL(p)
MYDARNSS.Barrow.A2002184.2200.005.2007051063709.hdf NCL MATLAB IDL
IDL(z)
NCL MATLAB IDL
IDL(z)
IDL plot has a regional view, not a global view.
Grid MYD08_D3.A2009001.005.2009048010832.hdf NCL MATLAB IDL NCL MATLAB IDL
LP DAAC [Examples]
LaRC [Examples]
NSIDC [Examples]
PO.DAAC [Examples]
Ocean Biology Processing Group [Examples]
GHRC [Examples]
ICESat-2 [Examples]
Table 1: Sample Data Files and Code Examples

We also provide examples for other data centers that produce HDF4 files.

Other Data Centers Product Examples using different tools
CloudSAT Data Processing Center [Examples]
Ocean Productivity [Examples]
Table 2: Sample Data Files and Code Examples from Other Data Centers

We also extracted and documented information for sample HDF-EOS2/HDF4 and HDF-EOS5 files that are useful to determine the EOS contents stored in the sample files. Please click here for HDF-EOS2/HDF4 and here for HDF-EOS5 to read comprehensive description and retrieve sample files.


Last modified: 05/14/2012
About Us | Contact Info | Archive Info | Disclaimer
Sponsored by NASA Cooperative Agreement Grant Number NNX08AO77A / Maintained by The HDF Group