[gradsusr] Creating Data Descriptor File For HDF5 Formatted Data

Huddleston,John John.Huddleston at colostate.edu
Thu Feb 2 10:01:39 EST 2012


Jimbo



You need to do the 'h5ls -r' command on one file to get the HDFEOS descriptors correctly.



Here is a control set for level 3 of the ozone Aura instruments



dset OMI-Aura_L3-OMTO3e_2009m0806_v003-2009m0808t024231.he5
dtype hdf5_grid
title ColumnAmountAerosol 0.25x0.25 deg
unpack ScaleFactor Offset
undef -1.26765e+30 MissingValue
undef -1.26765e+30 _FillValue
xdef 1440 linear -179.875 0.25
ydef 720 linear -89.875 0.25
zdef 1 linear 1 1
tdef 1  linear 00:00Z06aug2009 1dy
vars 4
/HDFEOS/GRIDS/OMI~Column~Amount~O3/Data~Fields/ColumnAmountO3=>cao3 0 y,x cao3
/HDFEOS/GRIDS/OMI~Column~Amount~O3/Data~Fields/SolarZenithAngle=>sza 0 y,x sza
/HDFEOS/GRIDS/OMI~Column~Amount~O3/Data~Fields/ViewingZenithAngle=>vza 0 y,x vza
/HDFEOS/GRIDS/OMI~Column~Amount~O3/Data~Fields/RadiativeCloudFraction=>rcf 0 y,x rcf
endvars



Your h5ls will show spaces in the dataset name as '\ ' and you replace them with the tilde.



John Huddleston, PhD

________________________________
From: gradsusr-bounces at gradsusr.org [gradsusr-bounces at gradsusr.org] on behalf of jimbo32886 at gmail.com [jimbo32886 at gmail.com]
Sent: Thursday, February 02, 2012 7:28 AM
To: GrADS Users Forum
Subject: [gradsusr] Creating Data Descriptor File For HDF5 Formatted Data

Hello,

    I had a question for anyone who has had experience taking the header output from an HDF5 data file and then constructing a control file based off of that information.  I am very new to the HDF5 file construct and could certainly use some help.  I am working with the Level 3 mapped Sea Surface Salinity data from the Aquarius mission.  I am using GrADS version 2.0.a9.oga.1.  The "h5dump" for the data file is as follows:

HDF5 "Q20112132011243.L3m_MO_EVSCI_V1.2_SSS_1deg" {
GROUP "/" {
   ATTRIBUTE "Data Bins" {
      DATATYPE  H5T_STD_I32LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Data Center" {
      DATATYPE  H5T_STD_I8LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Data Maximum" {
      DATATYPE  H5T_IEEE_F32LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Data Minimum" {
      DATATYPE  H5T_IEEE_F32LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Easternmost Longitude" {
      DATATYPE  H5T_IEEE_F32LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "End Day" {
      DATATYPE  H5T_STD_I16LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "End Millisec" {
      DATATYPE  H5T_STD_I32LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "End Orbit" {
      DATATYPE  H5T_STD_I32LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "End Time" {
      DATATYPE  H5T_STRING {
            STRSIZE 17;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
      DATASPACE  SCALAR
   }
   ATTRIBUTE "End Year" {
      DATATYPE  H5T_STD_I16LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Input Files" {
      DATATYPE  H5T_STRING {
            STRSIZE 39;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Input Parameters" {
      DATATYPE  H5T_STRING {
            STRSIZE 422;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Intercept" {
      DATATYPE  H5T_IEEE_F32LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "L2 Flag Names" {
      DATATYPE  H5T_STD_I8LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Latitude Step" {
      DATATYPE  H5T_IEEE_F32LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Latitude Units" {
      DATATYPE  H5T_STRING {
            STRSIZE 14;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Longitude Step" {
      DATATYPE  H5T_IEEE_F32LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Longitude Units" {
      DATATYPE  H5T_STRING {
            STRSIZE 13;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Map Projection" {
      DATATYPE  H5T_STRING {
            STRSIZE 24;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Measure" {
      DATATYPE  H5T_STRING {
            STRSIZE 5;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Mission" {
      DATATYPE  H5T_STRING {
            STRSIZE 15;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Mission Characteristics" {
      DATATYPE  H5T_STRING {
            STRSIZE 137;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Northernmost Latitude" {
      DATATYPE  H5T_IEEE_F32LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Number of Columns" {
      DATATYPE  H5T_STD_I32LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Number of Lines" {
      DATATYPE  H5T_STD_I32LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Orbit" {
      DATATYPE  H5T_STD_I32LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Parameter" {
      DATATYPE  H5T_STRING {
            STRSIZE 21;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Period End Day" {
      DATATYPE  H5T_STD_I16LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Period End Year" {
      DATATYPE  H5T_STD_I16LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Period Start Day" {
      DATATYPE  H5T_STD_I16LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Period Start Year" {
      DATATYPE  H5T_STD_I16LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Processing Control" {
      DATATYPE  H5T_STRING {
            STRSIZE 60;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Processing Time" {
      DATATYPE  H5T_STRING {
            STRSIZE 17;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Processing Version" {
      DATATYPE  H5T_STRING {
            STRSIZE 5;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Product Name" {
      DATATYPE  H5T_STRING {
            STRSIZE 43;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Product Type" {
      DATATYPE  H5T_STD_I8LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "SW Point Latitude" {
      DATATYPE  H5T_IEEE_F32LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "SW Point Longitude" {
      DATATYPE  H5T_IEEE_F32LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Scaling" {
      DATATYPE  H5T_STRING {
            STRSIZE 7;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Scaling Equation" {
      DATATYPE  H5T_STRING {
            STRSIZE 47;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Sensor" {
      DATATYPE  H5T_STRING {
            STRSIZE 9;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Sensor Characteristics" {
      DATATYPE  H5T_STD_I8LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Sensor Name" {
      DATATYPE  H5T_STD_I8LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Slope" {
      DATATYPE  H5T_IEEE_F32LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Software Name" {
      DATATYPE  H5T_STRING {
            STRSIZE 7;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Software Version" {
      DATATYPE  H5T_STRING {
            STRSIZE 5;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Southernmost Latitude" {
      DATATYPE  H5T_IEEE_F32LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Start Day" {
      DATATYPE  H5T_STD_I16LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Start Millisec" {
      DATATYPE  H5T_STD_I32LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Start Orbit" {
      DATATYPE  H5T_STD_I32LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Start Time" {
      DATATYPE  H5T_STRING {
            STRSIZE 17;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Start Year" {
      DATATYPE  H5T_STD_I16LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Station Latitude" {
      DATATYPE  H5T_IEEE_F32LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Station Longitude" {
      DATATYPE  H5T_IEEE_F32LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Station Name" {
      DATATYPE  H5T_STD_I8LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Suggested Image Scaling Applied" {
      DATATYPE  H5T_STRING {
            STRSIZE 3;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Suggested Image Scaling Maximum" {
      DATATYPE  H5T_IEEE_F32LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Suggested Image Scaling Minimum" {
      DATATYPE  H5T_IEEE_F32LE
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Suggested Image Scaling Type" {
      DATATYPE  H5T_STRING {
            STRSIZE 5;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Title" {
      DATATYPE  H5T_STRING {
            STRSIZE 31;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Units" {
      DATATYPE  H5T_STRING {
            STRSIZE 4;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
      DATASPACE  SCALAR
   }
   ATTRIBUTE "Westernmost Longitude" {
      DATATYPE  H5T_IEEE_F32LE
      DATASPACE  SCALAR
   }
   DATASET "l3m_data" {
      DATATYPE  H5T_IEEE_F32LE
      DATASPACE  SIMPLE { ( 180, 360 ) / ( 180, 360 ) }
      ATTRIBUTE "Intercept" {
         DATATYPE  H5T_IEEE_F32LE
         DATASPACE  SCALAR
      }
      ATTRIBUTE "Scaling" {
         DATATYPE  H5T_STRING {
               STRSIZE 7;
               STRPAD H5T_STR_NULLTERM;
               CSET H5T_CSET_ASCII;
               CTYPE H5T_C_S1;
            }
         DATASPACE  SCALAR
      }
      ATTRIBUTE "Scaling Equation" {
         DATATYPE  H5T_STRING {
               STRSIZE 47;
               STRPAD H5T_STR_NULLTERM;
               CSET H5T_CSET_ASCII;
               CTYPE H5T_C_S1;
            }
         DATASPACE  SCALAR
      }
      ATTRIBUTE "Slope" {
         DATATYPE  H5T_IEEE_F32LE
         DATASPACE  SCALAR
      }
   }
   DATASET "palette" {
      DATATYPE  H5T_STD_U8LE
      DATASPACE  SIMPLE { ( 3, 256 ) / ( 3, 256 ) }
   }
}
}



  Any input would be greatly appreciated!

Thanks,
Jim





More information about the gradsusr mailing list