How to output Seismic moment from prescribed slip on 2D/3D fault?

I am prescribing slip on a 20° dipping fault, as shown in the image. The fault (thick black line) crosses two blocks. All the blocks in the model have different material properties (density, Vp, and Vs). I want to know the seismic moment of the experiment since I am comparing different slip distributions and material properties on the blocks, and I am trying to produce the same seismic moment. This is a 2D model, but I want to do the same in 3D. How can I output this (seismic moment)? I am using the binary Pylith 4.1.3. Thank you

Please upgrade to PyLith v4.2.0 as there is a bug in the fault orientation code in PyLith v4.1.3.

You can use the utility pylith_eqinfo to compute the seismic moment for both 2D or 3D simulations. Note that it uses a single spatial database for elastic properties. In your case, I would make a simple spatial database that averages the properties from the two sides of the fault.

For variations in shear modulus across a fault, the following reference might be useful.
Wu, Z. L., & Chen, Y. T. (2003). Definition of Seismic Moment at a Discontinuity Interface. Bulletin of the Seismological Society of America, 93(4), 1832-1834. Definition of Seismic Moment at a Discontinuity Interface

1 Like

willic3 Thank you for your response! It is very useful!

baagaard Thank you for your response. Do you have an example that runs this utility? I did not find an example in the User guide.
I wonder if the spatial database should be different from the material block dataset. Do you have an example of the content of this database?
When running the following command, I get an error:

pylith_eqinfo [–filename_pattern=output/experiment-fault.h5] [–db_properties=./block_material.spatialdb]

Traceback (most recent call last):
File “/home/vislab_ceri_stu/Pylith/pylith-4.2.0-linux-x86_64/bin/pylith_eqinfo”, line 30, in
from pylith.apps.EqInfoApp import EqInfoApp
File “/home/vislab_ceri_stu/Pylith/pylith-4.2.0-linux-x86_64/lib/python3.12/site-packages/pylith/apps/EqInfoApp.py”, line 84, in
class EqInfoApp(Application):
File “/home/vislab_ceri_stu/Pylith/pylith-4.2.0-linux-x86_64/lib/python3.12/site-packages/pylith/apps/EqInfoApp.py”, line 109, in EqInfoApp
from spatialdata.spatialdb.SimpleDB import SimpleDB
File “/home/vislab_ceri_stu/Pylith/pylith-4.2.0-linux-x86_64/lib/python3.12/site-packages/spatialdata/spatialdb/SimpleDB.py”, line 11, in
from .SpatialDBObj import SpatialDBObj
File “/home/vislab_ceri_stu/Pylith/pylith-4.2.0-linux-x86_64/lib/python3.12/site-packages/spatialdata/spatialdb/SpatialDBObj.py”, line 13, in
from .spatialdb import SpatialDB as ModuleSpatialDB
File “/home/vislab_ceri_stu/Pylith/pylith-4.2.0-linux-x86_64/lib/python3.12/site-packages/spatialdata/spatialdb/spatialdb.py”, line 10, in
from . import _spatialdb
ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.15’ not found (required by /home/vislab_ceri_stu/Pylith/pylith-4.2.0-linux-x86_64/lib64/libproj.so.25)

Can I use Pylith’s own libraries (libstdc++)?
Thank you

The material property spatial database should be setup just like the spatial databases for your materials, but the material properties should be consistent with those for the fault as modeled in your simulation. This means when you have a material contrast across the fault, the material properties in the spatial database should be the appropriate average of the two materials on the two sides of the fault (refer to the references Charles mentioned for details).

What operating system are you using? The Linux binary for v4.2.0 was built with Rocky Linux 8, which matches RedHat 8 and should work on any Linux operating system with glibc 2.28 and later. Running ldd --version should list the glibc version.

I verified that the PyLith binary package includes the libstdc++.so.6 library. On your machine, it looks like it is finding the one in /usr/lib rather than the one included with PyLith, which suggests there is a problem with LD_LIBRARY_PATH with you environment. Did you run source setup.sh before running pylith_eqinfo? The operating system and which version you are using could be affecting this.

Great, then, I am using the correct spatial database.
I am using Ubuntu 22.04.5 LTS with Ubuntu GLIBC 2.35-0ubuntu3.8.

I updated the libstdc++ and I have GLIBCXX_3.4.32 but I got that error (ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.15’ not found (required by /home/vislab_ceri_stu/Pylith/pylith-4.2.0-linux-x86_64/lib64/libproj.so.25)

I also tried to set the pats as follows but still get the same.

export PYTHONPATH=/home/vislab_ceri_stu/Pylith/pylith-4.2.0-linux-x86_64/lib/python3.12/site-packages:$PYTHONPATH

export PATH=/home/vislab_ceri_stu/Pylith/pylith-4.2.0-linux-x86_64/bin:$PATH

export LD_LIBRARY_PATH=/home/vislab_ceri_stu/Pylith/pylith-4.2.0-linux-x86_64/lib64:$LD_LIBRARY_PATH

The Linux binary should work on Ubuntu 22.04. This is what I have on my desktop and I have verified the binary works on it.

Here are my suggestions on how to resolve this issue:

  1. Look at the output of echo $PATH and echo $LD_LIBRARY_PATH. If there is any conda, miniconda, etc installation in the path, then this is very likely the source of the problem; remove it from the PATH. When running PyLith or any of its utilities, we recommend starting with PATH set to just the operating system locations (PATH=/bin:/user/bin/:/sbin:/usr/sbin) and an empty LD_LIBRARY_PATH.
  2. If #1 above doesn’t resolve the issue, then in the top-level PyLith directory run ldd lib64/libproj.so and report the output along with the output of echo $LD_LIBRARY_PATH.

Thank you for your answer. I get the following

$ echo $PATH
/home/vislab_ceri_stu/Pylith/pylith-4.2.0-linux-x86_64/bin:/home/vislab_ceri_stu/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/vislab_ceri_stu/ParaView-5.10.1-MPI-Linux-Python3.9-x86_64/bin/

$ echo $LD_LIBRARY_PATH
/home/vislab_ceri_stu/Pylith/pylith-4.2.0-linux-x86_64/lib64:

So I run:

export PATH=/bin:/usr/bin:/sbin:/usr/sbin
export LD_LIBRARY_PATH=

Then, I tried:
$/home/vislab_ceri_stu/Pylith/pylith-4.2.0-linux-x86_64/bin/pylith_eqinfo --filename_pattern=output/experiment-fault.h5 --db_properties=./block_material.spatialdb

/usr/bin/env: ‘nemesis’: No such file or directory

Finally, by running

$ ldd /home/vislab_ceri_stu/Pylith/pylith-4.2.0-linux-x86_64/lib64/libproj.so

/home/vislab_ceri_stu/Pylith/pylith-4.2.0-linux-x86_64/lib64/libproj.so: /lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.15’ not found (required by /home/vislab_ceri_stu/Pylith/pylith-4.2.0-linux-x86_64/lib64/libproj.so)
linux-vdso.so.1 (0x00007ffcc6b76000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007d8ce7f75000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007d8ce7f70000)
libsqlite3.so.0 => /lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007d8ce7e23000)
libtiff.so.6 => not found
libcurl.so.4 => /lib/x86_64-linux-gnu/libcurl.so.4 (0x00007d8ce7d7c000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007d8ce7200000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007d8ce7c93000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007d8ce7c6f000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007d8ce6e00000)
libnghttp2.so.14 => /lib/x86_64-linux-gnu/libnghttp2.so.14 (0x00007d8ce7c45000)
libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x00007d8ce75df000)
librtmp.so.1 => /lib/x86_64-linux-gnu/librtmp.so.1 (0x00007d8ce75c0000)
libssh.so.4 => /lib/x86_64-linux-gnu/libssh.so.4 (0x00007d8ce7553000)
libpsl.so.5 => /lib/x86_64-linux-gnu/libpsl.so.5 (0x00007d8ce7c2f000)
libssl.so.3 => /lib/x86_64-linux-gnu/libssl.so.3 (0x00007d8ce74af000)
libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3 (0x00007d8ce6800000)
libgssapi_krb5.so.2 => /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007d8ce71ac000)
libldap-2.5.so.0 => /lib/x86_64-linux-gnu/libldap-2.5.so.0 (0x00007d8ce714d000)
liblber-2.5.so.0 => /lib/x86_64-linux-gnu/liblber-2.5.so.0 (0x00007d8ce749c000)
libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x00007d8ce707e000)
libbrotlidec.so.1 => /lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x00007d8ce748e000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007d8ce7472000)
/lib64/ld-linux-x86-64.so.2 (0x00007d8ce7f93000)
libunistring.so.2 => /lib/x86_64-linux-gnu/libunistring.so.2 (0x00007d8ce6c56000)
libgnutls.so.30 => /lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007d8ce6615000)
libhogweed.so.6 => /lib/x86_64-linux-gnu/libhogweed.so.6 (0x00007d8ce7036000)
libnettle.so.8 => /lib/x86_64-linux-gnu/libnettle.so.8 (0x00007d8ce65cf000)
libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007d8ce654d000)
libkrb5.so.3 => /lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007d8ce6482000)
libk5crypto.so.3 => /lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007d8ce6453000)
libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007d8ce7030000)
libkrb5support.so.0 => /lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007d8ce6c48000)
libsasl2.so.2 => /lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007d8ce6438000)
libbrotlicommon.so.1 => /lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x00007d8ce6415000)
libp11-kit.so.0 => /lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007d8ce62da000)
libtasn1.so.6 => /lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007d8ce62c2000)
libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007d8ce62bb000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007d8ce62a7000)
libffi.so.8 => /lib/x86_64-linux-gnu/libffi.so.8 (0x00007d8ce629a000)

I think the anaconda installation is interfering with the environment. We have seen this many times before.

After you reset PATH and LD_LIBRARY_PATH, you still need to run source setup.sh to update those variables to point to PyLith libraries etc.

Hi, I think it is working now.

After running source setup.sh, I hat to do:

export PYTHONPATH=/home/vislab_ceri_stu/Pylith/pylith-4.2.0-linux-x86_64/lib/python3.12/site-packages:/home/vislab_ceri_stu/Pylith/pylith-4.2.0-linux-x86_64/lib/python3.12/site-packages/pythia

However, when I run

pylith_eqinfo [–filename_pattern=output/experiment-fault.h5] [–db_properties=./block_material.spatialdb]

I always get:

Ready to run PyLith.

{default}::
– pyre.inventory(error)
– simpledb.description ← ‘’
– Description for spatial database not specified.
{default}::
– pyre.inventory(error)
– simpledb.simpleioascii.filename ← ‘’
– Filename for spatial database not specified.
eqinfoapp: configuration error(s)

I think my spatialdb file is correct, and I also verified that the path was correct.

My apologies for the poor documentation for the pylith_eqinfo utility. I will create a GitHub issue so that we improve it before the next release and demonstrate its use in the suite of examples.

The pylith_eqinfo application is a Pyre application like PyLith. This means the parameters are usually set in a .cfg file. Here is an example from tests/fullscale/eqinfo:

[eqinfoapp]
faults = [one, two]
filename_pattern = quad_%s.h5

output_filename = stats_quad.py

db_properties = spatialdata.spatialdb.SimpleDB
db_properties.description = Elastic properties
db_properties.iohandler.filename = mat_elastic.spatialdb

coordsys.space_dim = 3

I appreciate your help!

I could finally output the rupture metrics.

It will be very helpful to have a simple example in the userguide.
It didn’t take the spatialdb that I used for the simulation. Instead, I had to define these values inside the .cfg file as:

db_properties = spatialdata.spatialdb.UniformDB
db_properties.description = Elastic properties
db_properties.values = [density, vs, vp]
db_properties.data = [2700.0, 3496.029494, 5117.663]
coordsys.space_dim = 2

I improved the documentation for pylith_eqinfo and added demonstration of its use, for example, examples/crustal-strikeslip-3d/step01_slip. These updates are in the main PyLith branch, so they will be included in the next release and currently show up in the “latest” version of the online documentation.

This is great!

Thank you for your help. I think the documentation is very clear.