Muqun (Kent) Yang wrote:
Hi, John:
This is my own way to handle dimensional scale in WRF-HDF5 module 
since at that time there was no implementation of dimensional scale at 
HDF5.
So it may not be a good example to follow with the current HDF5 
dimensional scale implementation.
Anyway, here is what I invented:
I used a compound datatype to store three piece information of HDF5 file:
1) name of the dimension 2) the length of the dimension(in the 
example, length of time is 1 means only one timestep is generated) and 
also 3) whether the current dimension is unlimited or not, if it is 
unlimited dimension, the flag is set to 1, otherwise it is -1.
I can use these information to retrieve the dimensional information of 
the HDF5 file.
The H5_Dimrank is used to retrieve information from each variable.
There are two confusion parts of the dumped file:
1) H5_Dimrank always starts with 1, the index of dumper output always 
starts from 0.
2) I believe that except the first dimension is time(I hard-coded 
that); to retrieve the rest dimensional rank, you have to reverse the 
dimension order.
For example, for dim rank 1(time),5,3, the actual dimension it is 
supposed to point to is 1(time),3,5 in the table. I know that's odd.   
I am using HDF5 fortran wrapper to do all WRF work, I am not sure 
whether that explains something. It is possible that the dimension 
information I stored is in fortran order but h5dump just display in C 
order. It is also possible this is bug that has not been discovered. I 
just read my code and the part that handles the dimensional scale is 
not straightforward, I cannot figure out whether this is a bug or not 
with the limited time. Anyway, I will leave the fix of this in the 
future WRF release if they still want PHDF5 module. Now, if you can 
use the previous approach, it should make sense to you. I do remember 
I converted WRF-NetCDF output and then converted NetCDF to HDF5 to 
make the comparison with WRF-HDF5 output. The data stored in the two 
files are the same.
Hope this helps.
Kent
Kent
ok, yes this makes more sense now
     :H5_DimRank = 1, 5, 3, 4;
refers to h5dim_table 1, 4, 3, 5 ( 1 based)
and
   :H5_DimRank = 1, 5, 3
refers to h5dim_table 1, 3, 5
i think im seeing this in the sequential output also. So do you think no 
one will use this particular format? If so, I will wait for new version..
BTW, in the parallel output (but not the sequential), you put each time 
step in its own group. was this to optimize parallel performance or 
something ?
thanks for the help!