# Pylith output files

**URL:** <https://community.geodynamics.org/t/pylith-output-files/3313>\
**Category:** PyLith\
**Created:** [March 11, 2024, 5:05am UTC](https://community.geodynamics.org/t/pylith-output-files/3313 "2024-03-11T05:05:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbasme1](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@mbasme1](https://community.geodynamics.org/u/mbasme1)\
**Post date:** [March 11, 2024, 5:05am UTC](https://community.geodynamics.org/t/pylith-output-files/3313/1 "2024-03-11T05:05:30Z")

</div>

Hello CIG Team,  
Currently, I am using Pylith to create earthquake scenarios. I read the manual and website but still have some questions about the output files since I need more details about some of them.  
In the next step, I would like to take the deformation results (e.g. in XYZ Cartesian Coordinates) on top of the earthquake model and run a landscape evolution process on the obtained data to see topography evolve with respect to each individual earthquake.

I know outputs are stored in H5 and XML files and their names give some clues, but I need specific information about each of these files and their internal structure to find my favorable data. I would be happy if you could help me to find how and where the displacement coordinates of the model surface (rupture ground) is stored and what is the format and structure. Then I can translate the plinth output into a landscape evolution program, and observe the results.  
Thank you in advance.  
Best,  
Mehran

---

<div class="post-metadata">

**Author:** ![baagaard](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/baagaard/32/615_2.png) [@baagaard](https://community.geodynamics.org/u/baagaard)\
**Post date:** [March 11, 2024, 2:12pm UTC](https://community.geodynamics.org/t/pylith-output-files/3313/2 "2024-03-11T14:12:15Z")

</div>

You can use standard [HDF5 tools](https://docs.hdfgroup.org/hdf5/develop/_view_tools_view.html) to inspect and access the h5 files. For example, you can use `h5dump` or `h5ls`. If you need to translate the output to a different format, you can Python scripts and [`h5py`](https://docs.h5py.org/en/stable/) to read the data and write the information to other files.

For `examples/reverse-2d/step05_onefault`, we can run the example and view the layout of the HDF5 file for the top boundary using

```auto
pylith step05_onefault.cfg
h5dump -n output/step05_onefault-boundary.h5
HDF5 "output/step05_onefault-boundary.h5" {
FILE_CONTENTS {
 group /
 group /geometry
 dataset /geometry/vertices
 dataset /time
 group /vertex_fields
 dataset /vertex_fields/displacement
 group /viz
 group /viz/topology
 dataset /viz/topology/cells
 }
}

```

If you drop the `-n` command line argument, `h5dump` will show the entire contents of the file. We do _not_ recommend using `h5dump` to translate the information to another format. That is much easier to do using Python scripts and `h5py`.

---

<div class="post-metadata">

**Author:** ![mbasme1](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@mbasme1](https://community.geodynamics.org/u/mbasme1)\
**Post date:** [March 12, 2024, 3:04am UTC](https://community.geodynamics.org/t/pylith-output-files/3313/3 "2024-03-12T03:04:56Z")

</div>

Thank you I will look over them.

---

<div class="post-metadata">

**Author:** ![mbasme1](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@mbasme1](https://community.geodynamics.org/u/mbasme1)\
**Post date:** [March 26, 2024, 5:02am UTC](https://community.geodynamics.org/t/pylith-output-files/3313/4 "2024-03-26T05:02:20Z")

</div>

Thank you for the explanations. I looked over the file contents along with the explanations in the manual. I am wondering if there are sources from which I can get more information about the content and format of file content groups. For example, what is the data format of displacement and topology (sometimes there are 2, 3, or 4 columns in the topology section) columns? In other words, what are these different columns showing, and in what format?  
Thank you in advance.

---

<div class="post-metadata">

**Author:** ![baagaard](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/baagaard/32/615_2.png) [@baagaard](https://community.geodynamics.org/u/baagaard)\
**Post date:** [March 26, 2024, 2:39pm UTC](https://community.geodynamics.org/t/pylith-output-files/3313/5 "2024-03-26T14:39:50Z")

</div>

The topology dataset describes how the vertices are connected into cells. There are 2 vertices for edges, 3 vertices for triangles, 4 vertices for quadrilaterals, 4 vertices for tetrahedra, and 8 vertices for hexahedra. The values are the indices in the vertices dataset. Refer to FIgures 7 and 8 in [Finite-Element Mesh — PyLith 4.0.0 documentation](https://pylith.readthedocs.io/en/latest/user/run-pylith/mesh.html#finite-element-mesh) for some diagrams of how vertices are connected into cells.

The `displacement` dataset is simply the displacement vector at each point. For `vertex_fields`, the displacements are at the vertices. For `cell_fields`, the displacements are at the centroids of the cells.

---

<div class="post-metadata">

**Author:** ![mbasme1](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@mbasme1](https://community.geodynamics.org/u/mbasme1)\
**Post date:** [March 26, 2024, 3:52pm UTC](https://community.geodynamics.org/t/pylith-output-files/3313/6 "2024-03-26T15:52:47Z")

</div>

Thank you.
