Skip to main content

seissolxdmfwriter

A python module to write seissol outputs readable by paraview.

import seissolxdmfwriter as sxw
import seissolxdmf as sx
import numpy as np

fn = "test-fault.xdmf"
# Read data from input file using seissolxdmf
sx = sx.seissolxdmf(fn)
geom = sx.ReadGeometry()
connect = sx.ReadConnect()
dt = sx.ReadTimeStep()
outputTimes = sx.ReadTimes()

SRs = sx.ReadData("SRs")
SRd = sx.ReadData("SRd")
SR = np.sqrt(SRs**2 + SRd**2)

# Write the 0,4 and 8th times steps of array SRs and SR in SRtest-fault.xdmf/SRtest-fault.h5
dictTime = {outputTimes[i]: i for i in [0, 4, 8]}
sxw.write(
    "test-fault",
    geom,
    connect,
    {"SRs": SRs, "SR": SR},
    dictTime,
    reduce_precision=True,
    backend="hdf5",
)

# Finally, the module can be use to write data directly from seissolxdmf, limiting
# the memory requirements

sxw.write_from_seissol_output(
    'test-fault-sx',
    sx,
    ['SRs', 'SRd','fault-tag', 'partition'],
    [3,4],
    reduce_precision=True,
    backend="hdf5",
    compression_level=4,
)

The module also encapsulates seissol_output_extractor, which can be used to extract and process data from SeisSol output files, allowing selection of variables, time steps, spatial ranges, and output format. Here is an example of use:

# extracts PSR, Vr and partition, at 2nd and 4th time steps and at simulation time 0.5, from test-fault.xdmf and write into test_new-fault.xdmf
# use seissol_output_extractor --h for additionnal info about the arguments
seissol_output_extractor test-fault.xdmf --time "i2,i4,0.5" --variable PSR Vr partition --add2prefix "_new"

Release files for seissolxdmfwriter 0.4.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for seissolxdmfwriter 0.4.6
File Size Uploaded
seissolxdmfwriter-0.4.6.tar.gz 9.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for seissolxdmfwriter 0.4.6
File Interpreter ABI Platform
seissolxdmfwriter-0.4.6-py3-none-any.whl Python 3 none any Details

Total release size: 20.2 kB

Release files / seissolxdmfwriter-0.4.6.tar.gz

Download URL seissolxdmfwriter-0.4.6.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2699b028ee85f734fc06724c69ba8846b829533f1f16f5264acc84c2946de06b
BLAKE2b-256 checksum
How to use checksums
c7795c3ee69aaebc867c139fcf443f605e001338edcced499dbcbe32cfab8ca5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.8

Release files / seissolxdmfwriter-0.4.6-py3-none-any.whl

Download URL seissolxdmfwriter-0.4.6-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92b304180a10a240b7e6ffb5dd02466d553ed09279a92a2c7431b507df293b8f
BLAKE2b-256 checksum
How to use checksums
1c1fd10ba98adbe9dee26dce98ea1b4d2e16b137fd52e2f7f10b1abca3cee10e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.8

Release history Release notifications | RSS feed

This release

0.4.6 This release

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.0

1 release file

0.3.0

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.0

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page