Skip to content
Prev 12796 / 29559 Next

Read HDF files

Hi Arnaud,

I've been using a great java script written by David Stube that
converts HDF4 formats to netCDF which can then be easily read by
the standard R packages.

He recently made this software (modis_hdf2nc.jar) available for download at:

http://asascience.com/software/downloads/

Though the file name suggests it's for MODIS data, it has worked
seamlessly for me with a variety of file sources.

Easiest way to batch process files with this is to put a copy of the
file in the working directory and call the it from R like:

system(paste("java -jar hdf2nc.jar ", FILENAME, sep=""))

Hope this helps.

Burton Shank