# Pylith noisy displacement field

**URL:** <https://community.geodynamics.org/t/pylith-noisy-displacement-field/3886>\
**Category:** PyLith\
**Created:** [January 24, 2025, 6:56pm UTC](https://community.geodynamics.org/t/pylith-noisy-displacement-field/3886 "2025-01-24T18:56:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aura99](https://avatars.discourse-cdn.com/v4/letter/a/839c29/32.png) [@aura99](https://community.geodynamics.org/u/aura99)\
**Post date:** [January 24, 2025, 6:56pm UTC](https://community.geodynamics.org/t/pylith-noisy-displacement-field/3886/1 "2025-01-24T18:56:31Z")

</div>

Hello,

I am running the demo of pylith-4.1.1 crustal-strikeslip-3d step02\_varslip.cfg. When checking the displacement by reading step02\_varslip-domain.h5 using MATLAB (left figure), the result seems to be contaminated by points with small values(green ones), especially in the near-fault field. The plotting code is shown below.

cor = h5read(‘step02\_varslip-domain.h5’,‘/geometry/vertices’);  
data=h5read(‘step02\_varslip-domain.h5’,‘/vertex\_fields/displacement’);  
figure;fastscatter(cor(1,:),cor(2,:); ,data(1,:));

If I increase the mesh resolution, the points become clearer to see (right figure).

 ![Screenshot 2025-01-24 at 12.55.00](https://canada1.discourse-cdn.com/flex036/uploads/geodynamics/original/2X/3/383ecd5ff2ba4c64deb069630092d950cbe48a6c.jpeg)

Could this be due to incorrect plotting?  
Thanks.

---

<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:** [January 24, 2025, 7:52pm UTC](https://community.geodynamics.org/t/pylith-noisy-displacement-field/3886/2 "2025-01-24T19:52:56Z")

</div>

You are plotting values from the entire domain projected onto the xy plane, so you see values from the bottom of the domain up to the top of the domain all together. Because the displacement field is not uniform with depth, this introduces variability. If you just plot the values on the ground surface (step02\_varslip-groundsurf.h5), you will see a smooth displacement field.

Note: PyLith v4.1.1 contains a bug that introduces inconsistent fault orientations. This is fixed in v4.1.2 and v4.2.0 (but not v4.1.3). We strongly recommend updating to the most recent release (v4.2.0).

---

<div class="post-metadata">

**Author:** ![aura99](https://avatars.discourse-cdn.com/v4/letter/a/839c29/32.png) [@aura99](https://community.geodynamics.org/u/aura99)\
**Post date:** [January 24, 2025, 8:52pm UTC](https://community.geodynamics.org/t/pylith-noisy-displacement-field/3886/3 "2025-01-24T20:52:49Z")

</div>

> [@baagaard](#):
>
> ep02\_varslip-groundsurf.h5)

Thank you for your reply.
