Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SW4 seems to only read first set of point sources from multi-segment SRF rupture #210

Open
sndybing opened this issue Apr 13, 2024 · 17 comments

Comments

@sndybing
Copy link

Hello! I'm working on simulating the M7.1 Ridgecrest earthquake using SW4. I've built an SRF version 2.0 file with four fault segments from a published inversion model of the earthquake (Goldberg et al., 2020). Following the SRF 2.0 format, I have the header for the four planes, which is then followed by four groups of point sources separated by the POINTS labels for the four segments. The four segments have 2130, 380, 270, and 340 point sources each, so the entire rupture model should have 3120 point sources.

When I run SW4 with my SRF file organized such that the largest fault segment (2130 point sources) has its points first in the order in the SRF, SW4 reads the file and says the following:

Opened rupture file 'RC_M7_multiseg.srf'
Version = 2.0
Number of segments in header block: 4
Seg #1: elon=-117.533, elat=35.7161, nstk=21, ndip=20, len=63.5649, wid=23.5743
stk=318.522, dip=89.525, dtop=0.1496, shyp=8.6493, dhyp=7.9268
Seg #2: elon=-117.539, elat=35.7199, nstk=4, ndip=19, len=10.399, wid=23.5668
stk=309.45, dip=89.9, dtop=0.1797, shyp=4.6311, dhyp=6.6393
Seg #3: elon=-117.651, elat=35.8163, nstk=3, ndip=18, len=6.685, wid=23.5687
stk=309.84, dip=89.9, dtop=0.1226, shyp=3.3287, dhyp=7.4848
Seg #4: elon=-117.439, elat=35.6097, nstk=4, ndip=17, len=12.172, wid=23.0142
stk=319.76, dip=88.9213, dtop=0.0924, shyp=6.0854, dhyp=8.7137
Number of point sources in data block: 2130
Read npts=2130, made 2054 point moment tensor sources, nu1=2054, nu2=0, nu3=0

It seems that SW4 is only reading the first block of point sources corresponding to the first listed fault segment?

As another check, I changed the order of the segments in the SRF such that the 340 point source fault is listed first. In this case SW4 reads the file and similarly says the following:

Opened rupture file 'RC_M7_multiseg_newsegorder.srf'
Version = 2.0
Number of segments in header block: 4
Seg #1: elon=-117.439, elat=35.6097, nstk=4, ndip=17, len=12.172, wid=23.0142
stk=319.76, dip=88.9213, dtop=0.0924, shyp=6.0854, dhyp=8.7137
Seg #2: elon=-117.651, elat=35.8163, nstk=3, ndip=18, len=6.685, wid=23.5687
stk=309.84, dip=89.9, dtop=0.1226, shyp=3.3287, dhyp=7.4848
Seg #3: elon=-117.539, elat=35.7199, nstk=4, ndip=19, len=10.399, wid=23.5668
stk=309.45, dip=89.9, dtop=0.1797, shyp=4.6311, dhyp=6.6393
Seg #4: elon=-117.533, elat=35.7161, nstk=21, ndip=20, len=63.5649, wid=23.5743
stk=318.522, dip=89.525, dtop=0.1496, shyp=8.6493, dhyp=7.9268
Number of point sources in data block: 340
Read npts=340, made 329 point moment tensor sources, nu1=329, nu2=0, nu3=0

The Mw that SW4 calculates based on my SRFs (6.9 and 6.4 for the above examples respectively) is also lower than I expect given that the SRF is based off of an inversion for the M7.1 Ridgecrest mainshock.

I'm wondering if this is a bug in the software or if I have an issue with my SRF file. I don't think I'm able to attach the SRF, but here's a screenshot of the beginning of the file where the largest fault segment is first, as well as one of the transition points to the next segment deeper into the file.

SW4 runs fine and outputs waveforms as expected - I'm just not sure it's using all of the point sources.

Screen Shot 2024-04-13 at 1 01 26 AM Screen Shot 2024-04-13 at 1 03 46 AM

Thank you!

@sndybing
Copy link
Author

sndybing commented Apr 13, 2024

Just to add something else I tried after this, if I take out the differentiation between the segment point source blocks and just put everything in one POINTS 3120 block, SW4 does read in all of the point sources and it gets the Mw up to 7.04. Seems like a reasonable workaround, but I'll leave this open in case there's anything I'm missing about a way to execute it with the multi-segment point source blocks!

I'd also be curious to know why SW4 reduces the number of point sources from the input number each time - in this case, it reads npts=3120, but makes only 3012.

@houjun
Copy link
Collaborator

houjun commented Apr 18, 2024

Hi @sndybing, I have only used SRF files with a single plane, so there might be a bug with multi-plane data.
Can you upload your SRF file to a Google Drive/Dropbox/Box/OneDrive location and paste a link here? Then I can download and use it to debug SW4.

@sndybing
Copy link
Author

sndybing commented Apr 19, 2024

@andersp
Copy link
Contributor

andersp commented Apr 19, 2024

Hi @sndybing. If I remember correctly, we only implemented the single block SRF case. If you need the more general case, feel free to generalize the code and submit a pull request.

@sndybing
Copy link
Author

Hi @andersp, thank you for the info! For my current use just putting everything in one block seems to be the simplest solution. If I need more in the future I'll consider looking into doing this!

@Zzzzsxb
Copy link

Zzzzsxb commented Jun 17, 2024

Hello, how do I generate an srf file?,Do I need a related program?

@houjun
Copy link
Collaborator

houjun commented Jun 17, 2024

The SRF format description: SRF format

@Zzzzsxb
Copy link

Zzzzsxb commented Jun 18, 2024

SRF 格式说明:SRF 格式
But how to randomly generate such a file based on the earthquake source location, magnitude, and fault information? I found similar programs, but they are not open source. Is there an open source program?

@sndybing
Copy link
Author

For my work, I used rupture models generated using MudPy: https://github.com/UO-Geophysics/MudPy. If you have a MudPy .rupt or .inv rupture model (made with either the forward or inverse modeling codes within MudPy), you can convert them to SRF. To convert .rupt files to SRF, there's a function in forward.py in MudPy called mudpy2srf. If you want to convert a .inv file, that function doesn't quite work right so I wrote my own - I can provide it if you would like.

@Zzzzsxb
Copy link

Zzzzsxb commented Jun 18, 2024

在我的工作中,我使用了使用 MudPy: https://github.com/UO-Geophysics/MudPy 生成的破裂模型。如果您有 MudPy .rupt 或 .inv 破裂模型(使用 MudPy 中的正向或反向建模代码创建),则可以将它们转换为 SRF。要将 .rupt 文件转换为 SRF,MudPy 中 forward.py 有一个叫做 mudpy2srf 的函数。如果你想转换一个 .inv 文件,该函数不能正常工作,所以我写了我自己的 - 如果你愿意,我可以提供它。

Thank you very much, I think your suggestion is very helpful to me, thank you for your help. I need your own code. Hahaha

@Zzzzsxb
Copy link

Zzzzsxb commented Jun 18, 2024

在我的工作中,我使用了使用 MudPy: https://github.com/UO-Geophysics/MudPy 生成的破裂模型。如果您有 MudPy .rupt 或 .inv 破裂模型(使用 MudPy 中的正向或反向建模代码创建),则可以将它们转换为 SRF。要将 .rupt 文件转换为 SRF,MudPy 中 forward.py 有一个叫做 mudpy2srf 的函数。如果你想转换一个 .inv 文件,该函数不能正常工作,所以我写了我自己的 - 如果你愿意,我可以提供它。

Hi, I only have the data of source, strike, dip, rake, and size of rupture surface. If I generate rupture srf file, what other data do I need?

@cang-er-yes
Copy link

@Zzzzsxb ,Hello, may I ask what software your SRF file was created using? I'm looking forward to hearing from you!!

@Zzzzsxb
Copy link

Zzzzsxb commented Jul 10, 2024 via email

@cang-er-yes
Copy link

cang-er-yes commented Jul 10, 2024 via email

@cang-er-yes
Copy link

cang-er-yes commented Jul 10, 2024 via email

@Zzzzsxb
Copy link

Zzzzsxb commented Jul 10, 2024 via email

@cang-er-yes
Copy link

cang-er-yes commented Jul 10, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants