Hi all,
I am trying to convert some HDF5 file into grid data files I can use later for grid data operations. To be more specific I am trying to present my model results as a grid image representing the magnitude of change between results of two different simulation conditions. I got global average values for the same variable in two different runs and I would like to substract or divide both images. Any ideas of how to do this?
Thank you so much for your help
How to use the tool ConvertHDF5ToGridData?
-
- MOHID Beginner
- Posts: 7
- Joined: Tue Jan 10, 2012 16:54
-
- MOHID Advanced user
- Posts: 187
- Joined: Thu Jan 01, 1970 00:00
Re: How to use the tool ConvertHDF5ToGridData?
Hello,
You should read this:
http://www.mohid.com/wiki/index.php?tit ... ToGridData
This way you can tansform the HDF fields in to grids. And then do the math you want between grids.
To have an executable of ConvertHDF5ToGridData you may compile it from the code in http://mohid.codeplex.com/ if you have that option. Or ask for a new executable.
Best regards,
David
You should read this:
http://www.mohid.com/wiki/index.php?tit ... ToGridData
This way you can tansform the HDF fields in to grids. And then do the math you want between grids.
To have an executable of ConvertHDF5ToGridData you may compile it from the code in http://mohid.codeplex.com/ if you have that option. Or ask for a new executable.
Best regards,
David
-
- MOHID Beginner
- Posts: 7
- Joined: Tue Jan 10, 2012 16:54
Re: How to use the tool ConvertHDF5ToGridData?
Hello David,
Thanks for your response. I dont think I am going to be able to compile if from the code... how can I ask for an executable? can it be downloaded?
Thanks again for your time.
Javier
Thanks for your response. I dont think I am going to be able to compile if from the code... how can I ask for an executable? can it be downloaded?
Thanks again for your time.
Javier
-
- MOHID Advanced user
- Posts: 187
- Joined: Thu Jan 01, 1970 00:00
Re: How to use the tool ConvertHDF5ToGridData?
Javier,
i just sent you an e.mail with link to download the exe.
you just need to create a text file HDF5ToGridData.dat and insert the kwyeords in the refered MOHID wiki.
Hope it helps.
Best regards,
David
i just sent you an e.mail with link to download the exe.
you just need to create a text file HDF5ToGridData.dat and insert the kwyeords in the refered MOHID wiki.
Hope it helps.
Best regards,
David
-
- MOHID Beginner
- Posts: 7
- Joined: Tue Jan 10, 2012 16:54
Re: How to use the tool ConvertHDF5ToGridData?
Thank you so much David!
You have been truly helpful.
Regards.
You have been truly helpful.
Regards.
-
- MOHID Beginner
- Posts: 7
- Joined: Tue Jan 10, 2012 16:54
Re: How to use the tool ConvertHDF5ToGridData?
Dear David,
I am trying to convert some of the properties stored in my HDFs to grid data with the executable you sent me but I am afraid it is not working somehow. The properties I am trying to convert are global averages for the modelled period and it looks like the HDF5ToGridData.exe keeps looking my properties in the 'Results' group of the HDF file instead of the 'Statistics' group. Is there anything that I am doing wrong? I included copy of my HDFToGridData.dat and UsedKeyWords_1.dat files:
<<HDFToGridData.dat>>:
HDF_FILE : ...\HDF_Conversion\WaterProperties_18.hdf5
ALL_INSTANTS : 1
<BeginParameter>
PROPERTY : ammonia
HDF_GROUP : /Statistics/ammonia/Global/Average
<EndParameter>
<BeginParameter>
PROPERTY : nitrate
HDF_GROUP : /Statistics/nitrate/Global/Average
<EndParameter>
<BeginParameter>
PROPERTY : nitrite
HDF_GROUP : /Statistics/nitrite/Global/Average
<EndParameter>
<BeginParameter>
PROPERTY : inorganic phosphorus
HDF_GROUP : /Statistics/inorganic phosphorus/Global/Average
<EndParameter>
<BeginParameter>
PROPERTY : macroalgae
HDF_GROUP : /Statistics/macroalgae/Global/Average
<EndParameter>
<BeginParameter>
PROPERTY : phytoplankton
HDF_GROUP : /Statistics/phytoplankton/Global/Average
<EndParameter>
<BeginParameter>
PROPERTY : salinity
HDF_GROUP : /Statistics/salinity/Global/Average
<EndParameter>
<BeginParameter>
PROPERTY : temperature
HDF_GROUP : /Statistics/temperature/Global/Average
<EndParameter>
<<UsedKeyWords_1.dat>>:
HDF_FILE HDF5ToGridData Do not have From File .......... YES
ALL_INSTANTS HDF5ToGridData FALSE From File TRUE YES
PROPERTY HDF5ToGridData Do not have From Block ammonia YES
HDF_GROUP HDF5ToGridData /Results/ammonia/Global/A From Block /Statistics/ammonia/Global/Average YES
Thanks again for your help.
Regards,
Javier
I am trying to convert some of the properties stored in my HDFs to grid data with the executable you sent me but I am afraid it is not working somehow. The properties I am trying to convert are global averages for the modelled period and it looks like the HDF5ToGridData.exe keeps looking my properties in the 'Results' group of the HDF file instead of the 'Statistics' group. Is there anything that I am doing wrong? I included copy of my HDFToGridData.dat and UsedKeyWords_1.dat files:
<<HDFToGridData.dat>>:
HDF_FILE : ...\HDF_Conversion\WaterProperties_18.hdf5
ALL_INSTANTS : 1
<BeginParameter>
PROPERTY : ammonia
HDF_GROUP : /Statistics/ammonia/Global/Average
<EndParameter>
<BeginParameter>
PROPERTY : nitrate
HDF_GROUP : /Statistics/nitrate/Global/Average
<EndParameter>
<BeginParameter>
PROPERTY : nitrite
HDF_GROUP : /Statistics/nitrite/Global/Average
<EndParameter>
<BeginParameter>
PROPERTY : inorganic phosphorus
HDF_GROUP : /Statistics/inorganic phosphorus/Global/Average
<EndParameter>
<BeginParameter>
PROPERTY : macroalgae
HDF_GROUP : /Statistics/macroalgae/Global/Average
<EndParameter>
<BeginParameter>
PROPERTY : phytoplankton
HDF_GROUP : /Statistics/phytoplankton/Global/Average
<EndParameter>
<BeginParameter>
PROPERTY : salinity
HDF_GROUP : /Statistics/salinity/Global/Average
<EndParameter>
<BeginParameter>
PROPERTY : temperature
HDF_GROUP : /Statistics/temperature/Global/Average
<EndParameter>
<<UsedKeyWords_1.dat>>:
HDF_FILE HDF5ToGridData Do not have From File .......... YES
ALL_INSTANTS HDF5ToGridData FALSE From File TRUE YES
PROPERTY HDF5ToGridData Do not have From Block ammonia YES
HDF_GROUP HDF5ToGridData /Results/ammonia/Global/A From Block /Statistics/ammonia/Global/Average YES
Thanks again for your help.
Regards,
Javier
-
- MOHID Advanced user
- Posts: 187
- Joined: Thu Jan 01, 1970 00:00
Re: How to use the tool ConvertHDF5ToGridData?
Hi Javier,
The tool is intended to open the HDF group and then find inside somthing like "[property name]_000001" and save the grid. This was not tought for statistics, maybe the statistics groups and fields are not the same structure.
Can you post here the result of the program?
print here what is appearing in the black screen.
Best regards,
David
The tool is intended to open the HDF group and then find inside somthing like "[property name]_000001" and save the grid. This was not tought for statistics, maybe the statistics groups and fields are not the same structure.
Can you post here the result of the program?
print here what is appearing in the black screen.
Best regards,
David
-
- MOHID Beginner
- Posts: 7
- Joined: Tue Jan 10, 2012 16:54
Re: How to use the tool ConvertHDF5ToGridData?
Hi David,
This is a copy of the black screen message:
--------------------------------------------------------
Constructing HDF5ToGridData
Please wait...
Reading options...
Opening HDF...
Only 2D cases for now. Use 2D properties groups
ConvertToGridData - HDF5ToGridData - ERR60
--------------------------------------------------------
This is a copy of the black screen message:
--------------------------------------------------------
Constructing HDF5ToGridData
Please wait...
Reading options...
Opening HDF...
Only 2D cases for now. Use 2D properties groups
ConvertToGridData - HDF5ToGridData - ERR60
--------------------------------------------------------
-
- MOHID Advanced user
- Posts: 187
- Joined: Thu Jan 01, 1970 00:00
Re: How to use the tool ConvertHDF5ToGridData?
Hello Javier,
Seems that the problem is that the program was done for 2D in the expect that in the future also could be possible in 3D.
The statitistics are 3D fields? (sorry I am not very used to statistics)
Reading the code I saw that the program tests if the HDF_GROUP that you say exists and did not gave a error so it went to the correct part of the HDF.
But when he goes to open the HDF group to print fields every instant or defined instant, it warns you that this is not a 2D field and he cant continue because it is not programmed for 3D.
Can you check if this properties are 3D? you can open it with MOHID Post and when you click a instant you can see the dimensions. is it like axb or axbxc? where a, b and c are numbers of the grid dimensions.
Because if they are 2D than the problem is somthing else.
Best regards,
David
Seems that the problem is that the program was done for 2D in the expect that in the future also could be possible in 3D.
The statitistics are 3D fields? (sorry I am not very used to statistics)
Reading the code I saw that the program tests if the HDF_GROUP that you say exists and did not gave a error so it went to the correct part of the HDF.
But when he goes to open the HDF group to print fields every instant or defined instant, it warns you that this is not a 2D field and he cant continue because it is not programmed for 3D.
Can you check if this properties are 3D? you can open it with MOHID Post and when you click a instant you can see the dimensions. is it like axb or axbxc? where a, b and c are numbers of the grid dimensions.
Because if they are 2D than the problem is somthing else.
Best regards,
David
Who is online
Users browsing this forum: No registered users and 2 guests