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.
Ayman, > Many thanks. Since MODIS and ASTER data are hdf4 based, the ncdump > can be used to convert part of the file to ASCII. Does the following > seems okay to get the lai_1km from the input file MOD.hdf for the > specified region and save it in th MOD.asc output file? If not > please send me a complete command line that will do just that. > > ncdump -v lai_1km MOD.hdf {lat,33.5,33.6;long -114.5,-114.6} > MOD.asc No, ncdump is a low-level utility that doesn't understand coordinate systems, only whole variables and index space. To do what you want, I think you need an HDF-EOS tool that can interpret the georeferencing data stored in HDF-EOS. For example, here is a site that documents HDF-EOS tools: http://hdfeos.org/software.php and here are some tools specific to MODIS data: http://www-modis.bu.edu/landcover/userguidelc/tools.html Also, the C-based ncdump cannot be used to read HDF4 files, only netCDF-3 and netCDF-4 files (which are HDF5 files, not HDF4 or HDF-EOS files). If the MODIS data is available from a THREDDS Data Server (TDS) that supports the NetCDF Subset Service, that would offer another possible way to request the data within a specified bounding box: http://www.unidata.ucar.edu/projects/THREDDS/tech/interfaceSpec/NetcdfSubsetService.html but I don't know if a TDS serving MODIS data is available. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: MBZ-895191 Department: Support netCDF Priority: Normal Status: Closed