Reading netCDF, HDF, and GRIB Files
More information on the netCDF format and tools is available from UCAR at their netCDF site.
The metadata can be listed using the ncdump -h command of the HDF v3.3r3 release. Readers for HDF files are available in several commercial packages, including IDL (see also Liam Gumley's HDF IDL routines) and NOeSYS (which includes a free downloadable HDF browser). The free NCSA software is linked to above.
Reading GOES data in ERDAS
Ideally, one would simply want to fill in the length of the header in bytes in the ERDAS import window. Then ERDAS would skip those bytes and start plotting at the beginning of the image. Unfortunately, the length isn't mentioned anywhere in the header. So, the other option is to extract each channel from the HDF file and feed them to ERDAS.
Once these utilities are downloaded and installed, you can use the following command to pull out each channel from the HDF file. This example is for channel 1: hdp dumpsds -n gvar_ch1 -d -o ch1.bin -b goes.hdf Execute this command for each channel and then import the 5 channels (ch1.bin .. ch5.bin) into ERDAS. When filling in the ERDAS import window select BSQ (band sequential), unsigned-32 bit, and fill in the correct lines (rows) and samples (columns) for your image.
Also remember to change the default 1 channel to 5 channels (unless you want to import only one) and click on the multiple channels on the right side of the screen. Another window will come up expecting the pathname for each channel.
Available utilities for reading and converting grib files include:
- GRADS—The Center for Ocean-Land-Atmosphere Studies (COLA) developed a Grid Analysis Display System (GrADS) that reads and displays ECMWF GRIB data. The XDC is using GrADS to convert ECMWF GRIB to netCDF.
- NCL (NCAR Command Language)—software including NCAR Graphics for scientific data processing and visualization. NCL supports NetCDF, GRIB1, GRIB2, and HDF formats. Included are the ncl_filedump command to view contents of files and the ncl_convert2nc command which converts grib files to netCDF.
- wgrib2—For extracting data from grib2 files and for simple conversions to netCDF.
- wgrib—Extracts data from grib1 files.
- cnvgrib—Code for converting between grib1 and grib2.