[cig-commits] r22521 - in seismo/3D/SPECFEM3D/trunk: doc/USER_MANUAL doc/USER_MANUAL/figures examples/layered_halfspace
liuqy at geodynamics.org
liuqy at geodynamics.org
Sat Jul 6 14:25:19 PDT 2013
Author: liuqy
Date: 2013-07-06 14:25:18 -0700 (Sat, 06 Jul 2013)
New Revision: 22521
Added:
seismo/3D/SPECFEM3D/trunk/doc/USER_MANUAL/figures/splitnodes_surfacetrace.pdf
Modified:
seismo/3D/SPECFEM3D/trunk/doc/USER_MANUAL/manual_SPECFEM3D_Cartesian.pdf
seismo/3D/SPECFEM3D/trunk/doc/USER_MANUAL/manual_SPECFEM3D_Cartesian.tex
seismo/3D/SPECFEM3D/trunk/examples/layered_halfspace/README
seismo/3D/SPECFEM3D/trunk/examples/layered_halfspace/process.sh
Log:
** Fix process.sh and update README for examples/layered_halfspace
** Update manual: fix small formatting problems; add a note on 'decompose_mesh has to be run in bin/'
Added: seismo/3D/SPECFEM3D/trunk/doc/USER_MANUAL/figures/splitnodes_surfacetrace.pdf
===================================================================
(Binary files differ)
Property changes on: seismo/3D/SPECFEM3D/trunk/doc/USER_MANUAL/figures/splitnodes_surfacetrace.pdf
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: seismo/3D/SPECFEM3D/trunk/doc/USER_MANUAL/manual_SPECFEM3D_Cartesian.pdf
===================================================================
(Binary files differ)
Modified: seismo/3D/SPECFEM3D/trunk/doc/USER_MANUAL/manual_SPECFEM3D_Cartesian.tex
===================================================================
--- seismo/3D/SPECFEM3D/trunk/doc/USER_MANUAL/manual_SPECFEM3D_Cartesian.tex 2013-07-06 18:51:16 UTC (rev 22520)
+++ seismo/3D/SPECFEM3D/trunk/doc/USER_MANUAL/manual_SPECFEM3D_Cartesian.tex 2013-07-06 21:25:18 UTC (rev 22521)
@@ -775,7 +775,7 @@
After the block definitions are done, you export the mesh using the
script \texttt{cubit2specfem3d.py} provided in each of the example
-directories. If the export was successful, you should find the following
+directories (linked to the common script \texttt{CUBIT/cubit2specfem3d.py}). If the export was successful, you should find the following
files in a subdirectory \texttt{MESH/}:
\begin{description}
\item [{absorbing\_cpml\_file}] \textbf{(only needed in case of C-PML absorbing
@@ -1044,7 +1044,7 @@
should be produced.
The partitioning is done in serial for now (in the next release we
-will provide a parallel version of that code), the synopsis is:
+will provide a parallel version of that code). It needs to be run in the \texttt{bin/} directory because it expects the \texttt{../DATA/Par\_file}. The synopsis is:
\begin{lyxcode}
./xdecompose\_mesh~nparts~input\_directory~output\_directory
\end{lyxcode}
@@ -1367,25 +1367,17 @@
\item [{\texttt{default}}] Uses model parameters as defined by meshing
procedures described in the previous Chapter~\ref{cha:Mesh-Generation}.
\end{description}
-\end{description}
-\end{description}
-\begin{description}
\item [{\textmd{1D~models~with~real~structure:}}] ~
\begin{description}
\item [{\texttt{1D\_prem}}] Isotropic version of the spherically symmetric
Preliminary Reference Earth Model (PREM) \citep{DzAn81}.
-
-\begin{description}
\item [{\texttt{1D\_socal}}] A standard isotropic 1D model for Southern
California.
\item [{\texttt{1D\_cascadia}}] Isotropic 1D profile for the Cascadia region.
\end{description}
-\end{description}
-\end{description}
-\begin{description}
\item [{\textmd{Fully~3D~models:}}] ~
\begin{description}
@@ -1394,7 +1386,6 @@
in directory \texttt{src/generate\_databases/}. See Chapter~\ref{cha:-Changing-the}
for a discussion on how to specify your own 3D model.
-\begin{description}
\item [{\texttt{external}}] For a user-specified isotropic model which
uses externally defined model parameters. Uses external model definitions
set up in routines located in file \texttt{model\_external\_values.f90}
@@ -2452,7 +2443,7 @@
\chapter{\label{cha:Adjoint-Simulations}Adjoint Simulations}
Adjoint simulations are generally performed for two distinct applications.
-First, they can be used for earthquake source inversions, especially
+First, they can be used in point source moment-tensor inversions, or source imaging for
earthquakes with large ruptures such as the Lander's earthquake \citep{WaHe94}.
Second, they can be used to generate finite-frequency sensitivity
kernels that are a critical part of tomographic inversions based upon
@@ -2471,11 +2462,11 @@
\section{\label{sec:Adjoint-simulation-sources}Adjoint Simulations for Sources
Only (not for the Model)}
-In the case where a specific misfit function is minimized to invert
-for the earthquake source parameters, the gradient of the misfit function
+When a specific misfit function between data and synthetics is minimized to invert
+for earthquake source parameters, the gradient of the misfit function
with respect to these source parameters can be computed by placing
-time-reversed seismograms at the receivers and using them as sources
-in an adjoint simulation, and then the value of the gradient is obtained
+time-reversed seismograms at the receivers as virtual sources
+in an adjoint simulation. Then the value of the gradient is obtained
from the adjoint seismograms recorded at the original earthquake location.
\begin{enumerate}
\item \textbf{Prepare the adjoint sources} \label{enu:Prepare-the-adjoint}
Modified: seismo/3D/SPECFEM3D/trunk/examples/layered_halfspace/README
===================================================================
--- seismo/3D/SPECFEM3D/trunk/examples/layered_halfspace/README 2013-07-06 18:51:16 UTC (rev 22520)
+++ seismo/3D/SPECFEM3D/trunk/examples/layered_halfspace/README 2013-07-06 21:25:18 UTC (rev 22521)
@@ -9,13 +9,25 @@
step-by-step tutorial:
-0. run the example in the directory homogeneous_halfspace
+0. bash run this example in the directory examples/layered_halfspace/
+
+ > ./process.sh
-1. copy three input files from examples directory into SPECFEM3D/DATA/:
+which basically goes through the following steps:
- > cd examples/layered_halfspace/DATA/
- > cp CMTSOLUTION Par_file STATIONS ../../../DATA/
+1. recompile and link all executables
+ > cd ../.. # to the root directory of the package
+ > make clean
+ > make
+ > cd -
+ > cd bin
+ > rm -f ./x*
+ > ln -s ../../../bin/xdecompose_mesh
+ > ln -s ../../../bin/xgenerate_databases
+ > ln -s ../../../bin/xspecfem3D
+ > cd ..
+Note three input files (CMTSOLUTION, Par_file, STATIONS) are already in the DATA/ directory.
2. create mesh:
@@ -29,7 +41,10 @@
(or select: "2lay_mesh_boundary_fig8-nodoubling.py" for regular mesh without doubling layer)
- this creates all the mesh files in subdirectory MESH/
+ this creates all the mesh files in subdirectory MESH/ through the cubit2specfem3d.py script, including:
+ nodes_coords_file, nummaterial_velocity_file,
+ materials_file, mesh_file,
+ absorb_surface_file_bottom/xmin/xmax/ymin/ymax, free_surface_file
- optional: check mesh quality using check_mesh_quality_CUBIT_Abaqus.f90
@@ -78,39 +93,46 @@
3. decompose mesh files:
+ - to run directly without scheduler, first enter bin/ directory (important!)
+ > ./xdecompose_mesh $NPROC ../MESH/ ../OUTPUT_FILES/DATABASES_MPI/
+
+ or copy utils/Cluster/pbs/go_decomposer_pbs.bash to example run directory:
+
- set mesh directory in go_decomposer_pbs.bash to:
- MESHDIR=examples/layered_halfspace/MESH/
+ MESHDIR=MESH/
- run decomposer:
> qsub go_decomposer_pbs.bash
- which creates mesh partitions "proc0000***_Database" in directory "DATABASES_MPI".
- you can then specify "../OUTPUT_FILES/DATABASES_MPI" in "Par_file" for your "LOCAL_PATH"
+ which creates mesh partitions "proc0000***_Database" in directory "OUTPUT_FILES/DATABASES_MPI".
+ as specified for LOCAL_PATH in DATA/Par_file
4. generate databases:
+ - to run without scheduler, enter bin/
+ > mpiexec -np 4 ./xgenerate_databases
+
+ or copy utils/Cluster/pbs/go_generate_databases_pbs.bash to example run directory:
- - compile generate_databases:
- > make xgenerate_databases
-
- submit job script:
> qsub go_generate_databases_pbs.bash
- this will create binary mesh files, e.g. "proc000***_external_mesh.bin"
- in directory OUTPUT_FILES/DATABASES_MPI/.
+ this will create binary mesh files in directory OUTPUT_FILES/DATABASES_MPI/, including:
+ proc000***_external_mesh,attenuation,ibool,rho,vp,vs,x,y,z.bin
+ if SAVE_MESH_FILES=.true., one also gets proc000***_vp,vs.vtk which can be loaded into paraview
+ to view model, mesh, and partitioning
+
(note: if execution fails due to memory shortage - most likely fails when calling routine to
create regional mesh - then try to increase process memory stack size: ulimit -s 2000000 (2GB) )
- optional: load a set of .vtk files into paraview to view model, mesh, and partitioning
- (note: must have Par_file option SAVE_MESH_FILES = .true.)
-
5. run simulation:
+ - without scheduler (in bin/)
+ > mpiexec -np 4 ./xspecfem3D
+
+ - with scheduler
+ > qsub go_solver_pbs.bash # copied from utils/Cluster/pbs
- - compile and run specfem3D:
- > make xspecfem3D
- > qsub go_solver_pbs.bash
-
note: simulation will take about 25 minutes and generate
3 sets (semd,semv,sema) of 6 seismogram files in OUTPUT_FILES,
as well as 7 timestamp****** files
Modified: seismo/3D/SPECFEM3D/trunk/examples/layered_halfspace/process.sh
===================================================================
--- seismo/3D/SPECFEM3D/trunk/examples/layered_halfspace/process.sh 2013-07-06 18:51:16 UTC (rev 22520)
+++ seismo/3D/SPECFEM3D/trunk/examples/layered_halfspace/process.sh 2013-07-06 21:25:18 UTC (rev 22521)
@@ -36,15 +36,15 @@
# compiles executables in root directory
cd ../../
make clean
-make > $currentdir/tmp.log
+make > $currentdir/compile.log
cd $currentdir
# links executables
cd bin/
rm -f ./x*
-cp ../../../bin/xdecompose_mesh ./
-cp ../../../bin/xgenerate_databases ./
-cp ../../../bin/xspecfem3D ./
+ln -s ../../../bin/xdecompose_mesh
+ln -s ../../../bin/xgenerate_databases
+ln -s ../../../bin/xspecfem3D
cd ../
# stores setup
@@ -52,18 +52,20 @@
cp DATA/CMTSOLUTION OUTPUT_FILES/
cp DATA/STATIONS OUTPUT_FILES/
-# decomposes mesh
+# decomposes mesh (THIS WILL NOT WORK UNLESS IN THE bin/ DIR!)
echo
echo " decomposing mesh..."
echo
-./bin/xdecompose_mesh $NPROC MESH/ OUTPUT_FILES/DATABASES_MPI/
+cd bin/
+./xdecompose_mesh $NPROC ../MESH/ ../OUTPUT_FILES/DATABASES_MPI/
+cd ..
# runs database generation
echo
echo " running database generation..."
echo
cd bin/
-mpirun -np $NPROC ./xgenerate_databases
+mpiexec -np $NPROC ./xgenerate_databases
cd ../
# runs simulation
@@ -71,7 +73,7 @@
echo " running solver..."
echo
cd bin/
-mpirun -np $NPROC ./xspecfem3D
+mpiexec -np $NPROC ./xspecfem3D
cd ../
echo
More information about the CIG-COMMITS
mailing list