## NAME

          psmeca - Plot focal mechanisms on maps

## SYNOPSIS

          psmeca files -Jparameters -Rwest/east/south/north [-Btickinfo] [-Cpen]
          [-Ddepmin/depmax] [-Efill] [-Gfill] [-H[n]] [-K] [-Lpen] [-M] [-N] [-O]
          [-P] [-S<symbol><scale>[/d]] [-Tnum_of_plane[<pen>]] [-U[label]] [-V]
          [-Wpen] [-Xx-shift] [-Yy-shift] [-Zcptfile] [-z] [-a<size>
          [P_symbol>[T_symbol]] [-gfill] [-efill] [-ppen] [-tpen] [-:] [-ccopies]

## DESCRIPTION

          psmeca reads data values from files [or standard input] and generates
          PostScript code that will plot focal mechanisms on a map.  Most
          options are the same as for psxy.  The PostScript code is written to
          standard output.

## ARGUMENTS

          files List one or more file-names. If no files are given, psvelomeca
          will read standard input.

          -J Selects the map projection. Scale is cm/degree, 1:xxxxx. or width
          in cm (upper case modifier).

          See psbasemap manpages for details.

          -R west, east, south, and north specify the Region of interest.  To
          specify your boundaries in degrees and minutes, use the dd:mm format.

          -SSelects the meaning of the columns in the data file

          In order to use the same file to plot cross-sections, depth is in
          third column.  Nevetheless, it is possible to use "old style"
          psvelomeca input files without depth in third column using -o option.

          -Sascale[c/i][/fontsize[/offset[u]]]. Focal mechanisms in Aki and
          Richard convention.  scale adjusts the scaling of the radius of the
          "beach ball", which will be proportional to the magnitude. Scale is
          the size for magnitude = 5. in inch (unless c, i, m, or p is
          appended).  Use the -T option to render the beach ball transparent by
          drawing only the nodal planes and the circumference.  The color or
          shade of the compressive quadrants can be specified with the -G
          option.  The color or shade
           of the extensive quadrants can be specified with the -E option.
          Parameters are expected to be in the following columns:

          1,2  longitude, latitude of event (-: option interchanges order)

          3    depth of event in kilometers

          4,5,6
               strike, dip and rake in degrees

          7    magnitude

          8,9  longitude, latitude at which to place beach ball. Entries in
               these columns are necessary with the -C option.  Using 0,0 in
               columns 8 and 9 will plot the beach ball at the latitude,
               longitude given in columns 1 and 2.  The -: option will
               interchange the order of columns (1,2) and (8,9).

          10   Text string to appear above the beach ball (optional).

               -Scscale[c/i][/fontsize[/offset[u]]]. Focal mechanisms in Harvard
               CMT convention.  scale adjusts the scaling of the radius of the
               "beach ball", which will be proportional to the magnitude. Scale
               is the size for magnitude = 5 (that is M0 = 4.0E23 dynes-cm) in
               inch (unless c, i, m, or p is appended).  Use the -T option to
               render the beach ball transparent by drawing only the nodal
               planes and the circumference. The color or shade of the
               compressive quadrants can be specified with the -G option.  The
               color or shade
                of the extensive quadrants can be specified with the -E option.
               Parameters are expected to be in the following columns:

          1,2  longitude, latitude of event (-: option interchanges order)

          3    depth of event in kilometers

          4,5,6
               strike, dip, and rake of plane 1

          7,8,9
               strike, dip, and rake of plane 2

          10,11
               mantissa and exponent of moment in dyne-cm

          12,13
               longitude,longitude at which to place beach ball. Entries in
               these columns are necessary with the -C option.  Using (0,0) in
               columns 11 and 12 will plot the beach ball at the latitude,
               longitude given in columns 1 and 2.  The -: option will
               interchange the order of columns (1,2) and (12,13).

          14   Text string to appear above the beach ball (optional).
               -Smscale[c/i][/fontsize[/offset[u]]]. Seismic moment tensor
               (Harvard CMT, with zero trace). scale adjusts the scaling of the
               radius of the "beachball", which will be proportional to the
               magnitude. Scale is the size for magnitude = 5 (that is scalar
               seismic moment = 4.0E23 dynes-cm) in inch (unless c, i, m, or p
               is appended).  (-T0 option overlays best double couple
               transparently.) Put -Sdscale[/fontsize[/offset[u]]] to plot the
               only double couple part of moment tensor.  Put
               -Szscale[/fontsize[/offset[u]]] to plot anisotropic part of
               moment tensor (zero trace).  The color or shade of the
               compressive quadrants can be specified with the -G option.  The
               color or shade
                of the extensive quadrants can be specified with the -E option.
               Parameters are expected to be in the following columns

          1,2  longitude, latitude of event (-: option interchanges order)

          3    depth of event in kilometers

          4,5,6,7,8,9
               mrr, mtt, mff, mrt, mrf, mtf in 10*exponent dynes-cm

          10   exponent

          11,12
               latitude,longitude at which to place beach ball. Entries in these
               columns are necessary with the -C option.  Using 0,0 in columns 9
               and 10 will plot the beach ball at the latitude, longitude given
               in columns 1 and 2.  The -: option will interchange the order of
               columns (1,2) and (9,10).

          13   Text string to appear above the beach ball (optional).

               -Spscale[c/i][/fontsize[/offset[u]]]. Focal mechanisms given with
               partial data on both palnes.  scale adjusts the scaling of the
               radius of the "beach ball", which will be proportional to the
               magnitude. Scale is the size for magnitude = 5 in inch (unless c,
               i, m, or p is appended).  The color or shade of the compressive
               quadrants can be specified with the -G option.  The color or
               shade
                of the extensive quadrants can be specified with the -E option.
               Parameters are expected to be in the following columns

          1,2  longitude, latitude of event (-: option interchanges order)

          3    depth of event in kilometers

          4,5  strike, dip of plane 1

          6    strike of plane 2

          7    must be -1/+1 for a normal/inverse fault

          8    magnitude

          9,10 latitude,longitude at which to place beach ball. Entries in these
               columns are necessary with the -C option.  Using 0,0 in columns 9
               and 10 will plot the beach ball at the latitude, longitude given
               in columns 1 and 2.  The -: option will interchange the order of
               columns (1,2) and (9,10).

          11   Text string to appear above the beach ball (optional).

               -Sxscale[c/i][/fontsize[/offset[u]]]. principal axis. scale
               adjusts
                the scaling of the radius of the "beachball", which will be
               proportional to the magnitude. Scale is the size for magnitude =
               5 (that is seismic scalar moment = 4*10e+23 dynes-cm) in inch
               (unless c, i, m, or p is appended).  (-T0 option overlays best
               double couple transparently.) Put
               -Syscale[c/i][/fontsize[/offset[u]]] to plot the only double
               couple part of moment tensor.  Put
               -Stscale[c/i][/fontsize[/offset[u]]] to plot zero trace moment
               tensor.  The color or shade of the compressive quadrants can be
               specified with the -G option.  The color or shade
                of the extensive quadrants can be specified with the -E option.
               Parameters are expected to be in the following columns

          1,2  longitude, latitude of event (-: option interchanges order)

          3    depth of event in kilometers

          4,5,6,7,8,9,10,11,12
               value (in 10*exponent dynes-cm), azimuth, plunge of T, N, P axis.

          13   exponent

          14,15
               latitude,longitude at which to place beach ball. Entries in these
               columns are necessary with the -C option.  Using 0,0 in columns 9
               and 10 will plot the beach ball at the latitude, longitude given
               in columns 1 and 2.  The -: option will interchange the order of
               columns (1,2) and (9,10).

          16   Text string to appear above the beach ball (optional).

               -R west, east, south, and north specify the region of interest.
               To specify your boundaries in degrees and minutes, use the dd:mm
               format by appending 'm'.

## OPTIONS

          No space between the option flag and the associated arguments.

          -B Sets map boundary tickmark intervals. See psbasemap for details.

          -C[pen] Offsets focal mechanisms to the latitude and longitude
          specified in the last two columns of the input file.

          -D depmin/depmax Plots events between depmin and depmax.

          -Efill Selects filling of extensive quadrants. Usually white.  Set the
          shade (0255) or color (r/g/b) [Default is 255/255/255].

          -Gfill Selects filling of focal mechanisms.  By convention, the
          compressional quadrants of the focal mechanism beach balls are shaded.
          Set the shade (0-255) or color (r/g/b) [Default is 0/0/0].

          -H[n] Input file(s) has n Header record(s). Number of header records
          can be changed by editing your .gmtdefaults file. If used, GMT-SYSTEM
          default is 1 header record.

          -K Means more PostScript code will be appended later. [Default
          terminates the plot system]

          -L[pen] Draws the "beach ball" outline using current pen (see -W), or
          sets pen attributes.

          -N Does NOT skip symbols that fall outside frame boundary specified by
          -R [Default plots symbols inside frame only].

          -O Selects Overlay plot mode. [Default initializes a new plot system]

          -P Selects Portrait plotting mode. [Default is Landscape]

          -T[num_of_plane] Plots the nodal planes and outline the bubble which
          is transparent.
                num_of_plane equal  0 : both nodal planes are plotted;
                num_of_plane equal  1 : the only first nodal plane is plotted;
                num_of_plane equal  2 : the only second nodal plane is plotted;

          -U Draws Unix System time stamp on plot.  Append c to plot the command
          line or a text string of your choice.

          -V Verbose.  Reports the name of the current file being plotted, as
          well as number of records.

          -W Set default pen attributes for fault plane edges, label, ....
           [Defaults: width = 1, color = 0/0/0, texture = solid].

          -X -Y Shift origin of plot by (x-shift,y-shift) inches  [Default is
          (1,1) for new plots, (0,0) for overlays].

          -Zcptfile Give a color palette file and let compressive part color be
          determined by the z-value in the third column.

          -z Overlay zero trace moment tensor.

          -a[axis_symbol_size[c/i][/P_axis_symbol[T_axis_symbol]]]
          Computes and plots P and T axis.  - axis_symbol_size in inch [default
          is 0.2 cm or 0.08 inches].  inch (unless c, i, m, or p is appended)
          - default P and T axis symbols is 'c'
          Choose between the following : (c) circle, (d) diamond, (h) hexagon,
          (i) inverse triangle, (p)point, (s) square, (t) triangle, (x) cross.

          -efill Selects filling of T axis symbol.  Set the shade (0255) or
          color (r/g/b) [Default is color of extensive parts.

          -gfill Selects filling of P axis symbol.  Set the shade (0255) or
          color (r/g/b) [Default is color of compressive parts.

          -p[pen] Draws the P axis outline using current pen (see -W), or sets
          pen attributes.
          sp.  -t[pen] Draws the T axis outline using current pen (see -W), or
          sets pen attributes.
          sp.  -: Toggles between (longitude,latitude) and (latitude,longitude)
          input/output.  [Default is (longitude,latitude)]

          -c Specifies the number of plot copies. [Default is 1]

## EXAMPLES

          The following file should give a normal-faulting CMT mechanism:
          psmeca << END -R239/240/34/35.2 -Jm4 \
          -Sc0.4 -H1 >! test.ps
          lon     lat    depth str dip slip  st dip slip mant exp plon plat
          239.384 34.556  12.  180  18  -88   0  72  -90  5.5  0   0    0
          END

## SEE ALSO

          gmtsystem, psbasemap, psxy.

## REFERENCES

          Bomford, G., Geodesy, 4th ed., Oxford University Press, 1980.
          Aki, K. and P. Richards, Quantitative Seismolgy, Freeman, 1980.
          F. A. Dahlen and Jeoren Trom, Theoretical Seismology, Princeton, 1998,
          p.167.
          Cliff Frohlich, Cliff'Nodes Concerning Plotting Nodal Lines for P, Sh
          and Sv
          Seismological Reasearch Letters, Volume 67, Number 1, January-
          February, 1996
          Thorne Lay, Terry C. Wallace, Modern Global Seismology, Academic
          Press, 1995, p.384.
          W.H. Press, S.A. Teukolsky, W.T. Vetterling, B.P. Flannery, Numerical
          Recipes in
           C, Cambridge University press (routine jacobi)

## AUTHORS

          Genevieve Patau
          CNRS UMR 7580
          Seismology Dept.
          Institut de Physique du Globe de Paris
          (patau@.ipgp.jussieu.fr)