葡萄 发表于 2013-4-13 21:59:30

GMT绘制震源球(psmeca)

psmeca是GMT的一个命令,这个命令特殊之处在于其并没有出现在GMT Technical Reference and Cookbook中,然而其却真实的存在于bin下,不知道这是GMT的一个遗漏还是故意为之。趁机看了一下GMT的bin目录,发现除了一些常见命令之外,其实还有很多有用的脚本的,有时间再折腾~

----------------------------------------------------------------------------------------------
psmeca的帮助文档给出其用途:Plot seismological symbols on maps
用法:psmeca <infiles> -J<params> -R<west>/<east>/<south>/<north>
                        -S<format><scale>]
                        [-B<params>] [-C[<pen>]]
                        [-Ddepmin/depmax] [-E<fill>] [-G<fill>]
                        [-H[<nrec>]] [-K] [-L<pen>] [-M] [-N] [-O] [-P] [-r]
                        [-Tnplane[/<pen>]] [-U[<just>/<dx>/<dy>/]]
                        [-V] [-W<pen>] [-X<x_shift>] [-Y<x_shift>]
                        [-Z<cpt>] [-z] [-a]]
下面对一些特别的选项做下介绍:
-C 在绘制震源球时,GMT会首先在震源处(经纬度由infiles给定)绘制一个小圆,然后用直线连接震源与震源球, pen指定线属性,包括宽度、颜色、线型等,pointsize指定小圆的大小。
-D只绘制某一深度范围之内的震源球
-E、-G 指定了震源球压缩、拉伸部分的颜色,默认压缩部分为黑色,拉伸部分为白色
-L 绘制震源球轮廓
-M所有震级的震源球大小相同,大小由-S给出
-N不要跳过那些震源球落在图形边界外的
-r 在文本周围绘制框
-S指定输入文件格式以及震源球大小
    (c) Focal mechanisms in Harvard CMT convention
         X, Y, depth, strike1, dip1, rake1, strike2, dip2, rake2, moment, newX, newY, event_title
    (a) Focal mechanism in Aki & Richard's convention:
          X, Y, depth, strike, dip, rake, mag, newX, newY, event_title
    (p) Focal mechanism defined with
         X, Y, depth, strike1, dip1, strike2, fault, mag, newX, newY, event_title
         fault = -1/+1 for a normal/inverse fault
    (m) Sesmic moment tensor (Harvard CMT, with zero trace)
          X, Y, depth, mrr, mtt, mff, mrt, mrf, mtf, exp, newX, newY, event_title
   (z) Anisotropic part of seismic moment tensor (Harvard CMT, with zero trace)
          X, Y, depth, mrr, mtt, mff, mrt, mrf, mtf, exp, event_title
    (d) Best double couple defined from seismic moment tensor (Harvard CMT, with zero trace)
          X, Y, depth, mrr, mtt, mff, mrt, mrf, mtf, exp, newX, newY, event_title
    (x) Principal axis
          X, Y, depth, T_value, T_azim, T_plunge, N_value, N_azim, N_plunge
          P_value, P_azim, P_plunge, exp, newX, newY, event_title
    (t) Zero trace moment tensor defined from principal axis
         X, Y, depth, T_value, T_azim, T_plunge, N_value, N_azim, N_plunge
         P_value, P_azim, P_plunge, exp, newX, newY, event_title
    (y) Best double couple defined from principal axis
         X, Y, depth, T_value, T_azim, T_plunge, N_value, N_azim, N_plunge
         P_value, P_azim, P_plunge, exp, newX, newY, event_title
-------------------------------------------------------------------------------------------
实例:REM This script is used to plot a focal mechanisms on maps
set PS=meca.ps
set LON=80
set LAT=35
psbasemap -Rg -JE%LON%/%LAT%/180/6i -B:".GCMT": -K -P >%PS%
pscoast -Rg -J -B -Dc -A10000 -Wthin -G200 -K -P -O -U"xxq">>%PS%
REM plot mechanism
echo -26.55 -60.71 24 1.06 -0.24 -0.82 0.09 0.64 -0.62 26 -26.55 -60.71 200904161457A | psmeca -Rg -JE%LON%/%LAT%/180/6i -Sm1 -T0 -W1p -K -O -P >>%PS%
del .gmt*效果图:

页: [1]
查看完整版本: GMT绘制震源球(psmeca)