[CIG-SHORT] pylith.meshio.DataWriterHDF5Ext

Charles Williams willic3 at gmail.com
Fri Oct 6 12:16:40 PDT 2017


Dear Huihui,

You should be able to access the info in the HDF5Ext files the same as you do for regular HDF5 files.  The .h5 files contain references to all of the .dat and .dat.info <http://dat.info/> files.  When opening these .h5 files, follow the same rules about the starting directory as you do for Paraview.  You can test this very easily using the h5dump command.  If this command works properly, then so should your Python scripts using h5py.

Cheers,
Charles


> On 6/10/2017, at 10:50 PM, Huihui Weng <qfkq7850 at mail.ustc.edu.cn> wrote:
> 
> Dear Charles,
> 
> It does works as your suggestion. Paraview can open it right now. Thanks very much.
> 
> I find there are many accompanied files (e.g., .dat and .dat.info <http://dat.info/>) created during the simulation, in addition to those familiar .h5 and .xmf files. What is the format (or data structure) of these .dat and .dat.info <http://dat.info/> files? How can I import them to array in Python? 
> 
> In addition,it does seem that the structure of the .h5 file is different from the regular ones. For instance, the command in Python to import the regular .h5 file is:  
> 
> h5 = h5py.File(filename,’r’)
> vertices = h5[‘geometry/vertices’][:]
> 
> then I can get the array “vertices” in Python, but is does not work for these “External" .h5 files. Could you tell me how to revise the scripts of Python to import them? Thanks.
> 
> Best wishes,
> Huihui
> 
>> On 6 Oct 2017, at 2:25 AM, Charles Williams <willic3 at gmail.com <mailto:willic3 at gmail.com>> wrote:
>> 
>> Dear Huihui,
>> 
>> It is still possible to view HDF5Ext files with Paraview, as long as PyLith generated the appropriate .xmf files.  The only tricky part is dealing with the fact that these files internally use relative pathnames.  If you are using Linux, it is easy to start Paraview in a directory that will make things work correctly.  For example, if you generated your output files in a subdirectory of where you ran PyLith, start Paraview in a directory one level above your output directory.  If your output is in a directory at the same level as your output, start Paraview in a similar directory.  In general, if you start Paraview in the same directory as your output, you will get an error.
>> 
>> Just make sure you open the .xmf file, since that is what Paraview needs.
>> 
>> Cheers,
>> Charles
>> 
>> 
>>> On 5/10/2017, at 9:36 PM, Huihui Weng <qfkq7850 at mail.ustc.edu.cn <mailto:qfkq7850 at mail.ustc.edu.cn>> wrote:
>>> 
>>> Hi Aagaard,
>>> 
>>> I have tried to install PyLith under cluster. But I find I need to use the external storage instead of the regular one to make it run, i.e., "writer = pylith.meshio.DataWriterHDF5Ext" rather than "writer = pylith.meshio.DataWriterHDF5". But the format of the output is unknown (as shown in the attached JPG). How can I convert these files to the regular HDF5 files? How can I illustrate these files using 3D visualization software, such as Paraview? It does seems they cannot be open by Paraview. Thanks very much!
>>> 
>>> Best regards,
>>> Huihui Weng
>>> 
>>> <File_list.png>
>>> _______________________________________________
>>> CIG-SHORT mailing list
>>> CIG-SHORT at geodynamics.org <mailto:CIG-SHORT at geodynamics.org>
>>> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short <http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short>
>> Charles Williams I Geodynamic Modeler
>> GNS Science I Te Pῡ Ao
>> 1 Fairway Drive, Avalon 5010, PO Box 30368, Lower Hutt 5040, New Zealand
>> Ph 0064-4-570-4566 I Mob 0064-22-350-7326 I Fax 0064-4-570-4600
>> http://www.gns.cri.nz/ <http://www.gns.cri.nz/> I Email: C.Williams at gns.cri.nz <mailto:your.email at gns.cri.nz>
>> _______________________________________________
>> CIG-SHORT mailing list
>> CIG-SHORT at geodynamics.org <mailto:CIG-SHORT at geodynamics.org>
>> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short
> 
> _______________________________________________
> CIG-SHORT mailing list
> CIG-SHORT at geodynamics.org
> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short

Charles Williams I Geodynamic Modeler
GNS Science I Te Pῡ Ao
1 Fairway Drive, Avalon 5010, PO Box 30368, Lower Hutt 5040, New Zealand
Ph 0064-4-570-4566 I Mob 0064-22-350-7326 I Fax 0064-4-570-4600
http://www.gns.cri.nz/ <http://www.gns.cri.nz/> I Email: C.Williams at gns.cri.nz <mailto:your.email at gns.cri.nz>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geodynamics.org/pipermail/cig-short/attachments/20171007/c039bc71/attachment.html>


More information about the CIG-SHORT mailing list