[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #MBZ-895191]: ncdump



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