This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi Benno, Sorry to have taken so long to respond to your question about netCDF-4 reading HDF4 MODIS files. (I assume they're HDF-EOS?) The developer who added the HDF4 support to the netCDF C library, got lured away to another position, and took all our HDF4 expertise with him. I tried to build the latest netCDF-4 snapshot release with HDF4 support, and hit an obstacle that I didn't immediately know how to get over, so I've been unable to reproduce the problem you reported. But it sounds like a problem with the original data rather than netCDF-4. One other thing you could try is the netCDF-Java library. It has an independent implementation of access to HDF-EOS data. If you can find access to the data through a TDS (THREDDS) server, it will be using the netCDF-Java implementation. --Russ > I find that I also get errors with the following files using an old copy of > hdp, an HDF utility. > > ftp://e4ftl01.cr.usgs.gov/MOLT/MOD13Q1.005/2003.06.26/ > > MOD13Q1.A2003177.h03v07.005.2007337230353.hdf > MOD13Q1.A2003177.h12v08.005.2007339004035.hdf > MOD13Q1.A2003177.h16v09.005.2007338155926.hdf > MOD13Q1.A2003177.h23v01.005.2007339013733.hdf > MOD13Q1.A2003177.h25v04.005.2007338010642.hdf > > > hdp list displays a bunch of zeros before its usual Linked Blocks Indicator > for most of this files > netcdf4 cannot read at least one of the channels in such a file > > except h23v01 cannot be read at all by hdp, gives an > > HDF error: (59) <HDF Internal error> > Detected in HMCPendaccess() [hchunks.c line 3633] > HDF error: (58) <Invalid arguments to routine> > Detected in HMCPcloseAID() [hchunks.c line 3516] > > > Since even a pure HDF program gives errors, perhaps there is something that > USGS can do to repair/replace the files? Or is there a problem with older > versions of the HDF library? > > Benno > > > address@hidden> wrote: > > > > > Benno Blumenthal, > > > > Your Ticket has been received, and a Unidata staff member will review it > > and reply accordingly. Listed below are details of this new Ticket. Please > > make sure the Ticket ID remains in the Subject: line on all correspondence > > related to this Ticket. > > > > Ticket ID: XKH-644219 > > Subject: Problem reading an HDF file with netcdf4. > > Department: Support netCDF > > Priority: Normal > > Status: Open > > > > > > > > The NetCDF libraries are developed at the Unidata Program Center/UCAR, > > in Boulder, Colorado; we are funded primarily by the U.S. National > > Science Foundation. > > > > All support requests are handled by the development team; no > > dedicated support staff are funded at this time. For this reason > > we cannot guarantee response times, nor can we resolve every support > > issue, although we do our best to respond within 72 hours. > > > > It is in the nature of support requests that the same question is > > asked many times. We urge you to search the support archives for > > material relating to your support inquiry: > > > > http://www.unidata.ucar.edu/search.jsp?support&netcdf > > > > If you are having trouble building netCDF, please take a look at the > > "Build Troubleshooter" section of the netCDF home page: > > > > http://www.unidata.ucar.edu/software/netcdf/ > > > > Windows users should see the FAQ list: > > > > http://www.unidata.ucar.edu/software/netcdf/docs/faq.html#windows_netcdf4 > > > > Complete documentation (including a tutorial, and sample programs in > > C, Fortran, Java, and other programming languages) can be found on the > > netCDF Documentation page: > > > > http://www.unidata.ucar.edu/software/netcdf/docs/ > > > > If you resolve your issue through one of these methods, please send a > > reply to this email letting us know that you no longer require > > assistance. This will help us spend more time on netCDF development. > > > > Best regards, > > > > Unidata User Support > > > > > > > -- > Dr. M. Benno Blumenthal address@hidden > International Research Institute for climate and society > The Earth Institute at Columbia University > Lamont Campus, Palisades NY 10964-8000 (845) 680-4450 > > Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: XKH-644219 Department: Support netCDF Priority: High Status: Closed