Skip to content

Commit

Permalink
adds backward compatibility for CMT source start times (when STF_IS_U…
Browse files Browse the repository at this point in the history
…CB_HEAVISIDE is set)
  • Loading branch information
danielpeter committed Oct 31, 2024
1 parent 54d6e15 commit 63a2709
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion EXAMPLES/regional_Berkeley/DATA/CMTSOLUTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PDEW 2008 1 6 5 14 23.70 37.2200 22.6900 75.0 6.1 6.2 SOUTHERN GREECE
event name: 200801060514A
time shift: 0.000
half duration: 3.0000
half duration: 2.2000
latitude: 36.9800
longitude: 22.8700
depth: 92.3900
Expand Down
8 changes: 7 additions & 1 deletion src/specfem3D/setup_sources_receivers.f90
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,13 @@ subroutine setup_stf_constants()

! Berkeley stf
if (STF_IS_UCB_HEAVISIDE) then
t0 = 0.d0
if (USE_OLD_VERSION_FORMAT) then
! sets t0 to zero for force sources only
if (USE_FORCE_POINT_SOURCE) t0 = 0.d0
else
! sets t0 to zero for any source type
t0 = 0.d0
endif
endif

! checks if user set USER_T0 to fix simulation start time
Expand Down

0 comments on commit 63a2709

Please sign in to comment.