[cig-commits] r17914 - seismo/3D/SPECFEM3D_GLOBE/trunk
danielpeter at geodynamics.org
danielpeter at geodynamics.org
Sat Feb 19 18:15:03 PST 2011
Author: danielpeter
Date: 2011-02-19 18:15:03 -0800 (Sat, 19 Feb 2011)
New Revision: 17914
Modified:
seismo/3D/SPECFEM3D_GLOBE/trunk/combine_AVS_DX.f90
seismo/3D/SPECFEM3D_GLOBE/trunk/compute_add_sources.f90
seismo/3D/SPECFEM3D_GLOBE/trunk/compute_seismograms.f90
seismo/3D/SPECFEM3D_GLOBE/trunk/get_cmt.f90
seismo/3D/SPECFEM3D_GLOBE/trunk/get_event_info.f90
seismo/3D/SPECFEM3D_GLOBE/trunk/locate_sources.f90
seismo/3D/SPECFEM3D_GLOBE/trunk/setup_sources_receivers.f90
seismo/3D/SPECFEM3D_GLOBE/trunk/specfem3D.f90
seismo/3D/SPECFEM3D_GLOBE/trunk/write_output_SAC.f90
seismo/3D/SPECFEM3D_GLOBE/trunk/write_seismograms.f90
Log:
updates source variable names in SPECFEM3D_GLOBE/
Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/combine_AVS_DX.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/combine_AVS_DX.f90 2011-02-20 01:52:54 UTC (rev 17913)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/combine_AVS_DX.f90 2011-02-20 02:15:03 UTC (rev 17914)
@@ -70,9 +70,9 @@
double precision x_source_trgl2,y_source_trgl2,z_source_trgl2
double precision x_source_trgl3,y_source_trgl3,z_source_trgl3
double precision theta,phi,delta_trgl
- double precision sec,tshift_cmt_original !,t_cmt,hdur
+ double precision sec,min_tshift_cmt_original !,tshift_cmt,hdur
!double precision lat,long,depth
- double precision, dimension(1) :: t_cmt,hdur,lat,long,depth
+ double precision, dimension(1) :: tshift_cmt,hdur,lat,long,depth
double precision moment_tensor(6)
@@ -524,8 +524,8 @@
! get source information for frequency for number of points per lambda
print *,'reading source duration from the CMTSOLUTION file'
- call get_cmt(yr,jda,ho,mi,sec,t_cmt,hdur,lat,long,depth,moment_tensor, &
- DT,1,tshift_cmt_original)
+ call get_cmt(yr,jda,ho,mi,sec,tshift_cmt,hdur,lat,long,depth,moment_tensor, &
+ DT,1,min_tshift_cmt_original)
! set global element and point offsets to zero
iglobpointoffset = 0
@@ -1022,8 +1022,8 @@
! get source information
print *,'reading position of the source from the CMTSOLUTION file'
- call get_cmt(yr,jda,ho,mi,sec,t_cmt,hdur,lat,long,depth,moment_tensor, &
- DT,1,tshift_cmt_original)
+ call get_cmt(yr,jda,ho,mi,sec,tshift_cmt,hdur,lat,long,depth,moment_tensor, &
+ DT,1,min_tshift_cmt_original)
! convert geographic latitude lat (degrees)
! to geocentric colatitude theta (radians)
Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/compute_add_sources.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/compute_add_sources.f90 2011-02-20 01:52:54 UTC (rev 17913)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/compute_add_sources.f90 2011-02-20 02:15:03 UTC (rev 17914)
@@ -27,7 +27,7 @@
subroutine compute_add_sources(myrank,NSOURCES, &
accel_crust_mantle,sourcearrays, &
- DT,t0,t_cmt,hdur_gaussian,ibool_crust_mantle, &
+ DT,t0,tshift_cmt,hdur_gaussian,ibool_crust_mantle, &
islice_selected_source,ispec_selected_source,it, &
hdur,xi_source,eta_source,gamma_source,nu_source)
@@ -43,7 +43,7 @@
real(kind=CUSTOM_REAL), dimension(NDIM,NGLLX,NGLLY,NGLLZ,NSOURCES) :: sourcearrays
- double precision, dimension(NSOURCES) :: t_cmt,hdur_gaussian
+ double precision, dimension(NSOURCES) :: tshift_cmt,hdur_gaussian
double precision :: DT,t0
@@ -88,7 +88,7 @@
!endif
! This is the expression of a Ricker; should be changed according maybe to the Par_file.
- stf_used = FACTOR_FORCE_SOURCE * comp_source_time_function_rickr(dble(it-1)*DT-t0-t_cmt(isource),f0)
+ stf_used = FACTOR_FORCE_SOURCE * comp_source_time_function_rickr(dble(it-1)*DT-t0-tshift_cmt(isource),f0)
! we use a force in a single direction along one of the components:
! x/y/z or E/N/Z-direction would correspond to 1/2/3 = COMPONENT_FORCE_SOURCE
@@ -98,7 +98,7 @@
else
- stf = comp_source_time_function(dble(it-1)*DT-t0-t_cmt(isource),hdur_gaussian(isource))
+ stf = comp_source_time_function(dble(it-1)*DT-t0-tshift_cmt(isource),hdur_gaussian(isource))
! distinguish between single and double precision for reals
if(CUSTOM_REAL == SIZE_REAL) then
@@ -319,7 +319,7 @@
subroutine compute_add_sources_backward(myrank,NSOURCES,NSTEP, &
b_accel_crust_mantle,sourcearrays, &
- DT,t0,t_cmt,hdur_gaussian,ibool_crust_mantle, &
+ DT,t0,tshift_cmt,hdur_gaussian,ibool_crust_mantle, &
islice_selected_source,ispec_selected_source,it, &
hdur,xi_source,eta_source,gamma_source,nu_source)
@@ -335,7 +335,7 @@
real(kind=CUSTOM_REAL), dimension(NDIM,NGLLX,NGLLY,NGLLZ,NSOURCES) :: sourcearrays
- double precision, dimension(NSOURCES) :: t_cmt,hdur_gaussian
+ double precision, dimension(NSOURCES) :: tshift_cmt,hdur_gaussian
double precision :: DT,t0
@@ -370,7 +370,7 @@
! the wavefields, that is b_displ( it=1) would correspond to time (NSTEP -1 - 1)*DT - t0.
! however, we read in the backward/reconstructed wavefields at the end of the Newmark time scheme
! in the first (it=1) time loop.
-! this leads to the timing (NSTEP-(it-1)-1)*DT-t0-t_cmt for the source time function here
+! this leads to the timing (NSTEP-(it-1)-1)*DT-t0-tshift_cmt for the source time function here
if(USE_FORCE_POINT_SOURCE) then
@@ -389,7 +389,7 @@
!endif
! This is the expression of a Ricker; should be changed according maybe to the Par_file.
- stf_used = FACTOR_FORCE_SOURCE * comp_source_time_function_rickr(dble(NSTEP-it)*DT-t0-t_cmt(isource),f0)
+ stf_used = FACTOR_FORCE_SOURCE * comp_source_time_function_rickr(dble(NSTEP-it)*DT-t0-tshift_cmt(isource),f0)
! e.g. we use nu_source(3,:) here if we want a source normal to the surface.
! note: time step is now at NSTEP-it
@@ -399,7 +399,7 @@
else
! see note above: time step corresponds now to NSTEP-it
- stf = comp_source_time_function(dble(NSTEP-it)*DT-t0-t_cmt(isource),hdur_gaussian(isource))
+ stf = comp_source_time_function(dble(NSTEP-it)*DT-t0-tshift_cmt(isource),hdur_gaussian(isource))
! distinguish between single and double precision for reals
if(CUSTOM_REAL == SIZE_REAL) then
Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/compute_seismograms.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/compute_seismograms.f90 2011-02-20 01:52:54 UTC (rev 17913)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/compute_seismograms.f90 2011-02-20 02:15:03 UTC (rev 17914)
@@ -195,7 +195,7 @@
nu_source,Mxx,Myy,Mzz,Mxy,Mxz,Myz, &
hxir_store,hetar_store,hgammar_store, &
hpxir_store,hpetar_store,hpgammar_store, &
- t_cmt,hdur_gaussian,DT,t0,scale_displ, &
+ tshift_cmt,hdur_gaussian,DT,t0,scale_displ, &
hprime_xx,hprime_yy,hprime_zz, &
xix_crust_mantle,xiy_crust_mantle,xiz_crust_mantle, &
etax_crust_mantle,etay_crust_mantle,etaz_crust_mantle, &
@@ -225,7 +225,7 @@
double precision, dimension(nrec_local,NGLLY) :: hetar_store,hpetar_store
double precision, dimension(nrec_local,NGLLZ) :: hgammar_store,hpgammar_store
- double precision, dimension(NSOURCES) :: t_cmt,hdur_gaussian
+ double precision, dimension(NSOURCES) :: tshift_cmt,hdur_gaussian
double precision :: DT,t0
double precision :: scale_displ, scale_t
@@ -356,16 +356,16 @@
etax_crust_mantle(:,:,:,ispec),etay_crust_mantle(:,:,:,ispec),etaz_crust_mantle(:,:,:,ispec), &
gammax_crust_mantle(:,:,:,ispec),gammay_crust_mantle(:,:,:,ispec),gammaz_crust_mantle(:,:,:,ispec))
- stf = comp_source_time_function(dble(NSTEP-it)*DT-t0-t_cmt(irec),hdur_gaussian(irec))
+ stf = comp_source_time_function(dble(NSTEP-it)*DT-t0-tshift_cmt(irec),hdur_gaussian(irec))
stf_deltat = stf * deltat
moment_der(:,:,irec_local) = moment_der(:,:,irec_local) + eps_s(:,:) * stf_deltat
sloc_der(:,irec_local) = sloc_der(:,irec_local) + eps_m_l_s(:) * stf_deltat
scale_t = ONE/dsqrt(PI*GRAV*RHOAV)
- Kp_deltat= -1.0d0/sqrt(PI)/hdur_gaussian(irec)*exp(-((dble(NSTEP-it)*DT-t0-t_cmt(irec))/hdur_gaussian(irec))**2) &
+ Kp_deltat= -1.0d0/sqrt(PI)/hdur_gaussian(irec)*exp(-((dble(NSTEP-it)*DT-t0-tshift_cmt(irec))/hdur_gaussian(irec))**2) &
* deltat * scale_t
- Hp_deltat= (dble(NSTEP-it)*DT-t0-t_cmt(irec))/hdur_gaussian(irec)*Kp_deltat
+ Hp_deltat= (dble(NSTEP-it)*DT-t0-tshift_cmt(irec))/hdur_gaussian(irec)*Kp_deltat
stshift_der(irec_local) = stshift_der(irec_local) + eps_m_s * Kp_deltat
Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/get_cmt.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/get_cmt.f90 2011-02-20 01:52:54 UTC (rev 17913)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/get_cmt.f90 2011-02-20 02:15:03 UTC (rev 17914)
@@ -25,8 +25,8 @@
!
!=====================================================================
- subroutine get_cmt(yr,jda,ho,mi,sec,t_cmt,hdur,lat,long,depth,moment_tensor, &
- DT,NSOURCES,tshift_cmt_original)
+ subroutine get_cmt(yr,jda,ho,mi,sec,tshift_cmt,hdur,lat,long,depth,moment_tensor, &
+ DT,NSOURCES,min_tshift_cmt_original)
implicit none
@@ -38,8 +38,8 @@
double precision, intent(in) :: DT
integer, intent(out) :: yr,jda,ho,mi
- double precision, intent(out) :: sec,tshift_cmt_original
- double precision, dimension(NSOURCES), intent(out) :: t_cmt,hdur,lat,long,depth
+ double precision, intent(out) :: sec,min_tshift_cmt_original
+ double precision, dimension(NSOURCES), intent(out) :: tshift_cmt,hdur,lat,long,depth
double precision, dimension(6,NSOURCES), intent(out) :: moment_tensor
!--- local variables below
@@ -55,7 +55,7 @@
long(:) = 0.d0
depth(:) = 0.d0
t_shift(:) = 0.d0
- t_cmt(:) = 0.d0
+ tshift_cmt(:) = 0.d0
hdur(:) = 0.d0
moment_tensor(:,:) = 0.d0
yr = 0
@@ -89,7 +89,7 @@
! read time shift
read(1,"(a)") string
- !read(string(12:len_trim(string)),*) t_cmt(isource)
+ !read(string(12:len_trim(string)),*) tshift_cmt(isource)
read(string(12:len_trim(string)),*) t_shift(isource)
! read half duration
@@ -149,13 +149,13 @@
close(1)
- ! Sets t_cmt to zero to initiate the simulation!
+ ! Sets tshift_cmt to zero to initiate the simulation!
if(NSOURCES == 1)then
- t_cmt = 0.d0
- tshift_cmt_original = t_shift(1)
+ tshift_cmt = 0.d0
+ min_tshift_cmt_original = t_shift(1)
else
- t_cmt(1:NSOURCES) = t_shift(1:NSOURCES)-minval(t_shift)
- tshift_cmt_original = minval(t_shift)
+ tshift_cmt(1:NSOURCES) = t_shift(1:NSOURCES)-minval(t_shift)
+ min_tshift_cmt_original = minval(t_shift)
endif
!
Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/get_event_info.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/get_event_info.f90 2011-02-20 01:52:54 UTC (rev 17913)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/get_event_info.f90 2011-02-20 02:15:03 UTC (rev 17914)
@@ -33,11 +33,11 @@
! Also, t_shift is added as a new parameter to be written on sac headers!
! by Ebru Bozdag
- !subroutine get_event_info_parallel(myrank,yr,jda,ho,mi,sec,t_cmt, &
+ !subroutine get_event_info_parallel(myrank,yr,jda,ho,mi,sec,tshift_cmt, &
! elat,elon,depth,mb,ename,cmt_lat,cmt_lon,cmt_depth,cmt_hdur,NSOURCES)
subroutine get_event_info_parallel(myrank,yr,jda,ho,mi,sec,&
- event_name,t_cmt,t_shift, &
+ event_name,tshift_cmt,t_shift, &
elat,elon,depth,mb,cmt_lat, &
cmt_lon,cmt_depth,cmt_hdur,NSOURCES)
@@ -54,7 +54,7 @@
integer, intent(out) :: yr,jda,ho,mi
real, intent(out) :: mb
- double precision, intent(out) :: t_cmt,elat,elon,depth,cmt_lat,cmt_lon,cmt_depth,cmt_hdur,sec
+ double precision, intent(out) :: tshift_cmt,elat,elon,depth,cmt_lat,cmt_lon,cmt_depth,cmt_hdur,sec
!character(len=12), intent(out) :: ename
@@ -74,11 +74,11 @@
! get event information for SAC header on the master
if(myrank == 0) then
- call get_event_info_serial(yr,jda,ho,mi,sec,event_name,t_cmt,t_shift, &
+ call get_event_info_serial(yr,jda,ho,mi,sec,event_name,tshift_cmt,t_shift, &
elat,elon,depth,mb, &
cmt_lat,cmt_lon,cmt_depth,cmt_hdur,NSOURCES)
- !call get_event_info_serial(yr,jda,ho,mi,sec,t_cmt,elat,elon,depth,mb,region, &
+ !call get_event_info_serial(yr,jda,ho,mi,sec,tshift_cmt,elat,elon,depth,mb,region, &
! cmt_lat,cmt_lon,cmt_depth,cmt_hdur,NSOURCES,LENGTH_REGION_NAME)
! create the event name
@@ -100,7 +100,7 @@
call MPI_BCAST(NSOURCES,1,MPI_INTEGER,0,MPI_COMM_WORLD,ier)
- call MPI_BCAST(t_cmt,1,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ier)
+ call MPI_BCAST(tshift_cmt,1,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ier)
call MPI_BCAST(t_shift,1,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ier)
! event location given on first, PDE line
@@ -129,12 +129,12 @@
! Time-shifts of all sources can be read and the minimum t_shift is taken to be written in sac headers!
! by Ebru
- subroutine get_event_info_serial(yr,jda,ho,mi,sec,event_name,t_cmt,t_shift,&
+ subroutine get_event_info_serial(yr,jda,ho,mi,sec,event_name,tshift_cmt,t_shift,&
elat_pde,elon_pde,depth_pde,mb,&
cmt_lat,cmt_lon,cmt_depth,cmt_hdur,NSOURCES)
- !subroutine get_event_info_serial(yr,jda,ho,mi,sec,t_cmt,elat,elon,depth,mb,region,&
+ !subroutine get_event_info_serial(yr,jda,ho,mi,sec,tshift_cmt,elat,elon,depth,mb,region,&
! cmt_lat,cmt_lon,cmt_depth,cmt_hdur,NSOURCES,LENGTH_REGION_NAME)
implicit none
@@ -147,7 +147,7 @@
real, intent(out) :: mb
- double precision, intent(out) :: sec,t_cmt,t_shift
+ double precision, intent(out) :: sec,tshift_cmt,t_shift
double precision, intent(out) :: elat_pde,elon_pde,depth_pde,cmt_lat,cmt_lon,cmt_depth,cmt_hdur
!integer, intent(in) :: LENGTH_REGION_NAME
@@ -235,8 +235,8 @@
read(821,"(a)") string
read(821,"(a)") string
enddo
- ! sets t_cmt to zero
- t_cmt = 0.
+ ! sets tshift_cmt to zero
+ tshift_cmt = 0.
! takes first event id as event_name
event_name = e_n(1)
@@ -271,7 +271,7 @@
!
! ! read time shift
! read(821,"(a)") string
-! read(string(12:len_trim(string)),*) t_cmt
+! read(string(12:len_trim(string)),*) tshift_cmt
!
! if (NSOURCES == 1) then
!
Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/locate_sources.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/locate_sources.f90 2011-02-20 01:52:54 UTC (rev 17913)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/locate_sources.f90 2011-02-20 02:15:03 UTC (rev 17914)
@@ -32,7 +32,7 @@
subroutine locate_sources(NSOURCES,myrank,nspec,nglob,ibool,&
xstore,ystore,zstore,xigll,yigll,zigll, &
NPROCTOT,ELLIPTICITY,TOPOGRAPHY, &
- sec,t_cmt,tshift_cmt_original,yr,jda,ho,mi,theta_source,phi_source, &
+ sec,tshift_cmt,min_tshift_cmt_original,yr,jda,ho,mi,theta_source,phi_source, &
NSTEP,DT,hdur,Mxx,Myy,Mzz,Mxy,Mxz,Myz, &
islice_selected_source,ispec_selected_source, &
xi_source,eta_source,gamma_source, nu_source, &
@@ -65,8 +65,8 @@
double precision xigll(NGLLX),yigll(NGLLY),zigll(NGLLZ)
! moment-tensor source parameters
- double precision sec,tshift_cmt_original
- double precision t_cmt(NSOURCES)
+ double precision sec,min_tshift_cmt_original
+ double precision tshift_cmt(NSOURCES)
integer yr,jda,ho,mi
double precision, dimension(NSOURCES) :: theta_source,phi_source
double precision hdur(NSOURCES)
@@ -183,8 +183,8 @@
call get_value_string(OUTPUT_FILES, 'OUTPUT_FILES', 'OUTPUT_FILES')
! read all the sources
- if(myrank == 0) call get_cmt(yr,jda,ho,mi,sec,t_cmt,hdur,lat,long,depth,moment_tensor, &
- DT,NSOURCES,tshift_cmt_original)
+ if(myrank == 0) call get_cmt(yr,jda,ho,mi,sec,tshift_cmt,hdur,lat,long,depth,moment_tensor, &
+ DT,NSOURCES,min_tshift_cmt_original)
! broadcast the information read on the master to the nodes
call MPI_BCAST(yr,1,MPI_INTEGER,0,MPI_COMM_WORLD,ier)
@@ -194,14 +194,14 @@
call MPI_BCAST(sec,1,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ier)
- call MPI_BCAST(t_cmt,NSOURCES,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ier)
+ call MPI_BCAST(tshift_cmt,NSOURCES,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ier)
call MPI_BCAST(hdur,NSOURCES,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ier)
call MPI_BCAST(lat,NSOURCES,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ier)
call MPI_BCAST(long,NSOURCES,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ier)
call MPI_BCAST(depth,NSOURCES,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ier)
call MPI_BCAST(moment_tensor,6*NSOURCES,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ier)
- call MPI_BCAST(tshift_cmt_original,1,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ier)
+ call MPI_BCAST(min_tshift_cmt_original,1,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ier)
! define topology of the control element
call hex_nodes(iaddx,iaddy,iaddr)
@@ -650,7 +650,7 @@
write(IMAIN,*) ' using a source of dominant frequency ',f0
write(IMAIN,*) ' lambda_S at dominant frequency = ',3000./sqrt(3.)/f0
write(IMAIN,*) ' lambda_S at highest significant frequency = ',3000./sqrt(3.)/(2.5*f0)
- write(IMAIN,*) ' t0_ricker = ',t0_ricker,'t_cmt = ',t_cmt(isource)
+ write(IMAIN,*) ' t0_ricker = ',t0_ricker,'tshift_cmt = ',tshift_cmt(isource)
write(IMAIN,*)
write(IMAIN,*) ' half duration -> frequency: ',hdur(isource),' seconds**(-1)'
else
@@ -666,7 +666,7 @@
write(IMAIN,*)
write(IMAIN,*) ' half duration: ',hdur(isource),' seconds'
endif
- write(IMAIN,*) ' time shift: ',t_cmt(isource),' seconds'
+ write(IMAIN,*) ' time shift: ',tshift_cmt(isource),' seconds'
! get latitude, longitude and depth of the source that will be used
call xyz_2_rthetaphi_dble(x_found_source(isource_in_this_subset),y_found_source(isource_in_this_subset), &
@@ -737,12 +737,12 @@
! define t0 as the earliest start time
! note: this calculation here is only used for outputting the plot_source_time_function file
! (see setup_sources_receivers.f90)
- t0 = - 1.5d0*minval( t_cmt(:) - hdur(:) )
- if( USE_FORCE_POINT_SOURCE ) t0 = - 1.2d0 * minval(t_cmt(:) - 1.0d0/hdur(:))
+ t0 = - 1.5d0*minval( tshift_cmt(:) - hdur(:) )
+ if( USE_FORCE_POINT_SOURCE ) t0 = - 1.2d0 * minval(tshift_cmt(:) - 1.0d0/hdur(:))
t_cmt_used(:) = t_cmt_used(:)
if( USER_T0 > 0.d0 ) then
- if( t0 <= USER_T0 + tshift_cmt_original ) then
- t_cmt_used(:) = t_cmt(:) + tshift_cmt_original
+ if( t0 <= USER_T0 + min_tshift_cmt_original ) then
+ t_cmt_used(:) = tshift_cmt(:) + min_tshift_cmt_original
t0 = USER_T0
endif
endif
Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/setup_sources_receivers.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/setup_sources_receivers.f90 2011-02-20 01:52:54 UTC (rev 17913)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/setup_sources_receivers.f90 2011-02-20 02:15:03 UTC (rev 17914)
@@ -28,7 +28,7 @@
subroutine setup_sources_receivers(NSOURCES,myrank,ibool_crust_mantle, &
xstore_crust_mantle,ystore_crust_mantle,zstore_crust_mantle, &
xigll,yigll,zigll,TOPOGRAPHY, &
- sec,t_cmt,theta_source,phi_source, &
+ sec,tshift_cmt,theta_source,phi_source, &
NSTEP,DT,hdur,hdur_gaussian,t0,Mxx,Myy,Mzz,Mxy,Mxz,Myz, &
islice_selected_source,ispec_selected_source, &
xi_source,eta_source,gamma_source,nu_source, &
@@ -59,9 +59,9 @@
logical TOPOGRAPHY
- double precision sec,DT,t0,tshift_cmt_original
+ double precision sec,DT,t0,min_tshift_cmt_original
- double precision, dimension(NSOURCES) :: t_cmt,hdur,hdur_gaussian
+ double precision, dimension(NSOURCES) :: tshift_cmt,hdur,hdur_gaussian
double precision, dimension(NSOURCES) :: theta_source,phi_source
double precision, dimension(NSOURCES) :: Mxx,Myy,Mzz,Mxy,Mxz,Myz
double precision, dimension(NSOURCES) :: xi_source,eta_source,gamma_source,nu_source
@@ -129,14 +129,14 @@
call locate_sources(NSOURCES,myrank,NSPEC_CRUST_MANTLE,NGLOB_CRUST_MANTLE,ibool_crust_mantle, &
xstore_crust_mantle,ystore_crust_mantle,zstore_crust_mantle, &
xigll,yigll,zigll,NPROCTOT_VAL,ELLIPTICITY_VAL,TOPOGRAPHY, &
- sec,t_cmt,tshift_cmt_original,yr,jda,ho,mi,theta_source,phi_source, &
+ sec,tshift_cmt,min_tshift_cmt_original,yr,jda,ho,mi,theta_source,phi_source, &
NSTEP,DT,hdur,Mxx,Myy,Mzz,Mxy,Mxz,Myz, &
islice_selected_source,ispec_selected_source, &
xi_source,eta_source,gamma_source, nu_source, &
rspl,espl,espl2,nspl,ibathy_topo,NEX_XI,PRINT_SOURCE_TIME_FUNCTION, &
LOCAL_PATH,SIMULATION_TYPE)
- if(abs(minval(t_cmt)) > TINYVAL) call exit_MPI(myrank,'one t_cmt must be zero, others must be positive')
+ if(abs(minval(tshift_cmt)) > TINYVAL) call exit_MPI(myrank,'one tshift_cmt must be zero, others must be positive')
! filter source time function by Gaussian with hdur = HDUR_MOVIE when outputing movies or shakemaps
if (MOVIE_SURFACE .or. MOVIE_VOLUME ) then
@@ -152,7 +152,7 @@
hdur_gaussian(:) = hdur(:)/SOURCE_DECAY_MIMIC_TRIANGLE
! define t0 as the earliest start time
- t0 = - 1.5d0*minval( t_cmt(:) - hdur(:) )
+ t0 = - 1.5d0*minval( tshift_cmt(:) - hdur(:) )
! point force sources will start depending on the frequency given by hdur
if( USE_FORCE_POINT_SOURCE ) then
@@ -160,7 +160,7 @@
! thus the main period is 1/hdur.
! also, these sources use a Ricker source time function instead of a gaussian.
! for a Ricker source time function, a start time ~1.2 * main_period is a good choice
- t0 = - 1.2d0 * minval(t_cmt(:) - 1.0d0/hdur(:))
+ t0 = - 1.2d0 * minval(tshift_cmt(:) - 1.0d0/hdur(:))
endif
! checks if user set USER_T0 to fix simulation start time
@@ -173,17 +173,17 @@
! notifies user
if( myrank == 0 ) then
write(IMAIN,*) 'USER_T0: ',USER_T0
- write(IMAIN,*) 't0: ',t0,'tshift_cmt_original: ',tshift_cmt_original
+ write(IMAIN,*) 't0: ',t0,'min_tshift_cmt_original: ',min_tshift_cmt_original
write(IMAIN,*)
endif
! checks if automatically set t0 is too small
- ! note: tshift_cmt_original can be a positive or negative time shift (minimum from all tshift)
- if( t0 <= USER_T0 + tshift_cmt_original ) then
- ! by default, t_cmt(:) holds relative time shifts with a minimum time shift set to zero
+ ! note: min_tshift_cmt_original can be a positive or negative time shift (minimum from all tshift)
+ if( t0 <= USER_T0 + min_tshift_cmt_original ) then
+ ! by default, tshift_cmt(:) holds relative time shifts with a minimum time shift set to zero
! re-adds (minimum) original time shift such that sources will kick in
! according to their absolute time shift
- t_cmt(:) = t_cmt(:) + tshift_cmt_original
+ tshift_cmt(:) = tshift_cmt(:) + min_tshift_cmt_original
! sets new simulation start time such that
! simulation starts at t = - t0 = - USER_T0
@@ -200,7 +200,7 @@
if( myrank == 0 ) then
write(IMAIN,*) 'error: USER_T0 is too small'
write(IMAIN,*) ' must make one of three adjustements:'
- write(IMAIN,*) ' - increase USER_T0 to be at least: ',t0-tshift_cmt_original
+ write(IMAIN,*) ' - increase USER_T0 to be at least: ',t0-min_tshift_cmt_original
write(IMAIN,*) ' - decrease time shift in CMTSOLUTION file'
write(IMAIN,*) ' - decrease hdur in CMTSOLUTION file'
endif
Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/specfem3D.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/specfem3D.f90 2011-02-20 01:52:54 UTC (rev 17913)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/specfem3D.f90 2011-02-20 02:15:03 UTC (rev 17914)
@@ -659,7 +659,7 @@
double precision sec
double precision, dimension(:), allocatable :: Mxx,Myy,Mzz,Mxy,Mxz,Myz
double precision, dimension(:), allocatable :: xi_source,eta_source,gamma_source
- double precision, dimension(:), allocatable :: t_cmt,hdur,hdur_gaussian
+ double precision, dimension(:), allocatable :: tshift_cmt,hdur,hdur_gaussian
double precision, dimension(:), allocatable :: theta_source,phi_source
double precision, external :: comp_source_time_function
double precision t0
@@ -1159,7 +1159,7 @@
allocate(xi_source(NSOURCES))
allocate(eta_source(NSOURCES))
allocate(gamma_source(NSOURCES))
- allocate(t_cmt(NSOURCES))
+ allocate(tshift_cmt(NSOURCES))
allocate(hdur(NSOURCES))
allocate(hdur_gaussian(NSOURCES))
allocate(theta_source(NSOURCES))
@@ -1184,7 +1184,7 @@
call setup_sources_receivers(NSOURCES,myrank,ibool_crust_mantle, &
xstore_crust_mantle,ystore_crust_mantle,zstore_crust_mantle, &
xigll,yigll,zigll,TOPOGRAPHY, &
- sec,t_cmt,theta_source,phi_source, &
+ sec,tshift_cmt,theta_source,phi_source, &
NSTEP,DT,hdur,hdur_gaussian,t0,Mxx,Myy,Mzz,Mxy,Mxz,Myz, &
islice_selected_source,ispec_selected_source, &
xi_source,eta_source,gamma_source,nu_source, &
@@ -2493,7 +2493,7 @@
if (SIMULATION_TYPE == 1) &
call compute_add_sources(myrank,NSOURCES, &
accel_crust_mantle,sourcearrays, &
- DT,t0,t_cmt,hdur_gaussian,ibool_crust_mantle, &
+ DT,t0,tshift_cmt,hdur_gaussian,ibool_crust_mantle, &
islice_selected_source,ispec_selected_source,it, &
hdur,xi_source,eta_source,gamma_source,nu_source)
@@ -2514,7 +2514,7 @@
if (SIMULATION_TYPE == 3) &
call compute_add_sources_backward(myrank,NSOURCES,NSTEP, &
b_accel_crust_mantle,sourcearrays, &
- DT,t0,t_cmt,hdur_gaussian,ibool_crust_mantle, &
+ DT,t0,tshift_cmt,hdur_gaussian,ibool_crust_mantle, &
islice_selected_source,ispec_selected_source,it, &
hdur,xi_source,eta_source,gamma_source,nu_source)
@@ -2936,7 +2936,7 @@
nu_source,Mxx,Myy,Mzz,Mxy,Mxz,Myz, &
hxir_store,hetar_store,hgammar_store, &
hpxir_store,hpetar_store,hpgammar_store, &
- t_cmt,hdur_gaussian,DT,t0,scale_displ, &
+ tshift_cmt,hdur_gaussian,DT,t0,scale_displ, &
hprime_xx,hprime_yy,hprime_zz, &
xix_crust_mantle,xiy_crust_mantle,xiz_crust_mantle, &
etax_crust_mantle,etay_crust_mantle,etaz_crust_mantle, &
Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/write_output_SAC.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/write_output_SAC.f90 2011-02-20 01:52:54 UTC (rev 17913)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/write_output_SAC.f90 2011-02-20 02:15:03 UTC (rev 17914)
@@ -28,7 +28,7 @@
subroutine write_output_SAC(seismogram_tmp,irec, &
station_name,network_name,stlat,stlon,stele,stbur,nrec, &
ANGULAR_WIDTH_XI_IN_DEGREES,NEX_XI,DT,hdur,it_end, &
- yr,jda,ho,mi,sec,t_cmt,t_shift,&
+ yr,jda,ho,mi,sec,tshift_cmt,t_shift,&
elat,elon,depth,event_name,cmt_lat,cmt_lon,cmt_depth,cmt_hdur, &
OUTPUT_FILES, &
OUTPUT_SEISMOS_SAC_ALPHANUM,OUTPUT_SEISMOS_SAC_BINARY, &
@@ -63,7 +63,7 @@
character(len=256) sisname
character(len=150) OUTPUT_FILES
- double precision t_cmt,t_shift,elat,elon,depth
+ double precision tshift_cmt,t_shift,elat,elon,depth
double precision cmt_lat,cmt_lon,cmt_depth,cmt_hdur
double precision, dimension(nrec) :: stlat,stlon,stele,stbur
integer yr,jda,ho,mi
@@ -171,7 +171,7 @@
SCALE_F= 1000000000 ! factor for y-value, set to 10e9, so that values are in nm
ODELTA = undef ! increment from delta
- B = sngl((seismo_offset)*DT-hdur + t_cmt) ! [REQUIRED]
+ B = sngl((seismo_offset)*DT-hdur + tshift_cmt) ! [REQUIRED]
E = BYSAC ! [REQUIRED]
O = 0 !
A = undef !###
Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/write_seismograms.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/write_seismograms.f90 2011-02-20 01:52:54 UTC (rev 17913)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/write_seismograms.f90 2011-02-20 02:15:03 UTC (rev 17914)
@@ -29,7 +29,7 @@
subroutine write_seismograms(myrank,seismograms,number_receiver_global,station_name, &
network_name,stlat,stlon,stele,stbur, &
nrec,nrec_local,ANGULAR_WIDTH_XI_IN_DEGREES,NEX_XI,DT,hdur,it_end, &
- yr,jda,ho,mi,sec,t_cmt,t_shift, &
+ yr,jda,ho,mi,sec,tshift_cmt,t_shift, &
elat,elon,depth,event_name,cmt_lat,cmt_lon, &
cmt_depth,cmt_hdur,NPROCTOT, &
OUTPUT_SEISMOS_ASCII_TEXT,OUTPUT_SEISMOS_SAC_ALPHANUM, &
@@ -57,7 +57,7 @@
character(len=MAX_LENGTH_STATION_NAME), dimension(nrec) :: station_name
character(len=MAX_LENGTH_NETWORK_NAME), dimension(nrec) :: network_name
- double precision t_cmt,t_shift,elat,elon,depth
+ double precision tshift_cmt,t_shift,elat,elon,depth
double precision cmt_lat,cmt_lon,cmt_depth,cmt_hdur
double precision, dimension(nrec) :: stlat,stlon,stele,stbur
integer yr,jda,ho,mi
@@ -145,7 +145,7 @@
call write_one_seismogram(one_seismogram,irec, &
station_name,network_name,stlat,stlon,stele,stbur,nrec, &
ANGULAR_WIDTH_XI_IN_DEGREES,NEX_XI,DT,hdur,it_end, &
- yr,jda,ho,mi,sec,t_cmt,t_shift, &
+ yr,jda,ho,mi,sec,tshift_cmt,t_shift, &
elat,elon,depth,event_name,cmt_lat, &
cmt_lon,cmt_depth,cmt_hdur,OUTPUT_FILES, &
OUTPUT_SEISMOS_ASCII_TEXT,OUTPUT_SEISMOS_SAC_ALPHANUM, &
@@ -229,7 +229,7 @@
call write_one_seismogram(one_seismogram,irec, &
station_name,network_name,stlat,stlon,stele,stbur,nrec, &
ANGULAR_WIDTH_XI_IN_DEGREES,NEX_XI,DT,hdur,it_end, &
- yr,jda,ho,mi,sec,t_cmt,t_shift, &
+ yr,jda,ho,mi,sec,tshift_cmt,t_shift, &
elat,elon,depth,event_name,cmt_lat, &
cmt_lon,cmt_depth,cmt_hdur,OUTPUT_FILES, &
OUTPUT_SEISMOS_ASCII_TEXT,OUTPUT_SEISMOS_SAC_ALPHANUM, &
@@ -282,7 +282,7 @@
subroutine write_one_seismogram(one_seismogram,irec, &
station_name,network_name,stlat,stlon,stele,stbur,nrec, &
ANGULAR_WIDTH_XI_IN_DEGREES,NEX_XI,DT,hdur,it_end, &
- yr,jda,ho,mi,sec,t_cmt,t_shift,&
+ yr,jda,ho,mi,sec,tshift_cmt,t_shift,&
elat,elon,depth,event_name,cmt_lat,cmt_lon,cmt_depth,cmt_hdur, &
OUTPUT_FILES, &
OUTPUT_SEISMOS_ASCII_TEXT,OUTPUT_SEISMOS_SAC_ALPHANUM, &
@@ -316,7 +316,7 @@
character(len=150) OUTPUT_FILES
! section added for SAC
- double precision t_cmt,t_shift,elat,elon,depth
+ double precision tshift_cmt,t_shift,elat,elon,depth
double precision cmt_lat,cmt_lon,cmt_depth,cmt_hdur
double precision, dimension(nrec) :: stlat,stlon,stele,stbur
@@ -446,7 +446,7 @@
call write_output_SAC(seismogram_tmp,irec, &
station_name,network_name,stlat,stlon,stele,stbur,nrec, &
ANGULAR_WIDTH_XI_IN_DEGREES,NEX_XI,DT,hdur,it_end, &
- yr,jda,ho,mi,sec,t_cmt,t_shift,&
+ yr,jda,ho,mi,sec,tshift_cmt,t_shift,&
elat,elon,depth,event_name,cmt_lat,cmt_lon,cmt_depth,cmt_hdur, &
OUTPUT_FILES, &
OUTPUT_SEISMOS_SAC_ALPHANUM,OUTPUT_SEISMOS_SAC_BINARY, &
More information about the CIG-COMMITS
mailing list