[cig-commits] r19452 - in seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES: . init_plane
xie.zhinan at geodynamics.org
xie.zhinan at geodynamics.org
Tue Jan 24 10:50:05 PST 2012
Author: xie.zhinan
Date: 2012-01-24 10:50:05 -0800 (Tue, 24 Jan 2012)
New Revision: 19452
Added:
seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/
seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/Par_file_Slave
seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/Par_file_Slave.before_update_to_r19xxx
seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/Par_file_Slave_for
seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/Par_file_Slave_for.before_update_to_r19xxx
seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/Par_file_Slave_kernel
seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/Par_file_Slave_kernel.before_update_to_r19xxx
seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/SOURCE_Slave
seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/adj.sh
seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/array_geo.m
seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/interfaces_Slave.dat
seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/isochron.m
seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/plot_field.m
seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/plot_kernel.m
seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/process.sh
seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/readme
seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/run.bash
seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/run_for_ker.sh
seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/select_adj.m
seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/set_source.bash
seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/stack_kernel.m
seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/ttplane.m
Log:
add init_plane example
Added: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/Par_file_Slave
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/Par_file_Slave (rev 0)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/Par_file_Slave 2012-01-24 18:50:05 UTC (rev 19452)
@@ -0,0 +1,136 @@
+# title of job r19201
+title = Slave Craton
+
+# forward or adjoint simulation
+SIMULATION_TYPE = 1 # 1 = forward, 2 = adjoint + kernels
+NOISE_TOMOGRAPHY = 0 # 0 = earthquake simulation, 1/2/3 = noise simulation
+SAVE_FORWARD = .false. # save the last frame, needed for adjoint simulation
+
+# parameters concerning partitioning
+nproc = 1 # number of processes
+partitioning_method = 3 # SCOTCH = 3, ascending order (very bad idea) = 1
+PERFORM_CUTHILL_MCKEE = .true. # perform inverse Cuthill-McKee (1969) optimization/permutation for mesh numbering
+
+ngnod = 4 # number of control nodes per element (4 or 9)
+initialfield = .true. # use a plane wave as source or not
+add_Bielak_conditions = .false. # add Bielak conditions or not if initial plane wave
+assign_external_model = .false. # define external earth model or not
+READ_EXTERNAL_SEP_FILE = .false. # Read external SEP file from DATA/model_velocity.dat_input, or use routine
+ATTENUATION_VISCOELASTIC_SOLID = .false. # turn attenuation (viscoelasticity) on or off for non-poroelastic solid parts of the model
+ATTENUATION_PORO_FLUID_PART = .false. # turn viscous attenuation on or off for the fluid part of poroelastic parts of the model
+Q0 = 1 # quality factor for viscous attenuation
+freq0 = 10 # frequency for viscous attenuation
+p_sv = .true. # set the type of calculation (P-SV or SH/membrane waves)
+
+# time step parameters
+nt = 6000 # total number of time steps
+deltat = 0.01 # duration of a time step
+USER_T0 = 0.0d0 # use this t0 as earliest starting time rather than the automatically calculated one
+time_stepping_scheme = 1 # 1 = Newmark (2nd order), 2 = LDDRK4-6 (4th-order 6-stage low storage Runge-Kutta), 3 = classical 4th-order 4-stage Runge-Kutta
+
+# source parameters
+NSOURCES = 1 # number of sources [source info read in CMTSOLUTION file]
+force_normal_to_surface = .false. # angleforce normal to surface (external mesh and curve file needed)
+
+# constants for attenuation
+N_SLS = 2 # number of standard linear solids for attenuation
+f0_attenuation = 5.196152422706633 # (Hz) relevant only if source is a Dirac or a Heaviside, else it is f0
+
+# eceiver line parameters for seismograms
+seismotype = 1 # record 1=displ 2=veloc 3=accel 4=pressure
+generate_STATIONS = .true. # creates a STATION file in ./DATA
+nreceiversets = 1 # number of receiver sets
+anglerec = 0.d0 # angle to rotate components at receivers
+rec_normal_to_surface = .false. # base anglerec normal to surface (external mesh and curve file needed)
+SU_FORMAT = .false. # output seismograms in Seismic Unix format (adjoint traces will be read in the same format)
+
+# first receiver set
+nrec = 30
+xdeb = 500000.
+zdeb = 250000. # first receiver z in meters
+xfin = 100000.
+zfin = 250000. # last receiver z in meters (ignored if onlyone receiver)
+enreg_surf_same_vertical = .false. # receivers inside the medium or at the surface
+
+# display parameters
+NTSTEP_BETWEEN_OUTPUT_INFO = 200 # display frequency in time steps
+output_postscript_snapshot = .true. # output Postscript snapshot of the results
+output_color_image = .true. # output color image of the results
+imagetype = 1 # display 1=displ 2=veloc 3=accel 4=pressure
+cutsnaps = 5. # minimum amplitude in % for snapshots
+meshvect = .true. # display mesh on vector plots or not
+modelvect = .false. # display velocity model on vector plots
+boundvect = .true. # display boundary conditions on plots
+interpol = .true. # interpolation of the display or not
+pointsdisp = 6 # points for interpolation of display (set to 1 for lower-left corner only)
+subsamp_postscript = 1 # subsampling of color snapshots
+factor_subsample_image = 1 # factor to subsample color images output by the code (useful for very large models)
+POWER_DISPLAY_COLOR = 0.30d0 # non linear display to enhance small amplitudes in color images
+DRAW_WATER_CONSTANT_BLUE_IN_JPG = .true. # display acoustic layers as constant blue in JPEG images, because they likely correspond to water
+sizemax_arrows = 1.d0 # maximum size of arrows on vector plots in cm
+US_LETTER = .false. # US letter paper or European A4
+USE_SNAPSHOT_NUMBER_IN_FILENAME = .false. # use snapshot number in the file name of JPEG color snapshots instead of the time step
+gnuplot = .false. # generate a GNUPLOT file for the grid
+output_grid = .false. # save the grid in a text file or not
+output_energy = .false. # compute and output acoustic and elastic energy (slows down the code significantly)
+output_wavefield_snapshot = .false. # output Ux,Uy,Uz text file for each output time (big files)
+
+# velocity and density models
+nbmodels = 2 # nb of different models
+# define models as
+# I: (model_number 1 rho Vp Vs 0 0 QKappa Qmu 0 0 0 0 0 0) or
+# II: (model_number 2 rho c11 c13 c15 c33 c35 c55 0 0 0 0 0 0) or
+# III: (model_number 3 rhos rhof phi c kxx kxz kzz Ks Kf Kfr etaf mufr Qmu).
+# For istropic elastic/acoustic material use I and set Vs to zero to make a given model acoustic, for anisotropic elastic use II,
+# and for isotropic poroelastic material use III. The mesh can contain acoustic, elastic, and poroelastic models simultaneously.
+1 1 2800.d0 6500.d0 3700d0 0 0 10.d0 10.d0 0 0 0 0 0 0
+2 1 3200.d0 8300.d0 4700d0 0 0 10.d0 10.d0 0 0 0 0 0 0
+
+# external mesh or not
+read_external_mesh = .false.
+
+# absorbing boundary active or not
+absorbing_conditions = .true.
+
+# for horizontal periodic conditions: detect common points between left and right edges
+ADD_PERIODIC_CONDITIONS = .false.
+
+# horizontal periodicity distance for periodic conditions
+PERIODIC_horiz_dist = 0.3597d0
+
+# grid point detection tolerance for periodic conditions
+PERIODIC_DETECT_TOL = 3.3334d-6
+
+#-----------------------------------------------------------------------------
+# PARAMETERS FOR EXTERNAL MESHING
+
+# data concerning mesh, when generated using third-party app (more info in README)
+# (see also absorbing_conditions above)
+mesh_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_elements # file containing elements
+nodes_coords_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_nodes # file containing node coordinates
+materials_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_material # file containing material index for each element
+free_surface_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_surface_free # file containing free surface
+absorbing_surface_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_surface_absorb # file containing absorbing surface
+tangential_detection_curve_file = ./DATA/courbe_eros_nodes # file containing the curve delimiting the velocity model
+
+#-----------------------------------------------------------------------------
+# PARAMETERS FOR INTERNAL MESHING
+
+# file containing interfaces for internal mesh
+interfacesfile = ../interfaces_Slave.dat
+
+# geometry of the model (origin lower-left corner = 0,0) and mesh description
+xmin = 0.d0 # abscissa of left side of the model
+xmax = 600000.d0 # abscissa of right side of the model
+nx = 120 # number of elements along X
+
+# absorbing boundary parameters (see absorbing_conditions above)
+absorbbottom = .true.
+absorbright = .true.
+absorbtop = .false.
+absorbleft = .true.
+
+# define the different regions of the model in the (nx,nz) spectral element mesh
+nbregions = 2 # nb of regions and model number for each
+1 120 43 50 1
+1 120 1 42 2
Added: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/Par_file_Slave.before_update_to_r19xxx
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/Par_file_Slave.before_update_to_r19xxx (rev 0)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/Par_file_Slave.before_update_to_r19xxx 2012-01-24 18:50:05 UTC (rev 19452)
@@ -0,0 +1,135 @@
+# title of job r19201
+title = Slave Craton
+
+# forward or adjoint simulation
+SIMULATION_TYPE = 1 # 1 = forward, 2 = adjoint + kernels
+NOISE_TOMOGRAPHY = 0 # 0 = earthquake simulation, 1/2/3 = noise simulation
+SAVE_FORWARD = .false. # save the last frame, needed for adjoint simulation
+
+# parameters concerning partitioning
+nproc = 1 # number of processes
+partitioning_method = 3 # SCOTCH = 3, ascending order (very bad idea) = 1
+PERFORM_CUTHILL_MCKEE = .true. # perform inverse Cuthill-McKee (1969) optimization/permutation for mesh numbering
+
+ngnod = 4 # number of control nodes per element (4 or 9)
+initialfield = .true. # use a plane wave as source or not
+add_Bielak_conditions = .false. # add Bielak conditions or not if initial plane wave
+assign_external_model = .false. # define external earth model or not
+READ_EXTERNAL_SEP_FILE = .false. # Read external SEP file from DATA/model_velocity.dat_input, or use routine
+ATTENUATION_VISCOELASTIC_SOLID = .false. # turn attenuation (viscoelasticity) on or off for non-poroelastic solid parts of the model
+ATTENUATION_PORO_FLUID_PART = .false. # turn viscous attenuation on or off for the fluid part of poroelastic parts of the model
+Q0 = 1 # quality factor for viscous attenuation
+freq0 = 10 # frequency for viscous attenuation
+p_sv = .true. # set the type of calculation (P-SV or SH/membrane waves)
+
+# time step parameters
+nt = 6000 # total number of time steps
+deltat = 0.01 # duration of a time step
+USER_T0 = 0.0d0 # use this t0 as earliest starting time rather than the automatically calculated one
+
+# source parameters
+NSOURCES = 1 # number of sources [source info read in CMTSOLUTION file]
+force_normal_to_surface = .false. # angleforce normal to surface (external mesh and curve file needed)
+
+# constants for attenuation
+N_SLS = 2 # number of standard linear solids for attenuation
+f0_attenuation = 5.196152422706633 # (Hz) relevant only if source is a Dirac or a Heaviside, else it is f0
+
+# eceiver line parameters for seismograms
+seismotype = 1 # record 1=displ 2=veloc 3=accel 4=pressure
+generate_STATIONS = .true. # creates a STATION file in ./DATA
+nreceiversets = 1 # number of receiver sets
+anglerec = 0.d0 # angle to rotate components at receivers
+rec_normal_to_surface = .false. # base anglerec normal to surface (external mesh and curve file needed)
+SU_FORMAT = .false. # output seismograms in Seismic Unix format (adjoint traces will be read in the same format)
+
+# first receiver set
+nrec = 30
+xdeb = 500000.
+zdeb = 250000. # first receiver z in meters
+xfin = 100000.
+zfin = 250000. # last receiver z in meters (ignored if onlyone receiver)
+enreg_surf_same_vertical = .false. # receivers inside the medium or at the surface
+
+# display parameters
+NTSTEP_BETWEEN_OUTPUT_INFO = 200 # display frequency in time steps
+output_postscript_snapshot = .true. # output Postscript snapshot of the results
+output_color_image = .true. # output color image of the results
+imagetype = 1 # display 1=displ 2=veloc 3=accel 4=pressure
+cutsnaps = 5. # minimum amplitude in % for snapshots
+meshvect = .true. # display mesh on vector plots or not
+modelvect = .false. # display velocity model on vector plots
+boundvect = .true. # display boundary conditions on plots
+interpol = .true. # interpolation of the display or not
+pointsdisp = 6 # points for interpolation of display (set to 1 for lower-left corner only)
+subsamp_postscript = 1 # subsampling of color snapshots
+factor_subsample_image = 1 # factor to subsample color images output by the code (useful for very large models)
+POWER_DISPLAY_COLOR = 0.30d0 # non linear display to enhance small amplitudes in color images
+DRAW_WATER_CONSTANT_BLUE_IN_JPG = .true. # display acoustic layers as constant blue in JPEG images, because they likely correspond to water
+sizemax_arrows = 1.d0 # maximum size of arrows on vector plots in cm
+US_LETTER = .false. # US letter paper or European A4
+USE_SNAPSHOT_NUMBER_IN_FILENAME = .false. # use snapshot number in the file name of JPEG color snapshots instead of the time step
+gnuplot = .false. # generate a GNUPLOT file for the grid
+output_grid = .false. # save the grid in a text file or not
+output_energy = .false. # compute and output acoustic and elastic energy (slows down the code significantly)
+output_wavefield_snapshot = .false. # output Ux,Uy,Uz text file for each output time (big files)
+
+# velocity and density models
+nbmodels = 2 # nb of different models
+# define models as
+# I: (model_number 1 rho Vp Vs 0 0 QKappa Qmu 0 0 0 0 0 0) or
+# II: (model_number 2 rho c11 c13 c15 c33 c35 c55 0 0 0 0 0 0) or
+# III: (model_number 3 rhos rhof phi c kxx kxz kzz Ks Kf Kfr etaf mufr Qmu).
+# For istropic elastic/acoustic material use I and set Vs to zero to make a given model acoustic, for anisotropic elastic use II,
+# and for isotropic poroelastic material use III. The mesh can contain acoustic, elastic, and poroelastic models simultaneously.
+1 1 2800.d0 6500.d0 3700d0 0 0 10.d0 10.d0 0 0 0 0 0 0
+2 1 3200.d0 8300.d0 4700d0 0 0 10.d0 10.d0 0 0 0 0 0 0
+
+# external mesh or not
+read_external_mesh = .false.
+
+# absorbing boundary active or not
+absorbing_conditions = .true.
+
+# for horizontal periodic conditions: detect common points between left and right edges
+ADD_PERIODIC_CONDITIONS = .false.
+
+# horizontal periodicity distance for periodic conditions
+PERIODIC_horiz_dist = 0.3597d0
+
+# grid point detection tolerance for periodic conditions
+PERIODIC_DETECT_TOL = 3.3334d-6
+
+#-----------------------------------------------------------------------------
+# PARAMETERS FOR EXTERNAL MESHING
+
+# data concerning mesh, when generated using third-party app (more info in README)
+# (see also absorbing_conditions above)
+mesh_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_elements # file containing elements
+nodes_coords_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_nodes # file containing node coordinates
+materials_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_material # file containing material index for each element
+free_surface_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_surface_free # file containing free surface
+absorbing_surface_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_surface_absorb # file containing absorbing surface
+tangential_detection_curve_file = ./DATA/courbe_eros_nodes # file containing the curve delimiting the velocity model
+
+#-----------------------------------------------------------------------------
+# PARAMETERS FOR INTERNAL MESHING
+
+# file containing interfaces for internal mesh
+interfacesfile = ../interfaces_Slave.dat
+
+# geometry of the model (origin lower-left corner = 0,0) and mesh description
+xmin = 0.d0 # abscissa of left side of the model
+xmax = 600000.d0 # abscissa of right side of the model
+nx = 120 # number of elements along X
+
+# absorbing boundary parameters (see absorbing_conditions above)
+absorbbottom = .true.
+absorbright = .true.
+absorbtop = .false.
+absorbleft = .true.
+
+# define the different regions of the model in the (nx,nz) spectral element mesh
+nbregions = 2 # nb of regions and model number for each
+1 120 43 50 1
+1 120 1 42 2
Added: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/Par_file_Slave_for
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/Par_file_Slave_for (rev 0)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/Par_file_Slave_for 2012-01-24 18:50:05 UTC (rev 19452)
@@ -0,0 +1,136 @@
+# title of job r19201
+title = Slave Craton
+
+# forward or adjoint simulation
+SIMULATION_TYPE = 1 # 1 = forward, 2 = adjoint + kernels
+NOISE_TOMOGRAPHY = 0 # 0 = earthquake simulation, 1/2/3 = noise simulation
+SAVE_FORWARD = .true. # save the last frame, needed for adjoint simulation
+
+# parameters concerning partitioning
+nproc = 1 # number of processes
+partitioning_method = 3 # SCOTCH = 3, ascending order (very bad idea) = 1
+PERFORM_CUTHILL_MCKEE = .true. # perform inverse Cuthill-McKee (1969) optimization/permutation for mesh numbering
+
+ngnod = 4 # number of control nodes per element (4 or 9)
+initialfield = .true. # use a plane wave as source or not
+add_Bielak_conditions = .false. # add Bielak conditions or not if initial plane wave
+assign_external_model = .false. # define external earth model or not
+READ_EXTERNAL_SEP_FILE = .false. # Read external SEP file from DATA/model_velocity.dat_input, or use routine
+ATTENUATION_VISCOELASTIC_SOLID = .false. # turn attenuation (viscoelasticity) on or off for non-poroelastic solid parts of the model
+ATTENUATION_PORO_FLUID_PART = .false. # turn viscous attenuation on or off for the fluid part of poroelastic parts of the model
+Q0 = 1 # quality factor for viscous attenuation
+freq0 = 10 # frequency for viscous attenuation
+p_sv = .true. # set the type of calculation (P-SV or SH/membrane waves)
+
+# time step parameters
+nt = 6000 # total number of time steps
+deltat = 0.01 # duration of a time step
+USER_T0 = 0.0d0 # use this t0 as earliest starting time rather than the automatically calculated one
+time_stepping_scheme = 1 # 1 = Newmark (2nd order), 2 = LDDRK4-6 (4th-order 6-stage low storage Runge-Kutta), 3 = classical 4th-order 4-stage Runge-Kutta
+
+# source parameters
+NSOURCES = 1 # number of sources [source info read in CMTSOLUTION file]
+force_normal_to_surface = .false. # angleforce normal to surface (external mesh and curve file needed)
+
+# constants for attenuation
+N_SLS = 2 # number of standard linear solids for attenuation
+f0_attenuation = 5.196152422706633 # (Hz) relevant only if source is a Dirac or a Heaviside, else it is f0
+
+# eceiver line parameters for seismograms
+seismotype = 1 # record 1=displ 2=veloc 3=accel 4=pressure
+generate_STATIONS = .true. # creates a STATION file in ./DATA
+nreceiversets = 1 # number of receiver sets
+anglerec = 0.d0 # angle to rotate components at receivers
+rec_normal_to_surface = .false. # base anglerec normal to surface (external mesh and curve file needed)
+SU_FORMAT = .false. # output seismograms in Seismic Unix format (adjoint traces will be read in the same format)
+
+# first receiver set
+nrec = 30
+xdeb = 500000.
+zdeb = 250000. # first receiver z in meters
+xfin = 100000.
+zfin = 250000. # last receiver z in meters (ignored if onlyone receiver)
+enreg_surf_same_vertical = .false. # receivers inside the medium or at the surface
+
+# display parameters
+NTSTEP_BETWEEN_OUTPUT_INFO = 200 # display frequency in time steps
+output_postscript_snapshot = .true. # output Postscript snapshot of the results
+output_color_image = .true. # output color image of the results
+imagetype = 1 # display 1=displ 2=veloc 3=accel 4=pressure
+cutsnaps = 5. # minimum amplitude in % for snapshots
+meshvect = .true. # display mesh on vector plots or not
+modelvect = .false. # display velocity model on vector plots
+boundvect = .true. # display boundary conditions on plots
+interpol = .true. # interpolation of the display or not
+pointsdisp = 6 # points for interpolation of display (set to 1 for lower-left corner only)
+subsamp_postscript = 1 # subsampling of color snapshots
+factor_subsample_image = 1 # factor to subsample color images output by the code (useful for very large models)
+POWER_DISPLAY_COLOR = 0.30d0 # non linear display to enhance small amplitudes in color images
+DRAW_WATER_CONSTANT_BLUE_IN_JPG = .true. # display acoustic layers as constant blue in JPEG images, because they likely correspond to water
+sizemax_arrows = 1.d0 # maximum size of arrows on vector plots in cm
+US_LETTER = .false. # US letter paper or European A4
+USE_SNAPSHOT_NUMBER_IN_FILENAME = .false. # use snapshot number in the file name of JPEG color snapshots instead of the time step
+gnuplot = .false. # generate a GNUPLOT file for the grid
+output_grid = .false. # save the grid in a text file or not
+output_energy = .false. # compute and output acoustic and elastic energy (slows down the code significantly)
+output_wavefield_snapshot = .false. # output Ux,Uy,Uz text file for each output time (big files)
+
+# velocity and density models
+nbmodels = 2 # nb of different models
+# define models as
+# I: (model_number 1 rho Vp Vs 0 0 QKappa Qmu 0 0 0 0 0 0) or
+# II: (model_number 2 rho c11 c13 c15 c33 c35 c55 0 0 0 0 0 0) or
+# III: (model_number 3 rhos rhof phi c kxx kxz kzz Ks Kf Kfr etaf mufr Qmu).
+# For istropic elastic/acoustic material use I and set Vs to zero to make a given model acoustic, for anisotropic elastic use II,
+# and for isotropic poroelastic material use III. The mesh can contain acoustic, elastic, and poroelastic models simultaneously.
+1 1 2800.d0 6500.d0 3700d0 0 0 10.d0 10.d0 0 0 0 0 0 0
+2 1 3200.d0 8300.d0 4700d0 0 0 10.d0 10.d0 0 0 0 0 0 0
+
+# external mesh or not
+read_external_mesh = .false.
+
+# absorbing boundary active or not
+absorbing_conditions = .true.
+
+# for horizontal periodic conditions: detect common points between left and right edges
+ADD_PERIODIC_CONDITIONS = .false.
+
+# horizontal periodicity distance for periodic conditions
+PERIODIC_horiz_dist = 0.3597d0
+
+# grid point detection tolerance for periodic conditions
+PERIODIC_DETECT_TOL = 3.3334d-6
+
+#-----------------------------------------------------------------------------
+# PARAMETERS FOR EXTERNAL MESHING
+
+# data concerning mesh, when generated using third-party app (more info in README)
+# (see also absorbing_conditions above)
+mesh_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_elements # file containing elements
+nodes_coords_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_nodes # file containing node coordinates
+materials_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_material # file containing material index for each element
+free_surface_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_surface_free # file containing free surface
+absorbing_surface_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_surface_absorb # file containing absorbing surface
+tangential_detection_curve_file = ./DATA/courbe_eros_nodes # file containing the curve delimiting the velocity model
+
+#-----------------------------------------------------------------------------
+# PARAMETERS FOR INTERNAL MESHING
+
+# file containing interfaces for internal mesh
+interfacesfile = ../interfaces_Slave.dat
+
+# geometry of the model (origin lower-left corner = 0,0) and mesh description
+xmin = 0.d0 # abscissa of left side of the model
+xmax = 600000.d0 # abscissa of right side of the model
+nx = 120 # number of elements along X
+
+# absorbing boundary parameters (see absorbing_conditions above)
+absorbbottom = .true.
+absorbright = .true.
+absorbtop = .false.
+absorbleft = .true.
+
+# define the different regions of the model in the (nx,nz) spectral element mesh
+nbregions = 2 # nb of regions and model number for each
+1 120 43 50 1
+1 120 1 42 2
Added: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/Par_file_Slave_for.before_update_to_r19xxx
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/Par_file_Slave_for.before_update_to_r19xxx (rev 0)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/Par_file_Slave_for.before_update_to_r19xxx 2012-01-24 18:50:05 UTC (rev 19452)
@@ -0,0 +1,135 @@
+# title of job r19201
+title = Slave Craton
+
+# forward or adjoint simulation
+SIMULATION_TYPE = 1 # 1 = forward, 2 = adjoint + kernels
+NOISE_TOMOGRAPHY = 0 # 0 = earthquake simulation, 1/2/3 = noise simulation
+SAVE_FORWARD = .true. # save the last frame, needed for adjoint simulation
+
+# parameters concerning partitioning
+nproc = 1 # number of processes
+partitioning_method = 3 # SCOTCH = 3, ascending order (very bad idea) = 1
+PERFORM_CUTHILL_MCKEE = .true. # perform inverse Cuthill-McKee (1969) optimization/permutation for mesh numbering
+
+ngnod = 4 # number of control nodes per element (4 or 9)
+initialfield = .true. # use a plane wave as source or not
+add_Bielak_conditions = .false. # add Bielak conditions or not if initial plane wave
+assign_external_model = .false. # define external earth model or not
+READ_EXTERNAL_SEP_FILE = .false. # Read external SEP file from DATA/model_velocity.dat_input, or use routine
+ATTENUATION_VISCOELASTIC_SOLID = .false. # turn attenuation (viscoelasticity) on or off for non-poroelastic solid parts of the model
+ATTENUATION_PORO_FLUID_PART = .false. # turn viscous attenuation on or off for the fluid part of poroelastic parts of the model
+Q0 = 1 # quality factor for viscous attenuation
+freq0 = 10 # frequency for viscous attenuation
+p_sv = .true. # set the type of calculation (P-SV or SH/membrane waves)
+
+# time step parameters
+nt = 6000 # total number of time steps
+deltat = 0.01 # duration of a time step
+USER_T0 = 0.0d0 # use this t0 as earliest starting time rather than the automatically calculated one
+
+# source parameters
+NSOURCES = 1 # number of sources [source info read in CMTSOLUTION file]
+force_normal_to_surface = .false. # angleforce normal to surface (external mesh and curve file needed)
+
+# constants for attenuation
+N_SLS = 2 # number of standard linear solids for attenuation
+f0_attenuation = 5.196152422706633 # (Hz) relevant only if source is a Dirac or a Heaviside, else it is f0
+
+# eceiver line parameters for seismograms
+seismotype = 1 # record 1=displ 2=veloc 3=accel 4=pressure
+generate_STATIONS = .true. # creates a STATION file in ./DATA
+nreceiversets = 1 # number of receiver sets
+anglerec = 0.d0 # angle to rotate components at receivers
+rec_normal_to_surface = .false. # base anglerec normal to surface (external mesh and curve file needed)
+SU_FORMAT = .false. # output seismograms in Seismic Unix format (adjoint traces will be read in the same format)
+
+# first receiver set
+nrec = 30
+xdeb = 500000.
+zdeb = 250000. # first receiver z in meters
+xfin = 100000.
+zfin = 250000. # last receiver z in meters (ignored if onlyone receiver)
+enreg_surf_same_vertical = .false. # receivers inside the medium or at the surface
+
+# display parameters
+NTSTEP_BETWEEN_OUTPUT_INFO = 200 # display frequency in time steps
+output_postscript_snapshot = .true. # output Postscript snapshot of the results
+output_color_image = .true. # output color image of the results
+imagetype = 1 # display 1=displ 2=veloc 3=accel 4=pressure
+cutsnaps = 5. # minimum amplitude in % for snapshots
+meshvect = .true. # display mesh on vector plots or not
+modelvect = .false. # display velocity model on vector plots
+boundvect = .true. # display boundary conditions on plots
+interpol = .true. # interpolation of the display or not
+pointsdisp = 6 # points for interpolation of display (set to 1 for lower-left corner only)
+subsamp_postscript = 1 # subsampling of color snapshots
+factor_subsample_image = 1 # factor to subsample color images output by the code (useful for very large models)
+POWER_DISPLAY_COLOR = 0.30d0 # non linear display to enhance small amplitudes in color images
+DRAW_WATER_CONSTANT_BLUE_IN_JPG = .true. # display acoustic layers as constant blue in JPEG images, because they likely correspond to water
+sizemax_arrows = 1.d0 # maximum size of arrows on vector plots in cm
+US_LETTER = .false. # US letter paper or European A4
+USE_SNAPSHOT_NUMBER_IN_FILENAME = .false. # use snapshot number in the file name of JPEG color snapshots instead of the time step
+gnuplot = .false. # generate a GNUPLOT file for the grid
+output_grid = .false. # save the grid in a text file or not
+output_energy = .false. # compute and output acoustic and elastic energy (slows down the code significantly)
+output_wavefield_snapshot = .false. # output Ux,Uy,Uz text file for each output time (big files)
+
+# velocity and density models
+nbmodels = 2 # nb of different models
+# define models as
+# I: (model_number 1 rho Vp Vs 0 0 QKappa Qmu 0 0 0 0 0 0) or
+# II: (model_number 2 rho c11 c13 c15 c33 c35 c55 0 0 0 0 0 0) or
+# III: (model_number 3 rhos rhof phi c kxx kxz kzz Ks Kf Kfr etaf mufr Qmu).
+# For istropic elastic/acoustic material use I and set Vs to zero to make a given model acoustic, for anisotropic elastic use II,
+# and for isotropic poroelastic material use III. The mesh can contain acoustic, elastic, and poroelastic models simultaneously.
+1 1 2800.d0 6500.d0 3700d0 0 0 10.d0 10.d0 0 0 0 0 0 0
+2 1 3200.d0 8300.d0 4700d0 0 0 10.d0 10.d0 0 0 0 0 0 0
+
+# external mesh or not
+read_external_mesh = .false.
+
+# absorbing boundary active or not
+absorbing_conditions = .true.
+
+# for horizontal periodic conditions: detect common points between left and right edges
+ADD_PERIODIC_CONDITIONS = .false.
+
+# horizontal periodicity distance for periodic conditions
+PERIODIC_horiz_dist = 0.3597d0
+
+# grid point detection tolerance for periodic conditions
+PERIODIC_DETECT_TOL = 3.3334d-6
+
+#-----------------------------------------------------------------------------
+# PARAMETERS FOR EXTERNAL MESHING
+
+# data concerning mesh, when generated using third-party app (more info in README)
+# (see also absorbing_conditions above)
+mesh_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_elements # file containing elements
+nodes_coords_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_nodes # file containing node coordinates
+materials_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_material # file containing material index for each element
+free_surface_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_surface_free # file containing free surface
+absorbing_surface_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_surface_absorb # file containing absorbing surface
+tangential_detection_curve_file = ./DATA/courbe_eros_nodes # file containing the curve delimiting the velocity model
+
+#-----------------------------------------------------------------------------
+# PARAMETERS FOR INTERNAL MESHING
+
+# file containing interfaces for internal mesh
+interfacesfile = ../interfaces_Slave.dat
+
+# geometry of the model (origin lower-left corner = 0,0) and mesh description
+xmin = 0.d0 # abscissa of left side of the model
+xmax = 600000.d0 # abscissa of right side of the model
+nx = 120 # number of elements along X
+
+# absorbing boundary parameters (see absorbing_conditions above)
+absorbbottom = .true.
+absorbright = .true.
+absorbtop = .false.
+absorbleft = .true.
+
+# define the different regions of the model in the (nx,nz) spectral element mesh
+nbregions = 2 # nb of regions and model number for each
+1 120 43 50 1
+1 120 1 42 2
Added: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/Par_file_Slave_kernel
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/Par_file_Slave_kernel (rev 0)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/Par_file_Slave_kernel 2012-01-24 18:50:05 UTC (rev 19452)
@@ -0,0 +1,136 @@
+# title of job r19201
+title = Slave Craton
+
+# forward or adjoint simulation
+SIMULATION_TYPE = 2 # 1 = forward, 2 = adjoint + kernels
+NOISE_TOMOGRAPHY = 0 # 0 = earthquake simulation, 1/2/3 = noise simulation
+SAVE_FORWARD = .false. # save the last frame, needed for adjoint simulation
+
+# parameters concerning partitioning
+nproc = 1 # number of processes
+partitioning_method = 3 # SCOTCH = 3, ascending order (very bad idea) = 1
+PERFORM_CUTHILL_MCKEE = .true. # perform inverse Cuthill-McKee (1969) optimization/permutation for mesh numbering
+
+ngnod = 4 # number of control nodes per element (4 or 9)
+initialfield = .false. # use a plane wave as source or not
+add_Bielak_conditions = .false. # add Bielak conditions or not if initial plane wave
+assign_external_model = .false. # define external earth model or not
+READ_EXTERNAL_SEP_FILE = .false. # Read external SEP file from DATA/model_velocity.dat_input, or use routine
+ATTENUATION_VISCOELASTIC_SOLID = .false. # turn attenuation (viscoelasticity) on or off for non-poroelastic solid parts of the model
+ATTENUATION_PORO_FLUID_PART = .false. # turn viscous attenuation on or off for the fluid part of poroelastic parts of the model
+Q0 = 1 # quality factor for viscous attenuation
+freq0 = 10 # frequency for viscous attenuation
+p_sv = .true. # set the type of calculation (P-SV or SH/membrane waves)
+
+# time step parameters
+nt = 6000 # total number of time steps
+deltat = 0.01 # duration of a time step
+USER_T0 = 0.0d0 # use this t0 as earliest starting time rather than the automatically calculated one
+time_stepping_scheme = 1 # 1 = Newmark (2nd order), 2 = LDDRK4-6 (4th-order 6-stage low storage Runge-Kutta), 3 = classical 4th-order 4-stage Runge-Kutta
+
+# source parameters
+NSOURCES = 1 # number of sources [source info read in CMTSOLUTION file]
+force_normal_to_surface = .false. # angleforce normal to surface (external mesh and curve file needed)
+
+# constants for attenuation
+N_SLS = 2 # number of standard linear solids for attenuation
+f0_attenuation = 5.196152422706633 # (Hz) relevant only if source is a Dirac or a Heaviside, else it is f0
+
+# eceiver line parameters for seismograms
+seismotype = 1 # record 1=displ 2=veloc 3=accel 4=pressure
+generate_STATIONS = .true. # creates a STATION file in ./DATA
+nreceiversets = 1 # number of receiver sets
+anglerec = 0.d0 # angle to rotate components at receivers
+rec_normal_to_surface = .false. # base anglerec normal to surface (external mesh and curve file needed)
+SU_FORMAT = .false. # output seismograms in Seismic Unix format (adjoint traces will be read in the same format)
+
+# first receiver set
+nrec = 30
+xdeb = 500000.
+zdeb = 250000. # first receiver z in meters
+xfin = 100000.
+zfin = 250000. # last receiver z in meters (ignored if onlyone receiver)
+enreg_surf_same_vertical = .false. # receivers inside the medium or at the surface
+
+# display parameters
+NTSTEP_BETWEEN_OUTPUT_INFO = 200 # display frequency in time steps
+output_postscript_snapshot = .true. # output Postscript snapshot of the results
+output_color_image = .true. # output color image of the results
+imagetype = 1 # display 1=displ 2=veloc 3=accel 4=pressure
+cutsnaps = 5. # minimum amplitude in % for snapshots
+meshvect = .true. # display mesh on vector plots or not
+modelvect = .false. # display velocity model on vector plots
+boundvect = .true. # display boundary conditions on plots
+interpol = .true. # interpolation of the display or not
+pointsdisp = 6 # points for interpolation of display (set to 1 for lower-left corner only)
+subsamp_postscript = 1 # subsampling of color snapshots
+factor_subsample_image = 1 # factor to subsample color images output by the code (useful for very large models)
+POWER_DISPLAY_COLOR = 0.30d0 # non linear display to enhance small amplitudes in color images
+DRAW_WATER_CONSTANT_BLUE_IN_JPG = .true. # display acoustic layers as constant blue in JPEG images, because they likely correspond to water
+sizemax_arrows = 1.d0 # maximum size of arrows on vector plots in cm
+US_LETTER = .false. # US letter paper or European A4
+USE_SNAPSHOT_NUMBER_IN_FILENAME = .false. # use snapshot number in the file name of JPEG color snapshots instead of the time step
+gnuplot = .false. # generate a GNUPLOT file for the grid
+output_grid = .false. # save the grid in a text file or not
+output_energy = .false. # compute and output acoustic and elastic energy (slows down the code significantly)
+output_wavefield_snapshot = .false. # output Ux,Uy,Uz text file for each output time (big files)
+
+# velocity and density models
+nbmodels = 2 # nb of different models
+# define models as
+# I: (model_number 1 rho Vp Vs 0 0 QKappa Qmu 0 0 0 0 0 0) or
+# II: (model_number 2 rho c11 c13 c15 c33 c35 c55 0 0 0 0 0 0) or
+# III: (model_number 3 rhos rhof phi c kxx kxz kzz Ks Kf Kfr etaf mufr Qmu).
+# For istropic elastic/acoustic material use I and set Vs to zero to make a given model acoustic, for anisotropic elastic use II,
+# and for isotropic poroelastic material use III. The mesh can contain acoustic, elastic, and poroelastic models simultaneously.
+1 1 2800.d0 6500.d0 3700d0 0 0 10.d0 10.d0 0 0 0 0 0 0
+2 1 3200.d0 8300.d0 4700d0 0 0 10.d0 10.d0 0 0 0 0 0 0
+
+# external mesh or not
+read_external_mesh = .false.
+
+# absorbing boundary active or not
+absorbing_conditions = .true.
+
+# for horizontal periodic conditions: detect common points between left and right edges
+ADD_PERIODIC_CONDITIONS = .false.
+
+# horizontal periodicity distance for periodic conditions
+PERIODIC_horiz_dist = 0.3597d0
+
+# grid point detection tolerance for periodic conditions
+PERIODIC_DETECT_TOL = 3.3334d-6
+
+#-----------------------------------------------------------------------------
+# PARAMETERS FOR EXTERNAL MESHING
+
+# data concerning mesh, when generated using third-party app (more info in README)
+# (see also absorbing_conditions above)
+mesh_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_elements # file containing elements
+nodes_coords_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_nodes # file containing node coordinates
+materials_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_material # file containing material index for each element
+free_surface_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_surface_free # file containing free surface
+absorbing_surface_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_surface_absorb # file containing absorbing surface
+tangential_detection_curve_file = ./DATA/courbe_eros_nodes # file containing the curve delimiting the velocity model
+
+#-----------------------------------------------------------------------------
+# PARAMETERS FOR INTERNAL MESHING
+
+# file containing interfaces for internal mesh
+interfacesfile = ../interfaces_Slave.dat
+
+# geometry of the model (origin lower-left corner = 0,0) and mesh description
+xmin = 0.d0 # abscissa of left side of the model
+xmax = 600000.d0 # abscissa of right side of the model
+nx = 120 # number of elements along X
+
+# absorbing boundary parameters (see absorbing_conditions above)
+absorbbottom = .true.
+absorbright = .true.
+absorbtop = .false.
+absorbleft = .true.
+
+# define the different regions of the model in the (nx,nz) spectral element mesh
+nbregions = 2 # nb of regions and model number for each
+1 120 43 50 1
+1 120 1 42 2
Added: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/Par_file_Slave_kernel.before_update_to_r19xxx
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/Par_file_Slave_kernel.before_update_to_r19xxx (rev 0)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/Par_file_Slave_kernel.before_update_to_r19xxx 2012-01-24 18:50:05 UTC (rev 19452)
@@ -0,0 +1,135 @@
+# title of job r19201
+title = Slave Craton
+
+# forward or adjoint simulation
+SIMULATION_TYPE = 2 # 1 = forward, 2 = adjoint + kernels
+NOISE_TOMOGRAPHY = 0 # 0 = earthquake simulation, 1/2/3 = noise simulation
+SAVE_FORWARD = .false. # save the last frame, needed for adjoint simulation
+
+# parameters concerning partitioning
+nproc = 1 # number of processes
+partitioning_method = 3 # SCOTCH = 3, ascending order (very bad idea) = 1
+PERFORM_CUTHILL_MCKEE = .true. # perform inverse Cuthill-McKee (1969) optimization/permutation for mesh numbering
+
+ngnod = 4 # number of control nodes per element (4 or 9)
+initialfield = .false. # use a plane wave as source or not
+add_Bielak_conditions = .false. # add Bielak conditions or not if initial plane wave
+assign_external_model = .false. # define external earth model or not
+READ_EXTERNAL_SEP_FILE = .false. # Read external SEP file from DATA/model_velocity.dat_input, or use routine
+ATTENUATION_VISCOELASTIC_SOLID = .false. # turn attenuation (viscoelasticity) on or off for non-poroelastic solid parts of the model
+ATTENUATION_PORO_FLUID_PART = .false. # turn viscous attenuation on or off for the fluid part of poroelastic parts of the model
+Q0 = 1 # quality factor for viscous attenuation
+freq0 = 10 # frequency for viscous attenuation
+p_sv = .true. # set the type of calculation (P-SV or SH/membrane waves)
+
+# time step parameters
+nt = 6000 # total number of time steps
+deltat = 0.01 # duration of a time step
+USER_T0 = 0.0d0 # use this t0 as earliest starting time rather than the automatically calculated one
+
+# source parameters
+NSOURCES = 1 # number of sources [source info read in CMTSOLUTION file]
+force_normal_to_surface = .false. # angleforce normal to surface (external mesh and curve file needed)
+
+# constants for attenuation
+N_SLS = 2 # number of standard linear solids for attenuation
+f0_attenuation = 5.196152422706633 # (Hz) relevant only if source is a Dirac or a Heaviside, else it is f0
+
+# eceiver line parameters for seismograms
+seismotype = 1 # record 1=displ 2=veloc 3=accel 4=pressure
+generate_STATIONS = .true. # creates a STATION file in ./DATA
+nreceiversets = 1 # number of receiver sets
+anglerec = 0.d0 # angle to rotate components at receivers
+rec_normal_to_surface = .false. # base anglerec normal to surface (external mesh and curve file needed)
+SU_FORMAT = .false. # output seismograms in Seismic Unix format (adjoint traces will be read in the same format)
+
+# first receiver set
+nrec = 30
+xdeb = 500000.
+zdeb = 250000. # first receiver z in meters
+xfin = 100000.
+zfin = 250000. # last receiver z in meters (ignored if onlyone receiver)
+enreg_surf_same_vertical = .false. # receivers inside the medium or at the surface
+
+# display parameters
+NTSTEP_BETWEEN_OUTPUT_INFO = 200 # display frequency in time steps
+output_postscript_snapshot = .true. # output Postscript snapshot of the results
+output_color_image = .true. # output color image of the results
+imagetype = 1 # display 1=displ 2=veloc 3=accel 4=pressure
+cutsnaps = 5. # minimum amplitude in % for snapshots
+meshvect = .true. # display mesh on vector plots or not
+modelvect = .false. # display velocity model on vector plots
+boundvect = .true. # display boundary conditions on plots
+interpol = .true. # interpolation of the display or not
+pointsdisp = 6 # points for interpolation of display (set to 1 for lower-left corner only)
+subsamp_postscript = 1 # subsampling of color snapshots
+factor_subsample_image = 1 # factor to subsample color images output by the code (useful for very large models)
+POWER_DISPLAY_COLOR = 0.30d0 # non linear display to enhance small amplitudes in color images
+DRAW_WATER_CONSTANT_BLUE_IN_JPG = .true. # display acoustic layers as constant blue in JPEG images, because they likely correspond to water
+sizemax_arrows = 1.d0 # maximum size of arrows on vector plots in cm
+US_LETTER = .false. # US letter paper or European A4
+USE_SNAPSHOT_NUMBER_IN_FILENAME = .false. # use snapshot number in the file name of JPEG color snapshots instead of the time step
+gnuplot = .false. # generate a GNUPLOT file for the grid
+output_grid = .false. # save the grid in a text file or not
+output_energy = .false. # compute and output acoustic and elastic energy (slows down the code significantly)
+output_wavefield_snapshot = .false. # output Ux,Uy,Uz text file for each output time (big files)
+
+# velocity and density models
+nbmodels = 2 # nb of different models
+# define models as
+# I: (model_number 1 rho Vp Vs 0 0 QKappa Qmu 0 0 0 0 0 0) or
+# II: (model_number 2 rho c11 c13 c15 c33 c35 c55 0 0 0 0 0 0) or
+# III: (model_number 3 rhos rhof phi c kxx kxz kzz Ks Kf Kfr etaf mufr Qmu).
+# For istropic elastic/acoustic material use I and set Vs to zero to make a given model acoustic, for anisotropic elastic use II,
+# and for isotropic poroelastic material use III. The mesh can contain acoustic, elastic, and poroelastic models simultaneously.
+1 1 2800.d0 6500.d0 3700d0 0 0 10.d0 10.d0 0 0 0 0 0 0
+2 1 3200.d0 8300.d0 4700d0 0 0 10.d0 10.d0 0 0 0 0 0 0
+
+# external mesh or not
+read_external_mesh = .false.
+
+# absorbing boundary active or not
+absorbing_conditions = .true.
+
+# for horizontal periodic conditions: detect common points between left and right edges
+ADD_PERIODIC_CONDITIONS = .false.
+
+# horizontal periodicity distance for periodic conditions
+PERIODIC_horiz_dist = 0.3597d0
+
+# grid point detection tolerance for periodic conditions
+PERIODIC_DETECT_TOL = 3.3334d-6
+
+#-----------------------------------------------------------------------------
+# PARAMETERS FOR EXTERNAL MESHING
+
+# data concerning mesh, when generated using third-party app (more info in README)
+# (see also absorbing_conditions above)
+mesh_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_elements # file containing elements
+nodes_coords_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_nodes # file containing node coordinates
+materials_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_material # file containing material index for each element
+free_surface_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_surface_free # file containing free surface
+absorbing_surface_file = ./DATA/ice_water_rock_1D/ice_water_rock_1D_surface_absorb # file containing absorbing surface
+tangential_detection_curve_file = ./DATA/courbe_eros_nodes # file containing the curve delimiting the velocity model
+
+#-----------------------------------------------------------------------------
+# PARAMETERS FOR INTERNAL MESHING
+
+# file containing interfaces for internal mesh
+interfacesfile = ../interfaces_Slave.dat
+
+# geometry of the model (origin lower-left corner = 0,0) and mesh description
+xmin = 0.d0 # abscissa of left side of the model
+xmax = 600000.d0 # abscissa of right side of the model
+nx = 120 # number of elements along X
+
+# absorbing boundary parameters (see absorbing_conditions above)
+absorbbottom = .true.
+absorbright = .true.
+absorbtop = .false.
+absorbleft = .true.
+
+# define the different regions of the model in the (nx,nz) spectral element mesh
+nbregions = 2 # nb of regions and model number for each
+1 120 43 50 1
+1 120 1 42 2
Added: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/SOURCE_Slave
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/SOURCE_Slave (rev 0)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/SOURCE_Slave 2012-01-24 18:50:05 UTC (rev 19452)
@@ -0,0 +1,13 @@
+#source 1. The components of a moment tensor source must be given in N.m, not in dyne.cm as in the DATA/CMTSOLUTION source file of the 3D version of the code.
+source_surf = .false. # source inside the medium or at the surface
+xs = -150000
+zs = 250000. # source location z in meters
+source_type = 1 # 1 for plane P waves, 2 for plane SV waves, 3 for Rayleigh wave
+time_function_type = 1 # Ricker = 1, first derivative = 2, Gaussian = 3, Dirac = 4, Heaviside = 5
+f0 = 0.4 # dominant source frequency (Hz) if not Dirac or Heaviside
+tshift = 0.0 # time shift when multi sources (if one source, must be zero)
+angleforce = 23
+Mxx = 1. # Mxx component (for a moment tensor source only)
+Mzz = -1. # Mzz component (for a moment tensor source only)
+Mxz = 0. # Mxz component (for a moment tensor source only)
+factor = 0.75d10 # amplification factor
Added: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/adj.sh
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/adj.sh (rev 0)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/adj.sh 2012-01-24 18:50:05 UTC (rev 19452)
@@ -0,0 +1,44 @@
+#!/bin/bash
+#
+# script runs mesher and solver (in serial)
+# using this example setup
+#
+
+echo "running example: `date`"
+currentdir=`pwd`
+
+# compiles executables in root directory
+cd ../../
+make > tmp.log
+cd $currentdir
+
+# links executables
+rm -f xmeshfem2D xspecfem2D
+ln -s ../../bin/xmeshfem2D
+ln -s ../../bin/xspecfem2D
+
+# stores setup
+cp DATA/Par_file OUTPUT_FILES/Par_file_kernel
+
+# runs database generation
+echo
+echo " running mesher..."
+echo
+./xmeshfem2D > OUTPUT_FILES/output_mesher.txt
+
+# runs simulation
+echo
+echo " running solver..."
+echo
+./xspecfem2D > OUTPUT_FILES/output_kernel.txt
+
+# stores output
+cp DATA/SOURCE_xz.dat OUTPUT_FILES/
+cp DATA/STATIONS OUTPUT_FILES/
+cp DATA/STATIONS_target OUTPUT_FILES/
+
+echo
+echo "see results in directory: OUTPUT_FILES/"
+echo
+echo "done"
+echo `date`
Property changes on: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/adj.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/array_geo.m
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/array_geo.m (rev 0)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/array_geo.m 2012-01-24 18:50:05 UTC (rev 19452)
@@ -0,0 +1,44 @@
+% given the length of the station array L_s and the average Moho
+% depth H, figure out the appropriate geometry for a plane wave
+% with incident angle th (in degrees) that will propagate (as
+% initial condition to the free surface and cover the entire array
+
+close all; clear all;
+L_s=400; %km
+H=40; %km
+L_1=1./4*L_s; % km
+angle_inc=23;
+th=angle_inc*pi/180;
+
+% plane waves start below the Moho
+L_1=max(L_1,H*tan(th));
+
+x0=0.; z0=0.;
+x1=x0+L_1;
+x2=x1+L_s;
+xm=x2+x1;
+
+%
+fac=1.2;
+xp=x0-H*fac/tan(th);
+x4=x1-(x1-xp)*(sin(th).^2);
+z4=(x1-xp)*sin(th)*cos(th);
+x5=x2-(x2-xp)*(sin(th).^2);
+z5=(x2-xp)*sin(th)*cos(th);
+zm=z5*1.1;
+
+% draw the setup geometry
+set(0,'Defaultlinelinewidth',2);
+rectangle('position',[x0,z0,xm,zm],'EdgeColor','g'); hold on;
+% extending -x axis
+plot([x0,xp],[zm,zm],'g:');
+% rays going to x1 and x2 receivers
+plot([x1,x4],[zm,zm-z4]);
+plot([x2,x5],[zm,zm-z5]);
+% wavefront connecting (x4,z4), (x5,z5)
+plot([xp,x4,x5],[zm,zm-z4,zm-z5],'r:');
+% plot Moho
+plot([x0,xm],[zm-H,zm-H],'m')
+axis equal;
+
+xp,xm,zm
\ No newline at end of file
Added: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/interfaces_Slave.dat
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/interfaces_Slave.dat (rev 0)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/interfaces_Slave.dat 2012-01-24 18:50:05 UTC (rev 19452)
@@ -0,0 +1,19 @@
+# number of interfaces
+ 2
+#
+# for each interface below, we give the number of points and then x,z for each point
+#
+# interface number 1 (bottom of the mesh)
+ 2
+ 0 0
+ 600000 0
+# interface number 5 (topography, top of the mesh)
+ 2
+ 0 250000
+ 600000 250000
+#
+# for each layer, we give the number of spectral elements in the vertical direction
+#
+# layer number 1
+50
+
Added: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/isochron.m
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/isochron.m (rev 0)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/isochron.m 2012-01-24 18:50:05 UTC (rev 19452)
@@ -0,0 +1,18 @@
+% read in forward seismograms
+
+s=load('OUTPUT_FILES/S0005.AA.BXZ.semd');
+t=s(:,1); disp=s(:,2);
+tmin=12.0; tmax=21.0;
+tshift=5.0; factor=0.2;
+dt=t(2)-t(1);
+ind=find(t>tmin & t<tmax);
+ind_shift=floor(tshift/dt);
+
+adj=zeros(size(disp));
+adj(ind+ind_shift)=disp(ind)*factor;
+
+plot(t,adj)
+
+fid = fopen('S0005.AA.BXZ.adj','w');
+fprintf(fid,'%6.2f %15.4g\n',[t';adj']); % the variable list has to be two rows and n columns
+fclose(fid);
\ No newline at end of file
Added: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/plot_field.m
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/plot_field.m (rev 0)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/plot_field.m 2012-01-24 18:50:05 UTC (rev 19452)
@@ -0,0 +1,14 @@
+close all; clear all
+sframe=200; eframe=5000; dframe=sframe
+i=0;
+for iframe = [5, sframe:dframe:eframe]
+ i = i+1
+ file=sprintf('OUTPUT_FILES/wavefield%07d_02_000.txt',iframe);
+ s=load(file);
+ if (i == 1)
+ x=s(:,1); z=s(:,2);
+ end
+ sx=s(:,3); sz=s(:,5);
+ figure(i)
+ scatter(x,z,30,sz); % or sx
+end
\ No newline at end of file
Added: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/plot_kernel.m
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/plot_kernel.m (rev 0)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/plot_kernel.m 2012-01-24 18:50:05 UTC (rev 19452)
@@ -0,0 +1,90 @@
+clear all; close all;
+LENGTH=250000; L1=LENGTH/1000; H=40;
+angle_inc=18;
+th=angle_inc*pi/180;
+dirr='OUTPUT_FILES_FORWARD/';
+dir = 'OUTPUT_FILES_KERNEL/';
+% receiver
+file=[dirr 'receiver.dat'];
+rec=load(file);
+rec=rec/LENGTH; nrec=length(rec);
+
+% kernel file
+file=[dir 'proc000000_rhop_alpha_beta_kernel.dat'];
+s=load(file);
+xx=s(:,1)/LENGTH;zz=s(:,2)/LENGTH;
+minx=min(xx); maxx=max(xx); minz=min(zz); maxz=max(zz);
+nx=400; nz=400;
+% define mesh
+xa=linspace(minx,maxx,nx);za=linspace(minz,maxz,nz);
+[X,Z] = meshgrid(xa,za);
+rhop=s(:,3); alpha=s(:,4); beta=s(:,5);
+
+subplot(3,1,1)
+%scatter(xx,zz,30,rhop,'filled'); hold on;
+FV=griddata(xx,zz,rhop,X,Z);
+imagesc(xa,za,FV); set(gca,'YDir','normal'); hold on;
+plot(rec(:,1),rec(:,2),'kx')
+text(0.2,0.2,'K_{\rho_p} ')
+quiver(0.2,1-H/L1, 0.1,0,'MaxHeadsize', 30)
+quiver(0,0,0.4*sin(th),0.4*cos(th),'MaxHeadsize', 30)
+title(['inc angle=', num2str(angle_inc), '; nrec=', num2str(nrec)]);
+jpeg_header='right-kernel-';
+jpeg_file=[jpeg_header num2str(angle_inc) '-' num2str(nrec) '.jpg'];
+
+subplot(3,1,2)
+%scatter(xx,zz,30,beta,'filled'); hold on;
+FV=griddata(xx,zz,beta,X,Z);
+imagesc(xa,za,FV); set(gca,'YDir','normal'); hold on;
+plot(rec(:,1),rec(:,2),'kx')
+plot(rec(:,1),rec(:,2),'kx')
+text(0.2,0.2,'K_\beta')
+quiver(0.2,1-H/L1, 0.1,0,'MaxHeadsize', 30)
+quiver(0,0,0.4*sin(th),0.4*cos(th),'MaxHeadsize', 30)
+
+
+subplot(3,1,3)
+%scatter(xx,zz,30,alpha,'filled'); hold on;
+FV=griddata(xx,zz,alpha,X,Z);
+imagesc(xa,za,FV); set(gca,'YDir','normal'); hold on;
+plot(rec(:,1),rec(:,2),'kx')
+text(0.2,0.2,'K_\alpha')
+quiver(0.2,1-H/L1, 0.1,0,'MaxHeadsize', 30)
+quiver(0,0,0.4*sin(th),0.4*cos(th),'MaxHeadsize', 30)
+
+print('-djpeg',jpeg_file)
+%file='angle_23/OUTPUT_FILES_KERNEL/proc000000_rhop_alpha_beta_kernel.dat';
+%s=load(file);
+%xx=s(:,1)/LENGTH;zz=s(:,2)/LENGTH;
+%rhop=s(:,3); alpha=s(:,4); beta=s(:,5);
+%field2=rhop;
+% define surface grid
+%maxv=max(abs(field))/3; ind=find(abs(field)>maxv);
+%field(ind)=maxv;
+%xmax=max(xx); zmax=max(zz);
+%xg = linspace(0,xmax,900);
+%zg = linspace(0,zmax,300);
+%[XI,YI] = meshgrid(xg,zg);
+%FI = griddata(xx,zz,field,XI,YI);
+%mesh(XI,YI,FI); view(2);
+
+%hold on;
+% receivers
+
+
+%subplot(3,1,2);
+%scatter(xx,zz,30,field2+field1,'filled');hold on;
+
+% plot assumed Moho at 40 km depth
+%plot([0,3],[160,160]/L1,'k:')
+
+% isochrons
+% $$$ th=23*pi/180;
+% $$$ beta=3.7; alpha=6.5;
+% $$$ phi=linspace(0,pi);
+% $$$ t0=5.0;
+% $$$ r=t0./(1/beta-1/alpha*cos(th+pi/2-phi));
+% $$$ r2=t0./(1/alpha-1/alpha*cos(th+pi/2-phi));
+% $$$ plot(r.*cos(phi)/L1+rec(1),rec(2)-r.*sin(phi)/L1); hold on;
+% $$$ plot(r2.*cos(phi)/L1+rec(1),rec(2)-r2.*sin(phi)/L1);
+% $$$ axis([0,3,0,1])
Added: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/process.sh
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/process.sh (rev 0)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/process.sh 2012-01-24 18:50:05 UTC (rev 19452)
@@ -0,0 +1,67 @@
+#!/bin/bash
+#
+# script runs mesher and solver (in serial)
+# using this example setup
+#
+
+echo "running example: `date`"
+currentdir=`pwd`
+
+echo
+echo "(will take about 1 minute)"
+echo
+
+# sets up directory structure in current example directoy
+echo
+echo " setting up example..."
+echo
+
+mkdir -p OUTPUT_FILES
+mkdir -p DATA
+
+# sets up local DATA/ directory
+cd DATA/
+rm -f Par_file SOURCE
+ln -s ../Par_file_Slave Par_file
+ln -s ../SOURCE_Slave SOURCE
+cd ../
+
+# cleans output files
+rm -rf OUTPUT_FILES/*
+
+# compiles executables in root directory
+cd ../../
+make > tmp.log
+cd $currentdir
+
+# links executables
+rm -f xmeshfem2D xspecfem2D
+ln -s ../../bin/xmeshfem2D
+ln -s ../../bin/xspecfem2D
+
+# stores setup
+cp DATA/Par_file OUTPUT_FILES/
+cp DATA/SOURCE OUTPUT_FILES/
+
+# runs database generation
+echo
+echo " running mesher..."
+echo
+./xmeshfem2D > OUTPUT_FILES/output_mesher.txt
+
+# runs simulation
+echo
+echo " running solver..."
+echo
+./xspecfem2D > OUTPUT_FILES/output_solver.txt
+
+# stores output
+cp DATA/SOURCE_xz.dat OUTPUT_FILES/
+cp DATA/STATIONS OUTPUT_FILES/
+cp DATA/STATIONS_target OUTPUT_FILES/
+
+echo
+echo "see results in directory: OUTPUT_FILES/"
+echo
+echo "done"
+echo `date`
Property changes on: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/process.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/readme
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/readme (rev 0)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/readme 2012-01-24 18:50:05 UTC (rev 19452)
@@ -0,0 +1,12 @@
+This directory gives an example of propgation of incoming plane wave into a layer over half space model.
+
+sequence of script:
+1) set_source .bash angle nrec
+
+2) process.sh 1 0 # forward
+
+3) matlab/select_adj.m, choose t1 and t2 (only once now)
+
+4) process.sh 0 1 # kernel
+
+5) matlab/plot_kernel.m (rho, vp and vs kernels)
Added: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/run.bash
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/run.bash (rev 0)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/run.bash 2012-01-24 18:50:05 UTC (rev 19452)
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+for dir in + -; do
+ for ang in 23 20 18; do
+ for nrec in 10 20 30; do
+ set_source.bash $dir $ang $nrec
+ run_for_ker.sh 1 1
+ mkdir -p ang-$ang; mkdir -p ang-$ang/nrec-$nrec-dir-$dir
+ mv OUTPUT_FILES_FORWARD OUTPUT_FILES_KERNEL ang-$ang/nrec-$nrec-dir-$dir
+ done
+ done
+done
Property changes on: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/run.bash
___________________________________________________________________
Name: svn:executable
+ *
Added: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/run_for_ker.sh
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/run_for_ker.sh (rev 0)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/run_for_ker.sh 2012-01-24 18:50:05 UTC (rev 19452)
@@ -0,0 +1,69 @@
+#!/bin/bash
+#
+# script runs mesher and solver (in serial)
+# using this example setup
+#
+
+if [ $# != 2 ]; then
+ echo 'process.sh forward kernel'; exit
+fi
+forward=$1
+kernel=$2
+echo ' '
+echo `date`
+if [ $forward -eq 1 ] ; then
+currentdir=`pwd`
+mkdir -p OUTPUT_FILES
+mkdir -p DATA
+rm -rf OUTPUT_FILES/* OUTPUT_FILES_FORWARD OUTPUT_FILES_KERNEL
+
+cd ../../
+make > tmp.log
+cd $currentdir
+rm -f xmeshfem2D xspecfem2D
+ln -s ../../bin/xmeshfem2D
+ln -s ../../bin/xspecfem2D
+
+# sets up local DATA/ directory
+cd DATA/
+rm -f Par_file SOURCE
+ln -s ../Par_file_Slave_for Par_file
+ln -s ../SOURCE_Slave SOURCE
+cd ../
+
+echo 'Forward simulation ...'
+echo " running mesher..."
+./xmeshfem2D > OUTPUT_FILES/output_mesher.txt
+echo " running solver..."
+./xspecfem2D > OUTPUT_FILES/output_solver.txt
+cp DATA/SOURCE_xz.dat DATA/STATIONS_* DATA/Par_file DATA/SOURCE OUTPUT_FILES/
+grep Receiver OUTPUT_FILES/output_mesher.txt | awk '{print $4,$5}' > OUTPUT_FILES/receiver.dat
+mv OUTPUT_FILES OUTPUT_FILES_FORWARD
+echo "see results in directory: OUTPUT_FILES_FORWARD/"
+fi
+
+
+if [ $kernel -eq 1 ]; then
+# run select_adj in matlab
+matlab.sh "select_adj"
+
+echo 'Kernel simulation ...'
+mkdir -p OUTPUT_FILES/
+cd SEM; rm -f *; cd ..
+cd OUTPUT_FILES_FORWARD; cp lastframe* absorb* ../OUTPUT_FILES; cp *.adj ../SEM; cd ..
+cd SEM; rename 's/semd.adj/adj/' *.adj; cd ..
+cd DATA; rm -f Par_file; ln -s ../Par_file_Slave_kernel Par_file; cd ..
+echo " running mesher..."
+./xmeshfem2D > OUTPUT_FILES/output_mesher.txt
+echo " running solver..."
+./xspecfem2D > OUTPUT_FILES/output_solver.txt
+cp DATA/Par_file OUTPUT_FILES/
+mv OUTPUT_FILES OUTPUT_FILES_KERNEL
+echo "see results in directory: OUTPUT_FILES_KERNEL/"
+
+matlab.sh "plot_kernel"
+fi
+
+
+echo "done"
+echo `date`
Property changes on: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/run_for_ker.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/select_adj.m
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/select_adj.m (rev 0)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/select_adj.m 2012-01-24 18:50:05 UTC (rev 19452)
@@ -0,0 +1,74 @@
+close all; clear all;
+% input parameters
+H=40; Vp1=6.5; Vp2=8.3; Vs1=3.7; Vs2=4.7; X0=-150;
+dir='OUTPUT_FILES_FORWARD/';
+
+% receivers
+Xs=100;Xe=500;
+nsta=30;
+if nsta == 1
+ xarray=[Xs];
+else
+ xarray=linspace(Xs,Xe,nsta);
+end
+
+% incident waves
+angle_inc=18;
+th=angle_inc*pi/180; p=sin(th)/Vp2;
+
+tmin=zeros(nsta,1); tmax=zeros(nsta,1);
+[tP, tPs, tPpp, tPps, tPss]=ttplane(X0,xarray,p,H,Vp2,Vs2,Vp1,Vs1);
+
+% reduced time
+rt=tP;
+% plot distance between traces
+dy=0.5;
+% start of seismograms
+
+%%% select t1 and t2 of adjoint source
+t1=2; t2=7; rtaper=0; % select Ps phase
+t1=2; t2=30;
+
+comp = ['BXZ'; 'BXX'];
+% plot seismograms
+for i = 1 : nsta
+ X=(Xe-Xs)/(nsta-1)*(i-1)+Xs;
+
+ for j = 1 : 2
+ figure(j);
+ file=sprintf([dir 'S00%02d.AA.' comp(j,:) '.semd'],i);
+ s=load(file);
+ ym = (i-1)*dy;
+ plot(s(:,1)-rt(i),s(:,2)+ym); hold on; grid on;
+
+ % pick start and end of adjoint seismograms (after aligning P)
+ tmin(i)=t1;
+ tmax(i)=min(t2,s(end,1)-rt(i));
+ plot(tmin(i),ym,'rx',tmax(i),ym,'mx');
+
+ % generate adjint source
+ ind=find(s(:,1)-rt(i)>tmin(i) & s(:,1)-rt(i)<tmax(i));
+ sadj=zeros(size(s(:,2)));
+ taper=tukeywin(length(ind),rtaper);
+ sadj(ind)=s(ind,2).*taper;
+ plot(s(ind,1)-rt(i),sadj(ind)+ym,'g');
+
+ % write adjoint source
+ fid = fopen(strcat(file,'.adj'),'w');
+ fprintf(fid,'%6.2f %12.4g\n',[s(:,1)';sadj']);
+ fclose(fid);
+ end
+
+ file=sprintf([dir 'S00%02d.AA.BXY.semd'],i);
+ fid = fopen(strcat(file,'.adj'),'w');
+ fprintf(fid,'%6.2f %12.4g\n',[s(:,1)';zeros(size(s(:,1)))']);
+ fclose(fid);
+end
+
+for j = 1 : 2
+ figure(j)
+ plot(tPs-tP,(0:nsta-1)*dy); text(tPs(1)-tP(1),-0.5,'tPs');
+ plot(tPss-tP,(0:nsta-1)*dy); text(tPss(1)-tP(1),-0.5,'tPss');
+ plot(tPps-tP,(0:nsta-1)*dy); text(tPps(1)-tP(1),-0.5,'tPps');
+ plot(tPpp-tP,(0:nsta-1)*dy); text(tPpp(1)-tP(1),-0.5,'tPpp');
+end
Added: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/set_source.bash
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/set_source.bash (rev 0)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/set_source.bash 2012-01-24 18:50:05 UTC (rev 19452)
@@ -0,0 +1,29 @@
+#!/bin/bash
+if [ $# != 3 ]; then
+ echo 'set_source +/- angle nrec'; exit
+fi
+sign=$1
+angle=$2
+nrec=$3
+
+sed -i "s/^angleforce .*$/angleforce = $sign$angle/" SOURCE_Slave
+if [ $sign = "+" ]; then
+ sed -i "s/^xs .*$/xs = -150000/" SOURCE_Slave
+ sed -i "s/^xdeb .*$/xdeb = 100000./" Par_file_Slave_for Par_file_Slave_kernel
+ sed -i "s/^xfin .*$/xfin = 500000./" Par_file_Slave_for Par_file_Slave_kernel
+ sed -i "s/^jpeg_header.*$/jpeg_header='left-kernel-';/" plot_kernel.m
+elif [ $sign = "-" ]; then
+ sed -i "s/^xs .*$/xs = 750000/" SOURCE_Slave
+ sed -i "s/^xdeb .*$/xdeb = 500000./" Par_file_Slave_for Par_file_Slave_kernel
+ sed -i "s/^xfin .*$/xfin = 100000./" Par_file_Slave_for Par_file_Slave_kernel
+ sed -i "s/^jpeg_header.*$/jpeg_header='right-kernel-';/" plot_kernel.m
+fi
+
+sed -i "s/^nrec .*$/nrec = $nrec/" Par_file_Slave_for
+sed -i "s/^nrec .*$/nrec = $nrec/" Par_file_Slave_kernel
+
+# set select_adj.m and plot_kernel.m
+# X0 is hard-wired into selected_adj.m
+sed -i "s/^angle_inc=.*$/angle_inc=$angle;/" select_adj.m
+sed -i "s/^nsta=.*$/nsta=$nrec;/" select_adj.m
+sed -i "s/^angle_inc=.*$/angle_inc=$angle;/" plot_kernel.m
Property changes on: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/set_source.bash
___________________________________________________________________
Name: svn:executable
+ *
Added: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/stack_kernel.m
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/stack_kernel.m (rev 0)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/stack_kernel.m 2012-01-24 18:50:05 UTC (rev 19452)
@@ -0,0 +1,58 @@
+close all; clear all;
+% choose incident angles and directions to stack
+LENGTH=250000; L1=LENGTH/1000; H=40;
+nrec=30;
+% modify directions of incident waves for stacked kernels
+dir='+-'; ndir=length(dir);
+angle=[18,20,23];
+
+for idir = 1 : ndir
+ cdir=dir(idir);
+ for j = 1 : length(angle)
+ cang=angle(j);
+
+ kdir=sprintf('ang-%2.2i/nrec-%2.2i-dir-%s/',cang,nrec,cdir)
+ file=[kdir 'OUTPUT_FILES_KERNEL/proc000000_rhop_alpha_beta_kernel.dat'];
+ s=load(file);
+ if idir == 1 & j == 1
+ rhop=s(:,3); alpha=s(:,4); beta=s(:,5);
+ file=[kdir 'OUTPUT_FILES_FORWARD/receiver.dat']; rec=load(file);
+ rec=rec/LENGTH; nrec=length(rec);
+ else
+ rhop=rhop+s(:,3); alpha=alpha+s(:,4); beta=beta+s(:,5);
+ end
+ end
+end
+
+xx=s(:,1)/LENGTH;zz=s(:,2)/LENGTH;
+minx=min(xx); maxx=max(xx); minz=min(zz); maxz=max(zz);
+nx=400; nz=400;
+% define mesh
+xa=linspace(minx,maxx,nx);za=linspace(minz,maxz,nz);
+[X,Z] = meshgrid(xa,za);
+
+subplot(3,1,1)
+FV=griddata(xx,zz,rhop,X,Z);
+imagesc(xa,za,FV); set(gca,'YDir','normal'); hold on;
+plot(rec(:,1),rec(:,2),'kx')
+text(0.2,0.2,'K_{\rho_p} ')
+quiver(0.2,1-H/L1, 0.1,0,'MaxHeadsize', 30)
+title(['stacked by inc angle & dir=',num2str(ndir), ', nrec=', num2str(nrec)]);
+
+subplot(3,1,2)
+FV=griddata(xx,zz,beta,X,Z);
+imagesc(xa,za,FV); set(gca,'YDir','normal'); hold on;
+plot(rec(:,1),rec(:,2),'kx')
+plot(rec(:,1),rec(:,2),'kx')
+text(0.2,0.2,'K_\beta')
+quiver(0.2,1-H/L1, 0.1,0,'MaxHeadsize', 30)
+
+subplot(3,1,3)
+FV=griddata(xx,zz,alpha,X,Z);
+imagesc(xa,za,FV); set(gca,'YDir','normal'); hold on;
+plot(rec(:,1),rec(:,2),'kx')
+text(0.2,0.2,'K_\alpha')
+quiver(0.2,1-H/L1, 0.1,0,'MaxHeadsize', 30)
+
+jpeg=['stacked-kernel-' num2str(nrec) '-' num2str(ndir) '.jpg']
+print('-djpeg',jpeg)
\ No newline at end of file
Added: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/ttplane.m
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/ttplane.m (rev 0)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/init_plane/ttplane.m 2012-01-24 18:50:05 UTC (rev 19452)
@@ -0,0 +1,50 @@
+function [tP, tPs, tPpp, tPps, tPss] = ttplane(x0, xarray, p, H, Vp2, Vs2, Vp1, Vs1)
+% this function computes the travel time of converted phases at
+% Moho in a layer (Vp1, Vs1) over half space (Vp2, Vs2) model.
+% [tP, tPs, tPpp, tPps, tPss] = ttplane(x0, xarray, p, H, Vp2, Vs2, Vp1, Vs1)
+% the incoming plane wave is defined as f((x-x_0)*p+z*eta-t), where
+% z is vertical pointing downwards and x is the horizontal direction.
+% x can be a vector; H is in km, V is in km/s and p in s/km
+%
+nx=length(xarray);
+thp1=asin(p*Vp1); thp2=asin(p*Vp2);
+ths1=asin(p*Vs1); ths2=asin(p*Vs2);
+etap1=cos(thp1)/Vp1; etap2=cos(thp2)/Vp2;
+etas1=cos(ths1)/Vs1; etas2=cos(ths2)/Vs2;
+% initialization
+tP=zeros(size(xarray)); tPs=tP; tPpp=tP; tPps=tP; tPss=tP;
+for i = 1: nx
+ x=xarray(i);
+ if (x0+H*cot(thp2) > x)
+ error('Can not handle incidence from the right')
+ end
+ tt=p*(x-x0-H*cot(thp2));
+ tP(i)=tt+etap1*H;
+ tPs(i)=tt+etas1*H;
+ tPpp(i)=tt+etap1*3*H;
+ tPss(i)=tt+etas1*2*H+etap1*H;
+ tPps(i)=tt+etap1*2*H+etas1*H;
+% $$$ tP(i)=p*(x-xs)+etap1*H+etap2*zs;
+% $$$ %Ps
+% $$$ xx=xx1-H*tan(ths1);
+% $$$ zs=xx*cos(thp2)*sin(thp2);
+% $$$ xs=x2+xx*cos(thp2)^2;
+% $$$ tPs(i)=p*(x-xs)+etas1*H+etap2*zs;
+% $$$ %Ppp
+% $$$ xx=xx1-2*H*tan(thp1);
+% $$$ zs=xx*cos(thp2)*sin(thp2);
+% $$$ xs=x2+xx*cos(thp2)^2;
+% $$$ tPpp(i)=p*(x-xs)+etap1*2*H+etap2*zs;
+% $$$ %Pps+Psp
+% $$$ xx=xx1-H*tan(thp1)-H*tan(ths1);
+% $$$ zs=xx*cos(thp2)*sin(thp2);
+% $$$ xs=x2+xx*cos(thp2)^2;
+% $$$ tPps(i)=p*(x-xs)+etap1*H+etas1*H+etap2*zs;
+% $$$ %Pss
+% $$$ xx=xx1-2*H*tan(ths1);
+% $$$ zs=xx*cos(thp2)*sin(thp2);
+% $$$ xs=x2+xx*cos(thp2)^2;
+% $$$ tPss(i)=p*(x-xs)+etas1*2*H+etap2*zs;
+end
+
+
\ No newline at end of file
More information about the CIG-COMMITS
mailing list