[cig-commits] r20451 - in seismo/3D/SPECFEM3D/trunk: examples/homogeneous_halfspace utils/adjoint_sources/traveltime
danielpeter at geodynamics.org
danielpeter at geodynamics.org
Mon Jul 2 14:53:45 PDT 2012
Author: danielpeter
Date: 2012-07-02 14:53:45 -0700 (Mon, 02 Jul 2012)
New Revision: 20451
Added:
seismo/3D/SPECFEM3D/trunk/examples/homogeneous_halfspace/alpha_kernel.png
Modified:
seismo/3D/SPECFEM3D/trunk/examples/homogeneous_halfspace/README_kernel
seismo/3D/SPECFEM3D/trunk/utils/adjoint_sources/traveltime/create_adjsrc_traveltime.f90
Log:
updates kernel example in example/homogeneous_halfspace/
Modified: seismo/3D/SPECFEM3D/trunk/examples/homogeneous_halfspace/README_kernel
===================================================================
--- seismo/3D/SPECFEM3D/trunk/examples/homogeneous_halfspace/README_kernel 2012-07-02 19:15:41 UTC (rev 20450)
+++ seismo/3D/SPECFEM3D/trunk/examples/homogeneous_halfspace/README_kernel 2012-07-02 21:53:45 UTC (rev 20451)
@@ -35,8 +35,8 @@
you should have now the necessary seismograms in directory in_out_files/OUTPUT_FILES/:
...
- in_out_files/OUTPUT_FILES/X20.BXE.semd
- in_out_files/OUTPUT_FILES/X20.BXN.semd
+ in_out_files/OUTPUT_FILES/X20.BXX.semd
+ in_out_files/OUTPUT_FILES/X20.BXY.semd
in_out_files/OUTPUT_FILES/X20.BXZ.semd
...
@@ -48,11 +48,14 @@
> make
- specify which receiver station becomes an adjoint source,
- e.g. using the seismograms from station 20, and create the
+ e.g. using the seismograms from station X20, and create the
corresponding adjoint source files:
> cd /SPECFEM3D
- > ./utils/adjoint_sources/traveltime/xcreate_adjsrc_traveltime 10. 25. 0 in_out_files/OUTPUT_FILES/X20.DB.BX*.semd
+ > ./utils/adjoint_sources/traveltime/xcreate_adjsrc_traveltime 10. 25. 3 in_out_files/OUTPUT_FILES/X20.DB.BX*.semd
+ note: the traveltime adjoint source above uses the signal which arrives
+ within a time window between 10 - 25 seconds and on the Z-component only.
+
- make designated directory for adjoint sources:
> mkdir in_out_files/SEM/
> mv in_out_files/OUTPUT_FILES/*.adj in_out_files/SEM/
@@ -60,8 +63,8 @@
> rename .semd.adj .adj *.adj
this should create the files:
- in_out_files/SEM/X20.DB.BXE.adj
- in_out_files/SEM/X20.DB.BXN.adj
+ in_out_files/SEM/X20.DB.BXX.adj
+ in_out_files/SEM/X20.DB.BXY.adj
in_out_files/SEM/X20.DB.BXZ.adj
- setup adjoint stations file STATIONS_ADJOINT containing the receiver stations locations
@@ -98,11 +101,11 @@
> cd /SPECFEM3D
> make xcombine_vol_data
> cd bin/
- > ./xcombine_vol_data 0 3 kappa_kernel ../in_out_files/DATABASES_MPI/ ../in_out_files/OUTPUT_FILES/ 1
+ > ./xcombine_vol_data 0 3 alpha_kernel ../in_out_files/DATABASES_MPI/ ../in_out_files/OUTPUT_FILES/ 1
where we use the partitions with id 0 to 3 to include all 4 processor partitions.
- By default, this will produce the vtk file /SPECFEM3D/in_out_files/OUTPUT_FILES/kappa_kernel.vtk
- This file can be visualized using Paraview.
+ By default, this will produce the vtk file /SPECFEM3D/in_out_files/OUTPUT_FILES/alpha_kernel.vtk
+ This file can be visualized using Paraview (see image alpha_kernel.png for reference).
OPTIONAL:
To convert the mesh format to VTK, you can use utils/Visualization/Paraview/mesh2vtu:
@@ -111,12 +114,8 @@
> make
the modify the paths to your mesh2vtu installation in the utils/Visualization/Paraview/mesh2vtu.pl file,
and run:
- > mesh2vtu.pl -i in_out_files/OUTPUT_FILES/kappa_kernel.mesh -o in_out_files/OUTPUT_FILES/kappa_kernel.vtu
+ > mesh2vtu.pl -i in_out_files/OUTPUT_FILES/alpha_kernel.mesh -o in_out_files/OUTPUT_FILES/alpha_kernel.vtu
which creates the *.vtu file: Paraview -> Menu File -> Open ...
- (and choose the kappa_kernel.vtu)
+ (and choose the alpha_kernel.vtu)
-
-
-
-
Added: seismo/3D/SPECFEM3D/trunk/examples/homogeneous_halfspace/alpha_kernel.png
===================================================================
(Binary files differ)
Property changes on: seismo/3D/SPECFEM3D/trunk/examples/homogeneous_halfspace/alpha_kernel.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: seismo/3D/SPECFEM3D/trunk/utils/adjoint_sources/traveltime/create_adjsrc_traveltime.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/utils/adjoint_sources/traveltime/create_adjsrc_traveltime.f90 2012-07-02 19:15:41 UTC (rev 20450)
+++ seismo/3D/SPECFEM3D/trunk/utils/adjoint_sources/traveltime/create_adjsrc_traveltime.f90 2012-07-02 21:53:45 UTC (rev 20451)
@@ -81,6 +81,7 @@
print *, ' '
! reads seismograms (ascii format)
+ data(:,:) = 0.0
do i = 1, 3
filename = trim(file(i))
print *, 'reading asc file '//trim(filename)//' ...'
@@ -131,6 +132,7 @@
if( i == i1 ) close(44)
! calculates velocity (by finite-differences)
+ out(:) = 0.0
do itime = 2, nstep-1
out(itime) = (data(i,itime+1) - data(i,itime-1)) / (2 * dt)
enddo
@@ -143,11 +145,12 @@
if (ifile /= 0 .and. ifile /= i) norm = 0.0
! adjoint source
+ adj(:) = 0.0
if (abs(norm) > EPS) then
adj(1:nstep) = - out(1:nstep) * tw(1:nstep) / norm
else
print *, 'norm < EPS for file '//trim(file(i))
- adj(:) = 0.
+ adj(:) = 0.0
endif
data(i,:) = adj(:)
More information about the CIG-COMMITS
mailing list