From 63a270955516931413738a582922ce0f2e248875 Mon Sep 17 00:00:00 2001 From: Daniel Peter Date: Thu, 31 Oct 2024 16:38:04 +0100 Subject: [PATCH] adds backward compatibility for CMT source start times (when STF_IS_UCB_HEAVISIDE is set) --- EXAMPLES/regional_Berkeley/DATA/CMTSOLUTION | 2 +- src/specfem3D/setup_sources_receivers.f90 | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/EXAMPLES/regional_Berkeley/DATA/CMTSOLUTION b/EXAMPLES/regional_Berkeley/DATA/CMTSOLUTION index ac8f2f20a..33c0e1982 100644 --- a/EXAMPLES/regional_Berkeley/DATA/CMTSOLUTION +++ b/EXAMPLES/regional_Berkeley/DATA/CMTSOLUTION @@ -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 diff --git a/src/specfem3D/setup_sources_receivers.f90 b/src/specfem3D/setup_sources_receivers.f90 index 9af62a78b..eff03f7c3 100644 --- a/src/specfem3D/setup_sources_receivers.f90 +++ b/src/specfem3D/setup_sources_receivers.f90 @@ -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