Skip to main content

A python reader for SeisSol xdmf output

Project description

seissolxdmf

A python reader for SeisSol xdmf output (posix or hdf5) and hdf5 meshes. Below is an simple example, illustrating the use of the module:

import seissolxdmf
fn = 'test-fault.xdmf'
# initiate class
sx = seissolxdmf.seissolxdmf(fn)
# Number of cells
nElements = sx.ReadNElements()
# Number of vertices
nNodes = sx.ReadNNodes()
# Number of nodes per elements
nodesPerElement = sx.ReadNodesPerElement()
# Read time step
dt = sx.ReadTimeStep()
# Read number of time steps
ndt = sx.ReadNdt()
# Returns a list of the output time values
outputTimes = sx.ReadTimes()
# load geometry array as a numpy array of shape ((nodes, 3))
geom = sx.ReadGeometry()
# load connectivity array as a numpy array of shape ((nElements, 3 or 4))
# The connectivity array gives for each cell a list of vertex ids.
connect = sx.ReadConnect()
# Check, whether variable "SRs" exists in the SeisSol output
assert "SRs" in sx.ReadAvailableDataFields()
# load SRs as a numpy array of shape ((ndt, nElements))
SRs = sx.ReadData('SRs')
# load the 9th time step of the SRs array as a numpy array of shape (nElements)
SRs = sx.ReadData('SRs', 8)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

seissolxdmf-0.1.3-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file seissolxdmf-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: seissolxdmf-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.13

File hashes

Hashes for seissolxdmf-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 49218da28f489e4df750bbc6f1b12b2269dfdc9c390c623a888dbf6058eccd30
MD5 3b7640e90fc78cfdb79731fdebef8233
BLAKE2b-256 d53e6293f4d099286e387fcf64f63ee78ce0190fcf53e57ed40d579b9a6837d7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page