<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#ffffff">
Hello,<br>
<br>
I'm in trouble with HDF5 format since it is completely different to
HDF4. I'm working with version GrADS 2.0a9. As a matter of fact, I
have to create a descriptor file with UNPACK command etc. in order
to open the file (open command works only). The problem is, that I
really don't know, how to do that, although the GrADS manual is
explaining things a bit: <a
href="http://iges.org/grads/gadoc/SDFdescriptorfile">http://iges.org/grads/gadoc/SDFdescriptorfile</a><br>
<br>
Well, let's first have a look into the dumpfile created with
n5dump-command:<br>
<br>
HDF5 "LDA_PROD_LEV1_20040301.HDF5" {<br>
GROUP "/" {<br>
GROUP "LDA_PROD_LEV1_20040301" {<br>
GROUP "CompositProduct" {<br>
GROUP "stPROD1" {<br>
DATASET "Latitude" {<br>
DATATYPE H5T_IEEE_F32BE<br>
DATASPACE SIMPLE { ( 3242096 ) / ( 3242096 ) }<br>
DATA {<br>
}<br>
}<br>
DATASET "Longitude" {<br>
DATATYPE H5T_IEEE_F32BE<br>
DATASPACE SIMPLE { ( 3242096 ) / ( 3242096 ) }<br>
DATA {<br>
}<br>
}<br>
}<br>
GROUP "stPROD7" {<br>
DATASET "AOD" {<br>
DATATYPE H5T_STD_U8LE<br>
DATASPACE SIMPLE { ( 3242096 ) / ( 3242096 ) }<br>
DATA {<br>
}<br>
ATTRIBUTE "OFFSET" {<br>
DATATYPE H5T_IEEE_F32BE<br>
DATASPACE SIMPLE { ( 1 ) / ( 1 ) }<br>
DATA {<br>
(0): 0.05<br>
}<br>
}<br>
ATTRIBUTE "SLOPE" {<br>
DATATYPE H5T_IEEE_F32BE<br>
DATASPACE SIMPLE { ( 1 ) / ( 1 ) }<br>
DATA {<br>
(0): 0.00570866<br>
}<br>
}<br>
}<br>
DATASET "AOD_ERR" {<br>
DATATYPE H5T_STD_U16BE<br>
DATASPACE SIMPLE { ( 3242096 ) / ( 3242096 ) }<br>
DATA {<br>
}<br>
ATTRIBUTE "OFFSET" {<br>
DATATYPE H5T_IEEE_F32BE<br>
DATASPACE SIMPLE { ( 1 ) / ( 1 ) }<br>
DATA {<br>
(0): 0<br>
}<br>
}<br>
ATTRIBUTE "SLOPE" {<br>
DATATYPE H5T_IEEE_F32BE<br>
DATASPACE SIMPLE { ( 1 ) / ( 1 ) }<br>
DATA {<br>
(0): 0.000152593<br>
}<br>
}<br>
}<br>
DATASET "BHR_ERR_VIS06" {<br>
DATATYPE H5T_STD_I32BE<br>
DATASPACE SIMPLE { ( 3242096 ) / ( 3242096 ) }<br>
DATA {<br>
}<br>
ATTRIBUTE "OFFSET" {<br>
DATATYPE H5T_IEEE_F32BE<br>
DATASPACE SIMPLE { ( 1 ) / ( 1 ) }<br>
DATA {<br>
(0): 0<br>
}<br>
}<br>
ATTRIBUTE "SLOPE" {<br>
DATATYPE H5T_IEEE_F32BE<br>
DATASPACE SIMPLE { ( 1 ) / ( 1 ) }<br>
DATA {<br>
(0): 0.000152593<br>
}<br>
}<br>
}<br>
DATASET "BHR_VIS06" {<br>
DATATYPE H5T_STD_I32BE<br>
DATASPACE SIMPLE { ( 3242096 ) / ( 3242096 ) }<br>
DATA {<br>
}<br>
ATTRIBUTE "OFFSET" {<br>
DATATYPE H5T_IEEE_F32BE<br>
DATASPACE SIMPLE { ( 1 ) / ( 1 ) }<br>
DATA {<br>
(0): 0<br>
}<br>
}<br>
ATTRIBUTE "SLOPE" {<br>
DATATYPE H5T_IEEE_F32BE<br>
DATASPACE SIMPLE { ( 1 ) / ( 1 ) }<br>
DATA {<br>
(0): 1.52593e-05<br>
}<br>
}<br>
}<br>
DATASET "CLASS" {<br>
DATATYPE H5T_STD_U8LE<br>
DATASPACE SIMPLE { ( 3242096 ) / ( 3242096 ) }<br>
DATA {<br>
}<br>
ATTRIBUTE "SAEROTYPE" {<br>
DATATYPE H5T_STRING {<br>
STRSIZE 15;<br>
STRPAD H5T_STR_NULLTERM;<br>
CSET H5T_CSET_ASCII;<br>
CTYPE H5T_C_S1;<br>
}<br>
DATASPACE SIMPLE { ( 4 ) / ( 4 ) }<br>
DATA {<br>
(0): "LDA_SPH_ABSORB", "LDA_SPH_MODABS",
"LDA_SPH_NONABS", "LDA_NSP_MEDRAD"<br>
}<br>
}<br>
}<br>
DATASET "FREPTIME" {<br>
DATATYPE H5T_IEEE_F32BE<br>
DATASPACE SIMPLE { ( 3242096 ) / ( 3242096 ) }<br>
DATA {<br>
}<br>
}<br>
DATASET "MaxAOD" {<br>
DATATYPE H5T_STD_U8LE<br>
DATASPACE SIMPLE { ( 3242096 ) / ( 3242096 ) }<br>
DATA {<br>
}<br>
ATTRIBUTE "OFFSET" {<br>
DATATYPE H5T_IEEE_F32BE<br>
DATASPACE SIMPLE { ( 1 ) / ( 1 ) }<br>
DATA {<br>
(0): 0.05<br>
}<br>
}<br>
ATTRIBUTE "SLOPE" {<br>
DATATYPE H5T_IEEE_F32BE<br>
DATASPACE SIMPLE { ( 1 ) / ( 1 ) }<br>
DATA {<br>
(0): 0.00570866<br>
}<br>
}<br>
}<br>
DATASET "MinAOD" {<br>
DATATYPE H5T_STD_U8LE<br>
DATASPACE SIMPLE { ( 3242096 ) / ( 3242096 ) }<br>
DATA {<br>
}<br>
ATTRIBUTE "OFFSET" {<br>
DATATYPE H5T_IEEE_F32BE<br>
DATASPACE SIMPLE { ( 1 ) / ( 1 ) }<br>
DATA {<br>
(0): 0.05<br>
}<br>
}<br>
ATTRIBUTE "SLOPE" {<br>
DATATYPE H5T_IEEE_F32BE<br>
DATASPACE SIMPLE { ( 1 ) / ( 1 ) }<br>
DATA {<br>
(0): 0.00570866<br>
}<br>
}<br>
}<br>
DATASET "PROBA" {<br>
DATATYPE H5T_STD_I32BE<br>
DATASPACE SIMPLE { ( 3242096 ) / ( 3242096 ) }<br>
DATA {<br>
}<br>
ATTRIBUTE "OFFSET" {<br>
DATATYPE H5T_IEEE_F32BE<br>
DATASPACE SIMPLE { ( 1 ) / ( 1 ) }<br>
DATA {<br>
(0): 0<br>
}<br>
}<br>
ATTRIBUTE "SLOPE" {<br>
DATATYPE H5T_IEEE_F32BE<br>
DATASPACE SIMPLE { ( 1 ) / ( 1 ) }<br>
DATA {<br>
(0): 1.52593e-05<br>
}<br>
}<br>
}<br>
DATASET "UISLOTSERIES" {<br>
DATATYPE H5T_STD_I32BE<br>
DATASPACE SIMPLE { ( 3242096 ) / ( 3242096 ) }<br>
DATA {<br>
}<br>
}<br>
}<br>
}<br>
}<br>
}<br>
}<br>
<br>
Let me further give you some numbers extracted with HDFview (only
the AOD is of interest for me):<br>
Longitude and Latitude are 1-dim arrays with the dimension 3162397
(32-bit float = H5T_IEEE_F32BE)<br>
AOD is of the same size (1-dim with 3162397 entries), but
8-bit-unsigned-character (= H5T_STD_U8LE). Slope and offset
according dumpfile. Apart from the different entry size of the
array, it is the same.<br>
<br>
Thus, I strongly assume that one has to make use of the UNPACK
command since it seems to be packed non-float data which is
obviously the typical HDF5 feature (the two spatial dimensions are
merged into one large 1-dim array). But, how to use the UNPACK
command? According <a
href="http://iges.org/grads/gadoc/descriptorfile.html">http://iges.org/grads/gadoc/descriptorfile.html</a><br>
... I tried 2 versions:<br>
UNPACK SLOPE OFFSET<br>
UNPACK 0.00570866 0.05<br>
It yields "Low Level I/O Error: Read error on data file" in each
case.<br>
<br>
But this might not be the problem, since I have to put some typical
XDEF, YDEF values which I don't know. I only know maximum and
minimum Lat/Lon values, but not the grid spacing. Maybe a specific
DTYPE entry would not require XDEF, YDEF anymore, but the GrADS
version I'm using (2.0a9) doesn't cope with entries like "hdf5_grid"
or "hdfsds"<span class="Apple-style-span" style="border-collapse:
separate; color: rgb(0, 0, 0); font-family: 'Times New Roman';
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: normal; orphans: 2;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; font-size: medium;"><span
class="Apple-style-span" style="font-family:
Arial,Helvetica,sans-serif; font-size: 13px;"></span></span>!
Instead, it returns: "The invalid description file record is -->
DTYPE hdf5_grid". For this reason, I commented DTYPE to be able to
open the file at least. Up to now, I were using "DTYPE netcdf",
which works fine also for HDF4 files. Perhaps I have to use "units"
for non-standard binary files instead, but again, it doesn't work. I
tried sth like "AOD=>aod = -1,40,8<span class="Apple-style-span"
style="border-collapse: separate; color: rgb(0, 0, 0);
font-family: 'Times New Roman'; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: 2; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px; font-size:
medium;"><span class="Apple-style-span" style="font-family:
Arial,Helvetica,sans-serif; font-size: 13px;"></span></span>".
May be I'm not applying it correctly!?<br>
<br>
Alternatively, any suggestion on how to convert HDF5 into HDF4 or
NetCDF would be highly appreciated. I tried "ncl_convert2nc" which
works fine for HDF4, but of course not for HDF5.<br>
<br>
I'm using GrADS for all my model output (NetCDF as well as HDF4
files), but now I got these HDF5 files (only available in this
format unfortunately) and I ran completely out of ideas how to get
it read and processed by GrADS. Since the gradsusr-archive also
didn't help, I send you this message, hoping that anybody out there
have a clue or hint how to settle this issue. It's basically nothing
more than translating the content of the HDF5-dumpfile into the
GrADS descriptor file ... which I'm unfortunately incapable of.<br>
<br>
Thank you very much!<br>
<br>
Best regards,<br>
KarSteN<br>
<br>
<br>
<pre class="moz-signature" cols="72">--
______________________________________________________________________
Karsten Haustein
Earth Sciences Division
Barcelona Supercomputing Center - Centro Nacional de Supercomputación
Building Nexus II – Floor 1 – Area C
c/ Jordi Girona 29, E-08034 Barcelona, Spain
phone: +34-934137581 fax +34-934137721
email: <a class="moz-txt-link-abbreviated" href="mailto:karsten.haustein@bsc.es">karsten.haustein@bsc.es</a>
BSC web page: <a class="moz-txt-link-freetext" href="http://www.bsc.es/">http://www.bsc.es/</a>
DREAM model: <a class="moz-txt-link-freetext" href="http://www.bsc.es/projects/earthscience/DREAM/">http://www.bsc.es/projects/earthscience/DREAM/</a>
______________________________________________________________________
</pre>
<br>
<br>
WARNING / LEGAL TEXT: This message is intended only for the use of the
individual or entity to which it is addressed and may contain
information which is privileged, confidential, proprietary, or exempt
from disclosure under applicable law. If you are not the intended
recipient or the person responsible for delivering the message to the
intended recipient, you are strictly prohibited from disclosing,
distributing, copying, or in any way using this message. If you have
received this communication in error, please notify the sender and
destroy and delete any copies you may have received.
<br><br>
<a href="http://www.bsc.es/disclaimer.htm">http://www.bsc.es/disclaimer.htm</a>
<br>
</body>
</html>