Index of /training/hdf4_chunking/Chunkit

      Name                    Last modified       Size  Description

[DIR] Parent Directory 15-Aug-2007 18:17 - [DIR] Makefiles/ 15-Aug-2007 18:17 - [TXT] README 15-Aug-2007 18:17 3k [DIR] bin/ 15-Aug-2007 18:17 - [DIR] src/ 15-Aug-2007 18:17 -


Chunkbinary
-----------

Files in this distribution:

 Chunkit/
   Makefiles/
     Makefile_generic    - Generic Makefile
     Makefile_solaris    - Makefile for Solaris platforms
     Makefile_irix       - Makefile for Irix platforms
   src/
     chunkit.c       - Source code for the "chunkit" executable
   bin/
     chunkit         - executable
     input54kmdata.hdf - test input file
     out.hdf           - test output file (created from input54kmdata.hdf)

Requirements
------------

  1. You must have the HDF4.1r2 libraries installed on your system.
  2. Make sure that your LD_LIBRARY_PATH (or LD_LIBRARYN32_PATH on Irix)
     environment variable points to the directory containing the HDF
     Libraries

Installation
------------
  1. Copy one of the example Makefiles to the src/ directory and make 
     the appropriate modifications - instructions will be found in the 
     example Makefiles
  2. Type the command `make` - to compile and install the executable
                      `make clean` - removes all objects/executables
  3. `make` will install the chunkit executable into the bin/ 
     directory.

Usage
-----

  chunkit <filename> <chunk_dim x> X <chunk_dim y> <compression> <outfile>

  Examples:
    1. chunkit input54kmdata.hdf 256 X 512 gzip out.hdf 
       This will convert the input hdf file input54kmdata.hdf using
       a chunksize of 256 X 512 bytes, and using gzip compression
       to the corresponding hdf file with chunked HDF SDSes (out.hdf). 
       Supported compression types are gzip, rle, and none.
    

How the Program Works
----------

Chunkit - converts PATHFINDER Sea Surface Temperature (SST) data
in HDF format into chunked HDF files.

Chunkit reads from one PATHFINDER SST input file and writes
to a new file containing the new chunked datasets.

Chunkit will only work for PATHFINDER SST data files.  It is not a
general purpose program. It assumes the input file contains
2 raster images, some global attributes, and 2 Scientific Datasets (SDS)
with attributes.

The PATHFINDER SST HDF files have a somewhat unusual "storage profile"
( list of HDF objects in the file).  The SDS do not contain any data.
They only exist so attributes ( metadata ) can be attached to them.
This metadata describes the data contained in the raster images.
The real data SST data is in the raster images.

You can view these list of objects by looking at the Pathfinder input file,
input54kmdata.hdf with the JHV, Scientific Data Browser ( SDB ).

Step 1: Chunkit will read in the global attributes from the Pathfinder and
write them out to the new file.

Step 2: It will create a new chunked SDS in the output file.
It will open one of the input SDS's, read it's attributes,
and write the attributes out to as attributes of the new chunked SDS.
It will read the DATA from the input raster image and then chunk it
and write it out to the new chunked SDS.

Step 3: Chunkit then repeats Step 2 using the second SDS and second raster image
in the PATHFINDER input file and writes out the new chunked SDS
(with attributes) to the output file.