<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Yes, this is a problem with the HDF5_grid interface in GrADS 2.2.1. Some of the internal variables are handled as ordinary integers but need to be special (longer) data types specific to the HDF5 library. I have fixed this in my dev version except for one lingering
 issue where the library gets very upset if I try to open a file that doesn't exist. Since these IMERG files are distributed by the GES DIS (where I work), it is important that GrADS be able to handle them. I will work on the final fixes and publish the source
 code version 2.2.2 as soon as I can.  --Jennifer<br>
</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> gradsusr <gradsusr-bounces@gradsusr.org> on behalf of $BU*N)CR(B <jianglizhi@mail.iap.ac.cn><br>
<b>Sent:</b> Thursday, June 4, 2020 12:19 AM<br>
<b>To:</b> gradsusr@gradsusr.org <gradsusr@gradsusr.org><br>
<b>Subject:</b> [gradsusr] GPM HDF5 descriptor file</font>
<div> </div>
</div>
<div>
<p style="font-family:SimSun"><span style="font-family:Times New Roman">Hello,</span>
</p>
<p style="font-family:SimSun"><span style="font-family:Times New Roman"><span style="font-family:Times New Roman">I would like to read the GPM IMERG precipitation data (</span><span style="font-family:"Times New Roman"; white-space:normal">HDF5</span><span style="font-family:"Times New Roman"; white-space:normal"> format</span><span style="font-family:Times New Roman">)
 by using GrADS. After read the page(</span><span style="font-family:Times New Roman"><a href="http://cola.gmu.edu/grads/gadoc/SDFdescriptorfile.html" style="margin:0px; padding:0px; color:#3B5999; font-family:verdana,"ms song",$BAWBN(B,Arial,$BHy(B软$B2m|n(B,Helvetica,sans-serif; font-size:12px; white-space:normal; background-color:#FFFFFF">http://cola.gmu.edu/grads/gadoc/SDFdescriptorfile.html</a></span><span style="font-family:Times New Roman">)
 and </span><span style="font-family:Times New Roman">gradsusr mailing list(</span><span style="font-family:Times New Roman"><a href="http://secure-web.cisco.com/1L4INTyKjaI7OuusqLE6gCwJceCXcfOBK-pjU2yl4whiDuZULKQKCbRWiiKA8N2NKI9IkMUskQ_AorJ4c6e1Psh93NkLo0Fy_23kJnx1HbYPh3bILBwuxxlQi84sBVVnNL57DABuuQHPYaEo5s3UFt7iVUhgrwT9Q7fq-LwWtp8TfMdlW7431HuJeDoRh5OZSfZ3WAbN-vQP5BC9e21eGrJR7VBEHsOBn8gxo5nC-VPa8AncIrkkF5MV0v3TEeZ6FTOye7upkvSn7zrewZojyk8C2FAUyaS8peRUA5wEKfAkikEJrKaINtpPI1n9gxMX7tj8ANlMP245zMxg8ROO94EM7fSVUiIDl9EUVRJstg8crAvuUzyYLGnAffqH7L2Pa-3ruwqibjGHzL3s7nB7tohjsQxCBEdUqbNRY0Bwsq6Rz5XX6IAOVXUS9hLBZ9-Bd/http%3A%2F%2Fgradsusr.org%2Fpipermail%2Fgradsusr%2F2016-January%2F039366.html">http://gradsusr.org/pipermail/gradsusr/2016-January/039366.html</a></span><span style="font-family:Times New Roman"></span><span style="font-family:Times New Roman">)</span><span style="font-family:Times New Roman">, </span></span><span style="font-family:"Times New Roman""><span style="font-family:Times New Roman">I
 had created the ctl file</span><span style="font-family:Times New Roman">.</span></span>
</p>
<p><span style="font-family:'Times New Roman'"><span style="font-family:Times New Roman">The ctl file can be</span>
<span style="font-family:Times New Roman">l</span><span style="font-family:Times New Roman">o</span><span style="font-family:Times New Roman">a</span><span style="font-family:Times New Roman">ded</span><span style="font-family:Times New Roman"> normally. However,
 It reports some error while I try to display some variable.</span></span> </p>
<p><span style="font-family:'Times New Roman'"><br>
</span></p>
<p><span style="font-family:'Times New Roman'">Error message:</span> </p>
<p><span style="font-family:'Times New Roman'">ga-> d hqp<br>
HDF5-DIAG: Error detected in HDF5 (1.10.4) thread 23373517074432:<br>
  #000: ../../../src/H5D.c line 282 in H5Dopen2(): not a location<br>
    major: Invalid arguments to routine<br>
    minor: Inappropriate type<br>
  #001: ../../../src/H5Gloc.c line 246 in H5G_loc(): invalid object ID<br>
    major: Invalid arguments to routine<br>
    minor: Bad value<br>
Error: H5Dopen2 failed for variable /Grid/HQprecipitation <br>
Error: Variable /Grid/HQprecipitation not in HDF5 file<br>
Data Request Error:  Error for variable 'hqp'<br>
  Error ocurred at column 1<br>
DISPLAY error:  Invalid expression <br>
  Expression = hqp<br>
</span></p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>Here are the config information: </p>
<p>ga-> q config </p>
<p>Config: v2.2.1 little-endian readline grib2 netcdf hdf4-sds hdf5 opendap-grids,stn geotiff shapefile<br>
Grid Analysis and Display System (GrADS) Version 2.2.1<br>
Copyright (C) 1988-2018 by George Mason University <br>
GrADS comes with ABSOLUTELY NO WARRANTY <br>
See file COPYRIGHT for more information  </p>
<p><br>
This build of GrADS has the following features:<br>
 -+- Byte order is LITTLE ENDIAN <br>
 -+- Athena Widget GUI DISABLED <br>
 -+- Command line editing ENABLED <br>
 -+- GRIB2 interface ENABLED  g2clib-1.6.0 <br>
 -+- NetCDF interface ENABLED  netcdf-4.7.3 <br>
 -+- OPeNDAP gridded data interface ENABLED<br>
 -+- OPeNDAP station data interface ENABLED  libgadap 2.0 <br>
 -+- HDF4 interface ENABLED  hdf-4.2r14 <br>
 -+- HDF5 interface ENABLED  hdf5-1.10.4 <br>
 -+- KML contour output ENABLED<br>
 -+- GeoTIFF and KML/TIFF output ENABLED<br>
 -+- Shapefile interface ENABLED<br>
The 'q gxconfig' command returns Graphics configuration information<br>
</p>
<div style="white-space:nowrap"><br>
</div>
<p style="white-space:nowrap"></p>
<p style="white-space:nowrap"><br>
</p>
<p></p>
Here are the part of  h5dump output (see the attathment h5dump.txt for full information): 
<p></p>
<p><span style="font-family:'Times New Roman'"></span></p>
<p>HDF5 "3B-HHR.MS.MRG.3IMERG.20181113-S000000-E002959.0000.V06B.HDF5" {<br>
GROUP "/Grid/" {<br>
   ATTRIBUTE "GridHeader" {<br>
      DATATYPE  H5T_STRING {<br>
         STRSIZE 230;<br>
         STRPAD H5T_STR_NULLTERM;<br>
         CSET H5T_CSET_ASCII;<br>
         CTYPE H5T_C_S1;<br>
      }<br>
      DATASPACE  SCALAR<br>
   }<br>
   DATASET "HQobservationTime" {<br>
      DATATYPE  H5T_STD_I16LE<br>
      DATASPACE  SIMPLE { ( 1, 3600, 1800 ) / ( H5S_UNLIMITED, 3600, 1800 ) }<br>
      ATTRIBUTE "CodeMissingValue" {<br>
         DATATYPE  H5T_STRING {<br>
            STRSIZE 6;<br>
            STRPAD H5T_STR_NULLTERM;<br>
            CSET H5T_CSET_ASCII;<br>
            CTYPE H5T_C_S1;<br>
         }<br>
         DATASPACE  SCALAR<br>
      }<br>
      ATTRIBUTE "DIMENSION_LIST" {<br>
         DATATYPE  H5T_VLEN { H5T_REFERENCE { H5T_STD_REF_OBJECT }}<br>
         DATASPACE  SIMPLE { ( 3 ) / ( 3 ) }<br>
      }<br>
      ATTRIBUTE "DimensionNames" {<br>
         DATATYPE  H5T_STRING {<br>
            STRSIZE 13;<br>
            STRPAD H5T_STR_NULLTERM;<br>
            CSET H5T_CSET_ASCII;<br>
            CTYPE H5T_C_S1;<br>
         }<br>
         DATASPACE  SCALAR<br>
      }<br>
      ATTRIBUTE "Units" {<br>
         DATATYPE  H5T_STRING {<br>
            STRSIZE 8;<br>
            STRPAD H5T_STR_NULLTERM;<br>
            CSET H5T_CSET_ASCII;<br>
            CTYPE H5T_C_S1;<br>
         }<br>
         DATASPACE  SCALAR<br>
      }<br>
      ATTRIBUTE "_FillValue" {<br>
         DATATYPE  H5T_STD_I16LE<br>
         DATASPACE  SCALAR<br>
      }<br>
      ATTRIBUTE "coordinates" {<br>
         DATATYPE  H5T_STRING {<br>
            STRSIZE 13;<br>
            STRPAD H5T_STR_NULLTERM;<br>
            CSET H5T_CSET_ASCII;<br>
            CTYPE H5T_C_S1;<br>
         }<br>
         DATASPACE  SCALAR<br>
      }<br>
      ATTRIBUTE "units" {<br>
         DATATYPE  H5T_STRING {<br>
            STRSIZE 8;<br>
            STRPAD H5T_STR_NULLTERM;<br>
            CSET H5T_CSET_ASCII;<br>
            CTYPE H5T_C_S1;<br>
         }<br>
         DATASPACE  SCALAR<br>
      }<br>
   }<br>
   DATASET "HQprecipSource" {<br>
      DATATYPE  H5T_STD_I16LE<br>
      DATASPACE  SIMPLE { ( 1, 3600, 1800 ) / ( H5S_UNLIMITED, 3600, 1800 ) }<br>
      ATTRIBUTE "CodeMissingValue" {<br>
         DATATYPE  H5T_STRING {<br>
            STRSIZE 6;<br>
            STRPAD H5T_STR_NULLTERM;<br>
            CSET H5T_CSET_ASCII;<br>
            CTYPE H5T_C_S1;<br>
         }<br>
         DATASPACE  SCALAR<br>
      }<br>
      ATTRIBUTE "DIMENSION_LIST" {<br>
         DATATYPE  H5T_VLEN { H5T_REFERENCE { H5T_STD_REF_OBJECT }}<br>
         DATASPACE  SIMPLE { ( 3 ) / ( 3 ) }<br>
      }<br>
      ATTRIBUTE "DimensionNames" {<br>
         DATATYPE  H5T_STRING {<br>
            STRSIZE 13;<br>
            STRPAD H5T_STR_NULLTERM;<br>
            CSET H5T_CSET_ASCII;<br>
            CTYPE H5T_C_S1;<br>
         }<br>
         DATASPACE  SCALAR<br>
      }<br>
      ATTRIBUTE "_FillValue" {<br>
         DATATYPE  H5T_STD_I16LE<br>
         DATASPACE  SCALAR<br>
      }<br>
      ATTRIBUTE "coordinates" {<br>
         DATATYPE  H5T_STRING {<br>
            STRSIZE 13;<br>
            STRPAD H5T_STR_NULLTERM;<br>
            CSET H5T_CSET_ASCII;<br>
            CTYPE H5T_C_S1;<br>
         }<br>
         DATASPACE  SCALAR<br>
      }<br>
   }<br>
   DATASET "HQprecipitation" {<br>
      DATATYPE  H5T_IEEE_F32LE<br>
      DATASPACE  SIMPLE { ( 1, 3600, 1800 ) / ( H5S_UNLIMITED, 3600, 1800 ) }<br>
      ATTRIBUTE "CodeMissingValue" {<br>
         DATATYPE  H5T_STRING {<br>
            STRSIZE 8;<br>
            STRPAD H5T_STR_NULLTERM;<br>
            CSET H5T_CSET_ASCII;<br>
            CTYPE H5T_C_S1;<br>
         }<br>
         DATASPACE  SCALAR<br>
      }<br>
      ATTRIBUTE "DIMENSION_LIST" {<br>
         DATATYPE  H5T_VLEN { H5T_REFERENCE { H5T_STD_REF_OBJECT }}<br>
         DATASPACE  SIMPLE { ( 3 ) / ( 3 ) }<br>
      }<br>
      ATTRIBUTE "DimensionNames" {<br>
         DATATYPE  H5T_STRING {<br>
            STRSIZE 13;<br>
            STRPAD H5T_STR_NULLTERM;<br>
            CSET H5T_CSET_ASCII;<br>
            CTYPE H5T_C_S1;<br>
         }<br>
         DATASPACE  SCALAR<br>
      }<br>
      ATTRIBUTE "Units" {<br>
         DATATYPE  H5T_STRING {<br>
            STRSIZE 6;<br>
            STRPAD H5T_STR_NULLTERM;<br>
            CSET H5T_CSET_ASCII;<br>
            CTYPE H5T_C_S1;<br>
         }<br>
         DATASPACE  SCALAR<br>
      }<br>
      ATTRIBUTE "_FillValue" {<br>
         DATATYPE  H5T_IEEE_F32LE<br>
         DATASPACE  SCALAR<br>
      }<br>
      ATTRIBUTE "coordinates" {<br>
         DATATYPE  H5T_STRING {<br>
            STRSIZE 13;<br>
            STRPAD H5T_STR_NULLTERM;<br>
            CSET H5T_CSET_ASCII;<br>
            CTYPE H5T_C_S1;<br>
         }<br>
         DATASPACE  SCALAR<br>
      }<br>
      ATTRIBUTE "units" {<br>
         DATATYPE  H5T_STRING {<br>
            STRSIZE 6;<br>
            STRPAD H5T_STR_NULLTERM;<br>
            CSET H5T_CSET_ASCII;<br>
            CTYPE H5T_C_S1;<br>
         }<br>
         DATASPACE  SCALAR<br>
      }<br>
   }<br>
</p>
<p></p>
<p><span style="font-family:'Times New Roman'">From the output, It seem that the size of  variable
<span style="font-family:"Times New Roman"; white-space:normal"><em>H</em><em>Qprecip</em></span><span style="font-family:"Times New Roman"; white-space:normal"><em>itat</em><em>i</em><em>o</em><em>n</em></span>  is (1,3600,1800). So I created the ctl file
 below:</span> </p>
<p><span style="font-family:'Times New Roman'">dset ^3B-HHR.MS.MRG.3IMERG.20181118-S233000-E235959.1410.V06B.HDF5<br>
DTYPE hdf5_grid<br>
TITLE IMERG sample<br>
UNDEF -9999.9<br>
XDEF 3600 linear -179.95 0.1<br>
YDEF 1800 linear -89.95 0.1<br>
ZDEF 1 levels 1 1<br>
TDEF 1 linear 23:30Z18nov2018 30mn<br>
VARS 5<br>
/Grid/HQprecipitation=>hqp       0  t,x,y  HQ precipitation<br>
/Grid/IRprecipitation=>irp       0  t,x,y  IR precipitation<br>
/Grid/precipitationCal=>calp     0  t,x,y  cal precipitation<br>
/Grid/precipitationUncal=>uncalp 0  t,x,y  uncal precipitation<br>
/Grid/randomError=>error         0  t,x,y  random error<br>
ENDVARS<br>
<br>
</span></p>
<p><span style="font-family:'Times New Roman'"><br>
</span></p>
<p style="font-family:SimSun"><span style="font-family:'Times New Roman'">I am not sure how to read the HDF5 file successfully. Can anyone help? Thanks in advance.</span>
</p>
<p style="font-family:SimSun"><span style="font-family:'Times New Roman'"><br>
</span></p>
<p style="font-family:SimSun"><span style="font-family:'Times New Roman'">Lizhi Jiang</span>
</p>
<p style="font-family:SimSun"><span style="font-family:'Times New Roman'">June 4, 2020</span>
</p>
<p style="font-family:SimSun"><span style="font-family:"Times New Roman""><br>
</span></p>
</div>
</div>
</body>
</html>