geodynamics / sw4

SW4 (Seismic Waves, 4th order) implements substantial capabilities for 3-D seismic modeling, with a free surface condition on the top boundary, absorbing super-grid conditions on the far-field boundaries, and an arbitrary number of point force and/or point moment tensor source terms.
Other
126 stars 66 forks source link

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

Open sndybing opened 3 months ago

sndybing commented 3 months ago

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 commented 3 months ago

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 commented 2 months ago

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 commented 2 months ago

Hi @houjun, sure! Here's the file. Let me know if this doesn't work! https://uoregon-my.sharepoint.com/:i:/g/personal/sdybing_uoregon_edu/EVE9fnr2Ny5GtIV6mAiA598BheLd5WDcvz5OrSBGgli15w?e=TepQ1I

Thanks!

andersp commented 2 months ago

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 commented 2 months ago

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 commented 3 weeks ago

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

houjun commented 3 weeks ago

The SRF format description: SRF format

Zzzzsxb commented 3 weeks ago

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 commented 3 weeks ago

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 commented 3 weeks ago

在我的工作中,我使用了使用 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 commented 3 weeks ago

在我的工作中,我使用了使用 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 commented 1 week ago

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

Zzzzsxb commented 4 days ago

I use matlab.

 

长孙旭博 @.***

 

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2024年7月4日(星期四) 下午4:03 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [geodynamics/sw4] SW4 seems to only read first set of point sources from multi-segment SRF rupture (Issue #210)

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

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

cang-er-yes commented 4 days ago

您好!我已经收到你发的邮件!

cang-er-yes commented 4 days ago

我也是用的matlab,用得GitHub上开源的一个软件制作的震源

 

 

------------------ 原始邮件 ------------------ 发件人: "Xubo @.>; 发送时间: 2024年7月10日(星期三) 晚上7:54 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [geodynamics/sw4] SW4 seems to only read first set of point sources from multi-segment SRF rupture (Issue #210)

I use matlab.

 

长孙旭博 @.***

 

------------------ 原始邮件 ------------------ 发件人: @.>;
发送时间: 2024年7月4日(星期四) 下午4:03 收件人:
@.>;
抄送: @.>; @.>;
主题: Re: [geodynamics/sw4] SW4 seems to only read first set of point sources from multi-segment SRF rupture (Issue #210)

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

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.> — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>

Zzzzsxb commented 4 days ago

我的是srf生成器,可以看看你的程序吗,你的srf格式正确吗

长孙旭博 @.***

 

------------------ 原始邮件 ------------------ 发件人: "geodynamics/sw4" @.>; 发送时间: 2024年7月10日(星期三) 晚上7:59 @.>; @.**@.>; 主题: Re: [geodynamics/sw4] SW4 seems to only read first set of point sources from multi-segment SRF rupture (Issue #210)

我也是用的matlab,用得GitHub上开源的一个软件制作的震源

 

 

------------------ 原始邮件 ------------------ 发件人: "Xubo @.>;
发送时间: 2024年7月10日(星期三) 晚上7:54 收件人:
@.>;
抄送: @.>; @.>;
主题: Re: [geodynamics/sw4] SW4 seems to only read first set of point sources from multi-segment SRF rupture (Issue #210)

I use matlab.

 

长孙旭博
@.***

 

------------------ 原始邮件 ------------------
发件人: @.>;
发送时间: 2024年7月4日(星期四) 下午4:03
收件人:
@.>;
抄送: @.>; @.>;
主题: Re: [geodynamics/sw4] SW4 seems to only read first set of point sources from multi-segment SRF rupture (Issue #210)

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


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.>
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID:
@.> — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

cang-er-yes commented 4 days ago

经过调试后可以正常使用了,可以加一下我的qq468484524联系到我,PS不是骗子

 

 

------------------ 原始邮件 ------------------ 发件人: "Xubo @.>; 发送时间: 2024年7月10日(星期三) 晚上8:09 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [geodynamics/sw4] SW4 seems to only read first set of point sources from multi-segment SRF rupture (Issue #210)

我的是srf生成器,可以看看你的程序吗,你的srf格式正确吗

长孙旭博 @.***

 

------------------ 原始邮件 ------------------ 发件人: "geodynamics/sw4" @.>; 发送时间: 2024年7月10日(星期三) 晚上7:59 @.>; @.**@.>; 主题: Re: [geodynamics/sw4] SW4 seems to only read first set of point sources from multi-segment SRF rupture (Issue #210)

我也是用的matlab,用得GitHub上开源的一个软件制作的震源

 

 

------------------ 原始邮件 ------------------
发件人: "Xubo @.>;
发送时间: 2024年7月10日(星期三) 晚上7:54
收件人:
@.>;
抄送: @.>; @.>;
主题: Re: [geodynamics/sw4] SW4 seems to only read first set of point sources from multi-segment SRF rupture (Issue #210)

I use matlab.

 

长孙旭博
@.***

 

------------------ 原始邮件 ------------------
发件人: @.>;
发送时间: 2024年7月4日(星期四) 下午4:03
收件人:
@.>;
抄送: @.>; @.>;
主题: Re: [geodynamics/sw4] SW4 seems to only read first set of point sources from multi-segment SRF rupture (Issue #210)

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


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.>

Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID:
@.>
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.> — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>