Skip to content

Commit 1b7bc1d

Browse files
committed
updates t0 calculation (scaled by hdur only; similar to 2D & 3D version)
1 parent f7c657c commit 1b7bc1d

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/specfem3D/setup_sources_receivers.f90

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -768,36 +768,37 @@ subroutine setup_stf_constants()
768768
select case(force_stf(isource))
769769
case (0)
770770
! Gaussian source time function
771-
t0 = min(t0,1.5d0 * (tshift_src(isource) - hdur(isource)))
771+
t0 = min(t0,(tshift_src(isource) - 1.5d0 * hdur(isource)))
772772
case (1)
773773
! Ricker source time function
774-
t0 = min(t0,1.2d0 * (tshift_src(isource) - 1.0d0/hdur(isource)))
774+
t0 = min(t0,(tshift_src(isource) - 1.2d0 * 1.0d0/hdur(isource)))
775775
case (2)
776776
! Heaviside
777-
t0 = min(t0,1.5d0 * (tshift_src(isource) - hdur(isource)))
777+
t0 = min(t0,(tshift_src(isource) - 1.5d0 * hdur(isource)))
778778
case (3)
779779
! Monochromatic
780780
t0 = 0.d0
781781
case (4)
782782
! Gaussian source time function by Meschede et al. (2011)
783-
t0 = min(t0,1.5d0 * (tshift_src(isource) - hdur(isource)))
783+
t0 = min(t0,(tshift_src(isource) - 1.5d0 * hdur(isource)))
784784
case default
785785
stop 'unsupported force_stf value!'
786786
end select
787787
enddo
788-
! start time defined as positive value, will be subtracted
789-
t0 = - t0
790788
else
791789
! moment tensors
792790
if (USE_MONOCHROMATIC_CMT_SOURCE) then
793791
! (based on monochromatic functions)
794792
t0 = 0.d0
795793
else
796794
! (based on Heaviside functions)
797-
t0 = - 1.5d0 * minval( tshift_src(:) - hdur(:) )
795+
t0 = minval( tshift_src(:) - 1.5d0 * hdur(:) )
798796
endif
799797
endif
800798

799+
! start time defined as positive value, will be subtracted
800+
t0 = - t0
801+
801802
! uses an external file for source time function, which starts at time 0.0
802803
if (EXTERNAL_SOURCE_TIME_FUNCTION) then
803804
hdur(:) = 0.d0

0 commit comments

Comments
 (0)