Language/Format: Numpy, Python
Application type(s): Analysis
Related project(s):


This pure python script computes and displays the differences between two HDF4 files (and netcdf3 if the HDF4 library is compiled with the netcdf support enabled). Its supports :

  • global and SDS metatada
  • SDS data

For SDS, it does not show which pixels are different but computes statistics on the whole data values : mean, standard deviation and min/max of the difference.


Only differences of metadata and SDS are supported. No support for VDATA, VGROUPS… is currently provided


 Usage :
   python' <file1> <file2> [<enable_data_compare>]
 With :
   <file1> a HDF4 or netcdf file [REQUIRED]
   <file2> a HDF4 or netcdf file [REQUIRED]
   <enable_data_compare> either 0 or 1&nbsp;: activate or not data comparison. Enabled by default [OPTIONAL]


Sources can be downloaded here :


Package can be browsed here :



  • python >= 2.5
  • HDF4 >= 4.2.r1
  • numpy >= 1.2.1
  • pyhdf >= 0.8.3

Earlier versions probably works but does not have been tested


Copyright (C) 2011 Icare – ICARE web site


This program is a free software; you can redistribute it and/or modify it under the terms of the CeCILL Public License as published by (License version 2 or later).

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the CeCILL Public License for more details.

You should have received a copy of the CeCILL Public License along with this program; if not, please contact

For any questions or concerns regarding this program, or general information about the ICARE Project, please email to


Author(s): Nicolas Pascal (HYGEOS/ICARE)