@@ -240,34 +240,36 @@ subroutine get_force(tshift_src,hdur,lat,long,depth,DT,NSOURCES, &
240240
241241 close (IIN)
242242
243- ! Sets tshift_force to zero to initiate the simulation!
244- if (NSOURCES == 1 ) then
245- min_tshift_src_original = t_shift(1 )
246- tshift_src(1 ) = 0.d0
247- else
248- min_tshift_src_original = minval (t_shift)
249- tshift_src(1 :NSOURCES) = t_shift(1 :NSOURCES) - min_tshift_src_original
250- endif
251-
243+ ! checks half-duration
252244 do isource = 1 ,NSOURCES
253- ! checks half-duration
254245 ! half-duration is the dominant frequency of the source
255- ! point forces use a Ricker source time function
246+ ! for point forces using a Ricker source time function
256247 ! null half-duration indicates a very low-frequency source
257- ! (see constants.h: TINYVAL = 1.d-9 )
258248 if (hdur(isource) < TINYVAL) hdur(isource) = TINYVAL
249+ enddo
259250
260- ! check (tilted) force source direction vector
251+ ! check (tilted) force source direction vector
252+ do isource = 1 ,NSOURCES
261253 length = sqrt ( comp_dir_vect_source_E(isource)** 2 &
262254 + comp_dir_vect_source_N(isource)** 2 &
263255 + comp_dir_vect_source_Z_UP(isource)** 2 )
256+
264257 if (length < TINYVAL) then
265258 print * , ' normal length: ' , length
266259 print * , ' isource: ' ,isource
267260 stop ' Error set force point normal length, make sure all forces have a non-zero direction vector'
268261 endif
269262 enddo
270263
264+ ! Sets tshift_force to zero to initiate the simulation!
265+ if (NSOURCES == 1 ) then
266+ min_tshift_src_original = t_shift(1 )
267+ tshift_src(1 ) = 0.d0
268+ else
269+ min_tshift_src_original = minval (t_shift)
270+ tshift_src(1 :NSOURCES) = t_shift(1 :NSOURCES) - min_tshift_src_original
271+ endif
272+
271273 ! scale and non-dimensionalize the factor_force_source
272274 ! factor_force_source in FORCESOLUTION file is in Newton
273275 ! 1 Newton is 1 kg * 1 m / (1 second)^2
0 commit comments