# Moment Tensor, Isotropic Source querry

**URL:** <https://community.geodynamics.org/t/moment-tensor-isotropic-source-querry/438>\
**Category:** SPECFEM\
**Created:** [February 14, 2019, 11:18pm UTC](https://community.geodynamics.org/t/moment-tensor-isotropic-source-querry/438 "2019-02-14T23:18:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JAClarke](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@JAClarke](https://community.geodynamics.org/u/JAClarke)\
**Post date:** [February 14, 2019, 11:18pm UTC](https://community.geodynamics.org/t/moment-tensor-isotropic-source-querry/438/1 "2019-02-14T23:18:01Z")

</div>

Hi,  
I am trying to run an elastic simulation using an isotropic point source using the source\_type = 2 option and (Mxx=1, Mzz=1, Mxz=0). The waveform snapshots show a polarity change above and below the source and I also see an S wave generated. This isn’t what I would expect for an explosive source and I was wondering if anyone might know why this is the case?

Ive attached the waveform snapshot and have pasted the source and Parfile code below:  
 ![forward_image0000900](https://canada1.discourse-cdn.com/flex036/uploads/geodynamics/original/1X/e59eb737c814c5ee19c5b44a0ebc5f5d942a7d89.jpeg)

I appreciate any help,  
Best Regards,  
James Clarke,  
PhD Student, University of Auckland

#### 

Source file  
#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 = 2000. # source location x in meters  
zs = 1500. # source location z in meters  
source\_type = 2 # elastic force or acoustic pressure = 1 or moment tensor = 2  
time\_function\_type = 1 # Ricker = 1, first derivative = 2, Gaussian = 3, Dirac = 4, Heaviside = 5

# time function\_type == 8 source read from file, if time function\_type == 9 : burst

# If time\_function\_type == 8, enter below the custom source file to read (two columns file with time and amplitude) :

# (For the moment dt must be equal to the dt of the simulation. File name cannot exceed 150 characters)

# IMPORTANT: do NOT put quote signs around the file name, just put the file name itself otherwise the run will stop

name\_of\_source\_file = YYYYYYYYYYYYYYYYYY # Only for option 8 : file containing the source wavelet  
burst\_band\_width = 0. # Only for option 9 : band width of the burst  
f0 = 10.0 # dominant source frequency (Hz) if not Dirac or Heaviside  
tshift = 0.0 # time shift when multi sources (if one source, must be zero)  
anglesource = 0.0 # angle of the source (for a force only)  
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 = 1.d10 # amplification factor  
#######  
#######  
Parfile

#-----------------------------------------------------------------------------

# 

# simulation input parameters

# 

#-----------------------------------------------------------------------------

# title of job

title = Test of SPECFEM2D with curved interfaces

# forward or adjoint simulation

# 1 = forward, 2 = adjoint, 3 = both simultaneously

# note: 2 is purposely UNUSED (for compatibility with the numbering of our 3D codes)

SIMULATION\_TYPE = 1

# 0 = regular wave propagation simulation, 1/2/3 = noise simulation

NOISE\_TOMOGRAPHY = 0

# save the last frame, needed for adjoint simulation

SAVE\_FORWARD = .false.

# parameters concerning partitioning

NPROC = 1 # number of processes  
partitioning\_method = 3 # SCOTCH = 3, ascending order (very bad idea) = 1

# number of control nodes per element (4 or 9)

ngnod = 9

# time step parameters

# total number of time steps

NSTEP = 1500

# duration of a time step (see section “How to choose the time step” of the manual for how to do this)

DT = 5d-4

# time stepping

# 1 = Newmark (2nd order), 2 = LDDRK4-6 (4th-order 6-stage low storage Runge-Kutta), 3 = classical RK4 4th-order 4-stage Runge-Kutta

time\_stepping\_scheme = 1

# axisymmetric (2.5D) or Cartesian planar (2D) simulation

AXISYM = .false.

# set the type of calculation (P-SV or SH/membrane waves)

P\_SV = .true.

# set to true to use GPUs

GPU\_MODE = .false.

# creates/reads a binary database that allows to skip all time consuming setup steps in initialization

# 0 = does not read/create database

# 1 = creates database

# 2 = reads database

setup\_with\_binary\_database = 0

# available models

# default - define model using nbmodels below

# ascii - read model from ascii database file

# binary - read model from binary databse file

# binary\_voigt - read Voigt model from binary database file

# external - define model using define\_external\_model subroutine

# gll - read GLL model from binary database file

# legacy - read model from model\_velocity.dat\_input

MODEL = default

# Output the model with the requested type, does not save if turn to default or .false.

# (available output formats: ascii,binary,gll,legacy)

SAVE\_MODEL = default

#-----------------------------------------------------------------------------

# 

# attenuation

# 

#-----------------------------------------------------------------------------

# attenuation parameters

ATTENUATION\_VISCOELASTIC = .false. # turn attenuation (viscoelasticity) on or off for non-poroelastic solid parts of the model  
ATTENUATION\_VISCOACOUSTIC = .false. # turn attenuation (viscoacousticity) on or off for non-poroelastic fluid parts of the model

# for viscoelastic or viscoacoustic attenuation

N\_SLS = 3 # number of standard linear solids for attenuation (3 is usually the minimum)  
ATTENUATION\_f0\_REFERENCE = 5.196 # (Hz) relevant only if source is a Dirac or a Heaviside, otherwise it is f0 the dominant frequency of the source in the DATA/SOURCE file  
READ\_VELOCITIES\_AT\_f0 = .false. # shift velocities to account for physical dispersion (see user manual for more information)  
USE\_SOLVOPT = .false. # use more precise but much more expensive way of determining the Q factor relaxation times, as in [http://komatitsch.free.fr/preprints/GJI\_Lombard\_2016.pdf](http://komatitsch.free.fr/preprints/GJI_Lombard_2016.pdf)

# for poroelastic attenuation

ATTENUATION\_PORO\_FLUID\_PART = .false. # turn viscous attenuation on or off for the fluid part of poroelastic parts of the model  
Q0\_poroelastic = 1 # quality factor for viscous attenuation (ignore it if you are not using a poroelastic material)  
freq0\_poroelastic = 10 # frequency for viscous attenuation (ignore it if you are not using a poroelastic material)

# to undo attenuation and/or PMLs for sensitivity kernel calculations or forward runs with SAVE\_FORWARD

# use the flag below. It performs undoing of attenuation and/or of PMLs in an exact way for sensitivity kernel calculations

# but requires disk space for temporary storage, and uses a significant amount of memory used as buffers for temporary storage.

# When that option is on the second parameter indicates how often the code dumps restart files to disk (if in doubt, use something between 100 and 1000).

UNDO\_ATTENUATION\_AND\_OR\_PML = .false.  
NT\_DUMP\_ATTENUATION = 500

# Instead of reconstructing the forward wavefield, this option reads it from the disk using asynchronous I/O. Outperforms conventional mode using a value of NSTEP\_BETWEEN\_COMPUTE\_KERNELS high enough.

NO\_BACKWARD\_RECONSTRUCTION = .false.

#-----------------------------------------------------------------------------

# 

# sources

# 

#-----------------------------------------------------------------------------

# source parameters

NSOURCES = 1 # number of sources (source information is then read from the DATA/SOURCE file)  
force\_normal\_to\_surface = .false. # angleforce normal to surface (external mesh and curve file needed)

# use an existing initial wave field as source or start from zero (medium initially at rest)

initialfield = .false.  
add\_Bielak\_conditions\_bottom = .false. # add Bielak conditions or not if initial plane wave  
add\_Bielak\_conditions\_right = .false.  
add\_Bielak\_conditions\_top = .false.  
add\_Bielak\_conditions\_left = .false.

# acoustic forcing

ACOUSTIC\_FORCING = .false. # acoustic forcing of an acoustic medium with a rigid interface

#-----------------------------------------------------------------------------

# 

# receivers

# 

#-----------------------------------------------------------------------------

# receiver set parameters for recording stations (i.e. recording points)

seismotype = 1 # record 1=displ 2=veloc 3=accel 4=pressure 5=curl of displ 6=the fluid potential

# subsampling of the seismograms to create smaller files (but less accurately sampled in time)

subsamp\_seismos = 1

# so far, this option can only be used if all the receivers are in acoustic elements

USE\_TRICK\_FOR\_BETTER\_PRESSURE = .false.

# every how many time steps we save the seismograms

# (costly, do not use a very small value; if you use a very large value that is larger than the total number

# of time steps of the run, the seismograms will automatically be saved once at the end of the run anyway)

NSTEP\_BETWEEN\_OUTPUT\_SEISMOS = 1000

# use this t0 as earliest starting time rather than the automatically calculated one

USER\_T0 = 0.0d0

# seismogram formats

save\_ASCII\_seismograms = .true. # save seismograms in ASCII format or not  
save\_binary\_seismograms\_single = .false. # save seismograms in single precision binary format or not (can be used jointly with ASCII above to save both)  
save\_binary\_seismograms\_double = .false. # save seismograms in double precision binary format or not (can be used jointly with both flags above to save all)  
SU\_FORMAT = .false. # output single precision binary seismograms in Seismic Unix format (adjoint traces will be read in the same format)

# use an existing STATION file found in ./DATA or create a new one from the receiver positions below in this Par\_file

use\_existing\_STATIONS = .false.

# number of receiver sets (i.e. number of receiver lines to create below)

nreceiversets = 1

# orientation

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)

# first receiver set (repeat these 6 lines and adjust nreceiversets accordingly)

nrec = 1 # number of receivers  
xdeb = 2000. # first receiver x in meters  
zdeb = 1500. # first receiver z in meters  
xfin = 2000. # last receiver x in meters (ignored if only one receiver)  
zfin = 1500. # last receiver z in meters (ignored if only one receiver)  
record\_at\_surface\_same\_vertical = .true. # receivers inside the medium or at the surface (z values are ignored if this is set to true, they are replaced with the topography height)

# first receiver set (repeat these 6 lines and adjust nreceiversets accordingly)

#nrec = 11 # number of receivers  
#xdeb = 2500. # first receiver x in meters  
#zdeb = 2500. # first receiver z in meters  
#xfin = 2500. # last receiver x in meters (ignored if only one #receiver)  
#zfin = 0. # last receiver z in meters (ignored if only one #receiver)  
#record\_at\_surface\_same\_vertical = .false. # receivers inside the medium or at the surface ##(z values are ignored if this is set to true, they are replaced with the topography height)

#-----------------------------------------------------------------------------

# 

# adjoint kernel outputs

# 

#-----------------------------------------------------------------------------

# save sensitivity kernels in ASCII format (much bigger files, but compatible with current GMT scripts) or in binary format

save\_ASCII\_kernels = .true.

# since the accuracy of kernel integration may not need to respect the CFL, this option permits to save computing time, and memory with UNDO\_ATTENUATION\_AND\_OR\_PML mode

NSTEP\_BETWEEN\_COMPUTE\_KERNELS = 1

#-----------------------------------------------------------------------------

# 

# boundary conditions

# 

#-----------------------------------------------------------------------------

# Perfectly Matched Layer (PML) boundaries

# absorbing boundary active or not

PML\_BOUNDARY\_CONDITIONS = .true.  
NELEM\_PML\_THICKNESS = 3  
ROTATE\_PML\_ACTIVATE = .false.  
ROTATE\_PML\_ANGLE = 30.

# change the four parameters below only if you know what you are doing; they change the damping profiles inside the PMLs

K\_MIN\_PML = 1.0d0 # from Gedney page 8.11  
K\_MAX\_PML = 1.0d0  
damping\_change\_factor\_acoustic = 0.5d0  
damping\_change\_factor\_elastic = 1.0d0

# set the parameter below to .false. unless you know what you are doing; this implements automatic adjustment of the PML parameters for elongated models.

# The goal is to improve the absorbing efficiency of PML for waves with large incidence angles, but this can lead to artefacts.

# In particular, this option is efficient only when the number of sources NSOURCES is equal to one.

PML\_PARAMETER\_ADJUSTMENT = .false.

# Stacey ABC

STACEY\_ABSORBING\_CONDITIONS = .false.

# periodic boundaries

ADD\_PERIODIC\_CONDITIONS = .false.  
PERIODIC\_HORIZ\_DIST = 4000.d0

#-----------------------------------------------------------------------------

# 

# velocity and density models

# 

#-----------------------------------------------------------------------------  
nbmodels = 1

# available material types (see user manual for more information)

# acoustic: model\_number 1 rho Vp 0 0 0 QKappa Qmu 0 0 0 0 0 0 (for QKappa and Qmu use 9999 to ignore them)

# when viscoelasticity is turned on, the Vp and Vs values that are read here are the UNRELAXED ones i.e. the values at infinite frequency

# unless the READ\_VELOCITIES\_AT\_f0 parameter above is set to true, in which case they are the values at frequency f0.

# Please also note that Qmu is always equal to Qs, but Qkappa is in general not equal to Qp.

# To convert one to the other see doc/Qkappa\_Qmu\_versus\_Qp\_Qs\_relationship\_in\_2D\_plane\_strain.pdf and

# utils/attenuation/conversion\_from\_Qkappa\_Qmu\_to\_Qp\_Qs\_from\_Dahlen\_Tromp\_959\_960.f90.

# elastic: model\_number 1 rho Vp Vs 0 0 QKappa Qmu 0 0 0 0 0 0 (for QKappa and Qmu use 9999 to ignore them)

# anisotropic: model\_number 2 rho c11 c13 c15 c33 c35 c55 c12 c23 c25 0 0 0

# anisotropic in AXISYM: model\_number 2 rho c11 c13 c15 c33 c35 c55 c12 c23 c25 c22 0 0

# poroelastic: model\_number 3 rhos rhof phi c kxx kxz kzz Ks Kf Kfr etaf mufr Qmu

# tomo: model\_number -1 0 0 A 0 0 0 0 0 0 0 0 0 0

1 1 2000.d0 3000.d0 1500.d0 0 0 9999 9999 0 0 0 0 0 0

# external tomography file

TOMOGRAPHY\_FILE = ./DATA/tomo\_file.xyz

# use an external mesh created by an external meshing tool or use the internal mesher

read\_external\_mesh = .false.

#----------------------------------------------------------------------------

# 

# 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/mesh\_file # file containing the mesh  
nodes\_coords\_file = ./DATA/nodes\_coords\_file # file containing the nodes coordinates  
materials\_file = ./DATA/materials\_file # file containing the material number for each element  
free\_surface\_file = ./DATA/free\_surface\_file # file containing the free surface  
axial\_elements\_file = ./DATA/axial\_elements\_file # file containing the axial elements if AXISYM is true  
absorbing\_surface\_file = ./DATA/absorbing\_surface\_file # file containing the absorbing surface  
acoustic\_forcing\_surface\_file = ./DATA/MSH/Surf\_acforcing\_Bottom\_enforcing\_mesh # file containing the acoustic forcing surface  
absorbing\_cpml\_file = ./DATA/absorbing\_cpml\_file # file containing the CPML element numbers  
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\_simple\_topo\_flat.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 = 4000.d0 # abscissa of right side of the model  
nx = 80 # 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 = 1 # then set below the different regions and model number for each region

# format of each line: nxmin nxmax nzmin nzmax material\_number

1 80 1 60 1

#-----------------------------------------------------------------------------

# 

# display parameters

# 

#-----------------------------------------------------------------------------

# every how many time steps we display information about the simulation (costly, do not use a very small value)

NSTEP\_BETWEEN\_OUTPUT\_INFO = 100

# meshing output

output\_grid\_Gnuplot = .false. # generate a GNUPLOT file containing the grid, and a script to plot it  
output\_grid\_ASCII = .false. # dump the grid in an ASCII text file consisting of a set of X,Y,Z points or not

# to plot total energy curves, for instance to monitor how CPML absorbing layers behave;

# should be turned OFF in most cases because a bit expensive

OUTPUT\_ENERGY = .false.

# every how many time steps we compute energy (which is a bit expensive to compute)

NTSTEP\_BETWEEN\_OUTPUT\_ENERGY = 10

# Compute the field int\_0^t v^2 dt for a set of GLL points and write it to file. Use

# the script utils/visualisation/plotIntegratedEnergyFile.py to watch. It is refreshed at the same time than the seismograms

COMPUTE\_INTEGRATED\_ENERGY\_FIELD = .false.

#-----------------------------------------------------------------------------

# 

# movies/images/snaphots

# 

#-----------------------------------------------------------------------------

# every how many time steps we draw JPEG or PostScript pictures of the simulation

# and/or we dump results of the simulation as ASCII or binary files (costly, do not use a very small value)

NSTEP\_BETWEEN\_OUTPUT\_IMAGES = 100

# minimum amplitude kept in % for the JPEG and PostScript snapshots; amplitudes below that are muted

cutsnaps = 1.

#### for JPEG color images

output\_color\_image = .true. # output JPEG color image of the results every NSTEP\_BETWEEN\_OUTPUT\_IMAGES time steps or not  
imagetype\_JPEG = 2 # display 1=displ\_Ux 2=displ\_Uz 3=displ\_norm 4=veloc\_Vx 5=veloc\_Vz 6=veloc\_norm 7=accel\_Ax 8=accel\_Az 9=accel\_norm 10=pressure  
factor\_subsample\_image = 1.0d0 # (double precision) factor to subsample or oversample (if set to e.g. 0.5) color images output by the code (useful for very large models, or to get nicer looking denser pictures)  
USE\_CONSTANT\_MAX\_AMPLITUDE = .false. # by default the code normalizes each image independently to its maximum; use this option to use the global maximum below instead  
CONSTANT\_MAX\_AMPLITUDE\_TO\_USE = 1.17d4 # constant maximum amplitude to use for all color images if the above USE\_CONSTANT\_MAX\_AMPLITUDE option is true  
POWER\_DISPLAY\_COLOR = 0.30d0 # non linear display to enhance small amplitudes in JPEG color images  
DRAW\_SOURCES\_AND\_RECEIVERS = .true. # display sources as orange crosses and receivers as green squares in JPEG images or not  
DRAW\_WATER\_IN\_BLUE = .true. # display acoustic layers as constant blue in JPEG images, because they likely correspond to water in the case of ocean acoustics or in the case of offshore oil industry experiments (if off, display them as greyscale, as for elastic or poroelastic elements, for instance for acoustic-only oil industry models of solid media)  
USE\_SNAPSHOT\_NUMBER\_IN\_FILENAME = .false. # use snapshot number in the file name of JPEG color snapshots instead of the time step (for instance to create movies in an easier way later)

#### for PostScript snapshots

output\_postscript\_snapshot = .true. # output Postscript snapshot of the results every NSTEP\_BETWEEN\_OUTPUT\_IMAGES time steps or not  
imagetype\_postscript = 1 # display 1=displ vector 2=veloc vector 3=accel vector; small arrows are displayed for the vectors  
meshvect = .true. # display mesh on PostScript plots or not  
modelvect = .false. # display velocity model on PostScript plots or not  
boundvect = .true. # display boundary conditions on PostScript plots or not  
interpol = .true. # interpolation of the PostScript display on a regular grid inside each spectral element, or use the non-evenly spaced GLL points  
pointsdisp = 6 # number of points in each direction for interpolation of PostScript snapshots (set to 1 for lower-left corner only)  
subsamp\_postscript = 1 # subsampling of background velocity model in PostScript snapshots  
sizemax\_arrows = 1.d0 # maximum size of arrows on PostScript plots in centimeters  
US\_LETTER = .false. # use US letter or European A4 paper for PostScript plots

#### for wavefield dumps

output\_wavefield\_dumps = .false. # output wave field to a text file (creates very big files)  
imagetype\_wavefield\_dumps = 1 # display 1=displ vector 2=veloc vector 3=accel vector 4=pressure  
use\_binary\_for\_wavefield\_dumps = .false. # use ASCII or single-precision binary format for the wave field dumps

#-----------------------------------------------------------

# Ability to run several calculations (several earthquakes)

# in an embarrassingly-parallel fashion from within the same run;

# this can be useful when using a very large supercomputer to compute

# many earthquakes in a catalog, in which case it can be better from

# a batch job submission point of view to start fewer and much larger jobs,

# each of them computing several earthquakes in parallel.

# To turn that option on, set parameter NUMBER\_OF\_SIMULTANEOUS\_RUNS to a value greater than 1.

# To implement that, we create NUMBER\_OF\_SIMULTANEOUS\_RUNS MPI sub-communicators,

# each of them being labeled “my\_local\_mpi\_comm\_world”, and we use them

# in all the routines in “src/shared/parallel.f90”, except in MPI\_ABORT() because in that case

# we need to kill the entire run.

# When that option is on, of course the number of processor cores used to start

# the code in the batch system must be a multiple of NUMBER\_OF\_SIMULTANEOUS\_RUNS,

# all the individual runs must use the same number of processor cores,

# which as usual is NPROC in the Par\_file,

# and thus the total number of processor cores to request from the batch system

# should be NUMBER\_OF\_SIMULTANEOUS\_RUNS \* NPROC.

# All the runs to perform must be placed in directories called run0001, run0002, run0003 and so on

# (with exactly four digits).

# 

# Imagine you have 10 independent calculations to do, each of them on 100 cores; you have three options:

# 

# 1/ submit 10 jobs to the batch system

# 

# 2/ submit a single job on 1000 cores to the batch, and in that script create a sub-array of jobs to start 10 jobs,

# each running on 100 cores (see e.g. [http://www.schedmd.com/slurmdocs/job\_array.html](http://www.schedmd.com/slurmdocs/job_array.html) )

# 

# 3/ submit a single job on 1000 cores to the batch, start SPECFEM2D on 1000 cores, create 10 sub-communicators,

# cd into one of 10 subdirectories (called e.g. run0001, run0002,… run0010) depending on the sub-communicator

# your MPI rank belongs to, and run normally on 100 cores using that sub-communicator.

# 

# The option below implements 3/.

# 

NUMBER\_OF\_SIMULTANEOUS\_RUNS = 1

# if we perform simultaneous runs in parallel, if only the source and receivers vary between these runs

# but not the mesh nor the model (velocity and density) then we can also read the mesh and model files

# from a single run in the beginning and broadcast them to all the others; for a large number of simultaneous

# runs for instance when solving inverse problems iteratively this can DRASTICALLY reduce I/Os to disk in the solver

# (by a factor equal to NUMBER\_OF\_SIMULTANEOUS\_RUNS), and reducing I/Os is crucial in the case of huge runs.

# Thus, always set this option to .true. if the mesh and the model are the same for all simultaneous runs.

# In that case there is no need to duplicate the mesh and model file database (the content of the DATABASES\_MPI

# directories) in each of the run0001, run0002,… directories, it is sufficient to have one in run0001

# and the code will broadcast it to the others)

BROADCAST\_SAME\_MESH\_AND\_MODEL = .true.

---

<div class="post-metadata">

**Author:** ![jpampuero](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/jpampuero/32/126_2.png) [@jpampuero](https://community.geodynamics.org/u/jpampuero)\
**Post date:** [February 15, 2019, 7:53am UTC](https://community.geodynamics.org/t/moment-tensor-isotropic-source-querry/438/2 "2019-02-15T07:53:12Z")

</div>

Hi James,

Polarity change: What quantity is plotted in your figure? If it’s for instance the vertical component of motion, you do expect a sign change.

Unexpected S wave front with isotropic source: This may happen when the mesh is too coarse compared to the smallest wavelength excited by the source ~cs/(2.5\*f0). Have you checked this: [https://github.com/geodynamics/specfem2d/wiki/03\_mesh\_generation#controlling-how-the-mesh-samples-the-wave-field](https://github.com/geodynamics/specfem2d/wiki/03_mesh_generation#controlling-how-the-mesh-samples-the-wave-field) ?

These are just hints. Others may have more ideas.

Pablo

---

<div class="post-metadata">

**Author:** ![JAClarke](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@JAClarke](https://community.geodynamics.org/u/JAClarke)\
**Post date:** [February 17, 2019, 11:11pm UTC](https://community.geodynamics.org/t/moment-tensor-isotropic-source-querry/438/3 "2019-02-17T23:11:50Z")

</div>

Hi Pablo,  
Thanks for your reply. The figure I posted shows the displacement wave field (seismotype= 1). I guess this does show vertical displacement in the wavefield snapshots?? If this is the case then I agree that the change in polarity makes sense.

Ah, you were right about the mesh being too course. The points per S- wavelength was above the threshold value of 4.5 before, but by changing it to 6 I can see that the S- wave disappears.

Thanks for your help. I’m just trying to learn and understand the program so your comments are very helpful.

Thanks,  
James

---

<div class="post-metadata">

**Author:** ![brioglade](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/brioglade/32/203_2.png) [@brioglade](https://community.geodynamics.org/u/brioglade)\
**Post date:** [March 17, 2019, 1:42pm UTC](https://community.geodynamics.org/t/moment-tensor-isotropic-source-querry/438/4 "2019-03-17T13:42:43Z")

</div>

Hi,James  
How to set moment magnitude Mw parameter in par\_file ?  
thank u ,  
Sam

---

<div class="post-metadata">

**Author:** ![JAClarke](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@JAClarke](https://community.geodynamics.org/u/JAClarke)\
**Post date:** [March 18, 2019, 10:29pm UTC](https://community.geodynamics.org/t/moment-tensor-isotropic-source-querry/438/5 "2019-03-18T22:29:20Z")

</div>

Hi Sam,

I’m not an expert but I think you set it in the source file using:

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 = 1.d10

I used the above for an explosive source and applied an amplification of 1e10 but I didnt really care about the Mw.

Hope this helps,

Cheers,

James
