# Forward\_image seismic wave is not good

**URL:** <https://community.geodynamics.org/t/forward-image-seismic-wave-is-not-good/817>\
**Category:** SPECFEM\
**Tags:** source-propagation\
**Created:** [September 24, 2019, 3:27am UTC](https://community.geodynamics.org/t/forward-image-seismic-wave-is-not-good/817 "2019-09-24T03:27:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![brioglade](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/brioglade/32/203_2.png) [@brioglade](https://community.geodynamics.org/u/brioglade)\
**Post date:** [September 24, 2019, 3:27am UTC](https://community.geodynamics.org/t/forward-image-seismic-wave-is-not-good/817/1 "2019-09-24T03:27:17Z")

</div>

Hi everyone,  
What’s wrong with it.The source can not propagate and the frequency dispersion is serious.

 ![forward_image0000800](https://canada1.discourse-cdn.com/flex036/uploads/geodynamics/original/1X/2140adb0bed1a4573dca08cac7c3853197d48cf0.jpeg)  
So what can I do?I try to reduce the DT size,but an error occur as follow.  
Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

Backtrace for this error:

#0 0x7f8f886fdc2d in ???

#1 0x7f8f886fce45 in ???

#2 0x7f8f883cef5f in ???

#3 0x55785ceb0c2a in compute\_forces\_viscoelastic\_

at src/specfem2D/compute\_forces\_viscoelastic.F90:570

#4 0x55785ceb2fe8 in compute\_forces\_viscoelastic\_main\_

at src/specfem2D/compute\_forces\_viscoelastic\_calling\_routine.F90:63

#5 0x55785cefa6f1 in iterate\_time\_

at src/specfem2D/iterate\_time.F90:165

#6 0x55785ce667d6 in specfem2d

at src/specfem2D/specfem2D.F90:381

#7 0x55785ce667d6 in main

at src/specfem2D/specfem2D.F90:349

===================================================================================

= BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES

= PID 10985 RUNNING AT doughnut

= EXIT CODE: 8

= CLEANING UP REMAINING PROCESSES

= YOU CAN IGNORE THE BELOW CLEANUP MESSAGES

===================================================================================

YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Floating point exception (signal 8)

This typically refers to a problem with your application.

Please see the FAQ page for debugging suggestion.

Please help me who are familiar with it.Thanks.

---

<div class="post-metadata">

**Author:** ![pasansherath](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@pasansherath](https://community.geodynamics.org/u/pasansherath)\
**Post date:** [October 18, 2019, 8:55am UTC](https://community.geodynamics.org/t/forward-image-seismic-wave-is-not-good/817/2 "2019-10-18T08:55:55Z")

</div>

Hi brioglade,

I ran into the same error as you got. I think the issue is with DT. It needs to be equal or smaller to the recommended DT from running the solver (xspecfem2D).

First I ran the meshing tool (xmeshfem2D). After that I ran xspecfem2D until the time stepping begins. If you look at the output, it gives us the recommended DT. Try using that DT in the Par\_file.

I am not sure whether this is the right thing to do. But at least it is working for me. I am not an expert in this so, I might be wrong.

Good luck.

Cheers,  
Pasan

---

<div class="post-metadata">

**Author:** ![brioglade](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/brioglade/32/203_2.png) [@brioglade](https://community.geodynamics.org/u/brioglade)\
**Post date:** [October 25, 2019, 9:01am UTC](https://community.geodynamics.org/t/forward-image-seismic-wave-is-not-good/817/3 "2019-10-25T09:01:07Z")

</div>

Dear Pasan,  
Thank you for your reply.

1. The same elastic force source and some other same type in gmsh or cubit mesh simulation are different from what I simulate in the building\_in mesh.

2. No matter what I modify the file,can not see the time delay of S wave (behind P wave) still.

Best Regards,

Tang

Pasan Herath via Computational Infrastructure for Geodynamics [geodynamics@discoursemail.com](mailto:geodynamics@discoursemail.com) 于2019年10月18日周五 下午5:06写道：

 ![forward_image0001100.jpg](https://canada1.discourse-cdn.com/flex036/uploads/geodynamics/original/1X/6b04252eb8e46448e31adbc0add22075fe258b0f.jpeg)

 ![forward_image0001100.jpg](https://canada1.discourse-cdn.com/flex036/uploads/geodynamics/original/1X/9af7cb8f08cc88480de140aea455a9194120acee.jpeg)

---

<div class="post-metadata">

**Author:** ![pasansherath](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@pasansherath](https://community.geodynamics.org/u/pasansherath)\
**Post date:** [November 1, 2019, 9:35am UTC](https://community.geodynamics.org/t/forward-image-seismic-wave-is-not-good/817/4 "2019-11-01T09:35:52Z")

</div>

Hello Tang,

Are you using a source that could generate shear waves?

Cheers,  
Pasan

---

<div class="post-metadata">

**Author:** ![brioglade](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/brioglade/32/203_2.png) [@brioglade](https://community.geodynamics.org/u/brioglade)\
**Post date:** [November 4, 2019, 3:22am UTC](https://community.geodynamics.org/t/forward-image-seismic-wave-is-not-good/817/5 "2019-11-04T03:22:51Z")

</div>

Hi Pasansherath,  
Yes,I think that the right simulation should generate shear waves naturally.  
Now,I found that .jpg format image can not show the shear waves and the .ps format image can show it.Why?  
Which parameter should I modify that I can not see solver\_output.txt file?  
I could not find the difference of the par\_files that the solver\_output.txt file does exist in other simulation.  
Thank you.  
Cheers,  
Tang

---

<div class="post-metadata">

**Author:** ![Alexer123](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@Alexer123](https://community.geodynamics.org/u/Alexer123)\
**Post date:** [June 13, 2022, 6:27pm UTC](https://community.geodynamics.org/t/forward-image-seismic-wave-is-not-good/817/6 "2022-06-13T18:27:41Z")

</div>

Hello, Tang,

Have you fixed this problem? How to observe the shear wave?

Thank you

Teng

---

<div class="post-metadata">

**Author:** ![dpeter](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/dpeter/32/227_2.png) [@dpeter](https://community.geodynamics.org/u/dpeter)\
**Post date:** [June 17, 2022, 10:14am UTC](https://community.geodynamics.org/t/forward-image-seismic-wave-is-not-good/817/7 "2022-06-17T10:14:14Z")

</div>

Hi Teng,

regarding showing shear waves in the images, you can specify an image type in the `Par_file`:

```auto
imagetype_JPEG = 2 # display 1=displ_Ux 2=displ_Uz 3=displ_norm 4=veloc_Vx 5=veloc_Vz 6=veloc_norm 7=accel_Ax 8=accel_Az 9=accel_norm 10=pressure

```

Shear waves would show up for most of these options (in case the source produces them), only option 10 outputs pressure and therefore shear waves would not show up.

for the `output_solver.txt` file, the SPECFEM2D code by default outputs to screen. to change this behavior, you can set in the `setup/constant.h`:

```auto
! uncomment this to write to standard output (i.e. to the screen)
! integer, parameter :: IMAIN = ISTANDARD_OUTPUT
! uncomment this to write messages to a text file
  integer, parameter :: IMAIN = 42

```

after re-compilation, this will direct the code output into the file. another way which avoids the re-compilation, would be to re-direct the output when running the binary:

```auto
./bin/xspecfem2D > OUTPUT_FILES/output_solver.txt 2>&1 

```

hope this helps a bit.  
-daniel
