[gradsusr] HDF5 control file help

Jennifer M Adams jadams21 at gmu.edu
Thu Dec 10 07:59:48 EST 2015


Hi, Joyce —
The first thing to try is set up aliases for those variable names, which are not GrADS-compliant. Something like this:
   Grid/precipitation=>p 0 y,x precipitation
   Grid/probabilityLiquidPrecipitation=>lp     0 y,x   liquid precip
—Jennifer


On Dec 9, 2015, at 7:06 PM, Meyerson, Joyce <hobo at atmos.ucla.edu<mailto:hobo at atmos.ucla.edu>> wrote:

Hi Users,

I have a hdf5 data file from NASA's Global Precipitation Measurement project and I'm having trouble writing the control file. I don't know what I'm doing wrong. Any help would be greatly appreciated. The error I'm getting is

open test.ctl
Open Error:  Invalid variable record
--> The invalid description file record is:
--> Grid/precipitation                0 y,x   precipitation


DSET ^3B-MO-CA-180W50N180E20N.MS.MRG.3IMERG.20150101-S000000-E235959.000001.V03D.HDF5
OPTIONS template
DTYPE hdf5_grid
TITLE GPM precip
UNDEF -999.0 _FillValue
XDEF 3600 linear -180 0.1
YDEF 300 linear -20 0.1
ZDEF 1 levels 1000
TDEF 1 linear 01dec2015 1dy
VARS 2
Grid/precipitation              0 y,x   precipitation
Grid/probabilityLiquidPrecipitation     0 y,x   liquid precip
ENDVARS

Here's the file contents of
h5dump -n 3B-MO-CA-180W50N180E20N.MS.MRG.3IMERG.20150101-S000000-E235959.000001.V03D.HDF5

HDF5 "3B-MO-CA-180W50N180E20N.MS.MRG.3IMERG.20150101-S000000-E235959.000001.V03D.HDF5" {
FILE_CONTENTS {
group      /
group      /Grid
dataset    /Grid/gaugeRelativeWeighting
dataset    /Grid/lat
dataset    /Grid/lon
dataset    /Grid/precipitation
dataset    /Grid/probabilityLiquidPrecipitation
dataset    /Grid/randomError
}
}

and the dataset
h5dump -H -d/Grid/precipitation 3B-MO-CA-180W50N180E20N.MS.MRG.3IMERG.20150101-S000000-E235959.000001.V03D.HDF5

HDF5 "3B-MO-CA-180W50N180E20N.MS.MRG.3IMERG.20150101-S000000-E235959.000001.V03D.HDF5" {
DATASET "/Grid/precipitation" {
 DATATYPE  H5T_IEEE_F32LE
 DATASPACE  SIMPLE { ( 3600, 300 ) / ( 3600, 300 ) }
 ATTRIBUTE "CodeMissingValue" {
    DATATYPE  H5T_STRING {
          STRSIZE 8;
          STRPAD H5T_STR_NULLTERM;
          CSET H5T_CSET_ASCII;
          CTYPE H5T_C_S1;
       }
    DATASPACE  SCALAR
 }
 ATTRIBUTE "DIMENSION_LIST" {
    DATATYPE  H5T_VLEN { H5T_REFERENCE}
    DATASPACE  SIMPLE { ( 2 ) / ( 2 ) }
 }
 ATTRIBUTE "DimensionNames" {
    DATATYPE  H5T_STRING {
          STRSIZE 8;
          STRPAD H5T_STR_NULLTERM;
          CSET H5T_CSET_ASCII;
          CTYPE H5T_C_S1;
       }
    DATASPACE  SCALAR
 }
 ATTRIBUTE "Units" {
    DATATYPE  H5T_STRING {
          STRSIZE 6;
          STRPAD H5T_STR_NULLTERM;
          CSET H5T_CSET_ASCII;
          CTYPE H5T_C_S1;
       }
    DATASPACE  SCALAR
 }
 ATTRIBUTE "_FillValue" {
    DATATYPE  H5T_IEEE_F32LE
    DATASPACE  SCALAR
 }
 ATTRIBUTE "coordinates" {
    DATATYPE  H5T_STRING {
          STRSIZE 8;
          STRPAD H5T_STR_NULLTERM;
          CSET H5T_CSET_ASCII;
          CTYPE H5T_C_S1;
       }
    DATASPACE  SCALAR
 }
 ATTRIBUTE "units" {
    DATATYPE  H5T_STRING {
          STRSIZE 6;
          STRPAD H5T_STR_NULLTERM;
          CSET H5T_CSET_ASCII;
          CTYPE H5T_C_S1;
       }
    DATASPACE  SCALAR
 }
}
}


_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20151210/26cb4790/attachment.html 


More information about the gradsusr mailing list