update files

update all files
This commit is contained in:
张壹 2018-03-18 23:30:24 -07:00
parent 4df3131a39
commit f75af72132
6 changed files with 17 additions and 15 deletions

5
gmtsph-profile.sh Normal file → Executable file
View File

@ -76,12 +76,13 @@ else
MAP_GRID_CROSS_SIZE_PRIMARY=2p \ MAP_GRID_CROSS_SIZE_PRIMARY=2p \
FONT_LABEL=7p,Times-Roman,black \ FONT_LABEL=7p,Times-Roman,black \
MAP_FRAME_AXES=wEsNZ \ MAP_FRAME_AXES=wEsNZ \
COLOR_NAN=white \
MAP_LABEL_OFFSET=4p MAP_LABEL_OFFSET=4p
gmt grd2cpt ${data} -C${color} -Z -D > $cptfile gmt grd2cpt ${data} -C${color} -Z -D -M > $cptfile
gmt grdimage ${data} -R${range} -C${cptfile} -Bxag+l"${labels[0]}" -Byag+l"${labels[1]}" -JPa3i/${offangle}z -K -Y1i -P > $psfile gmt grdimage ${data} -R${range} -C${cptfile} -Bxag+l"${labels[0]}" -Byag+l"${labels[1]}" -JPa3i/${offangle}z -K -Y1i -P > $psfile
gmt psscale -Dx0.4i/-0.25i+w2.2i/0.1i+h -C${cptfile} -Bxa -By+l${unit} -O >> $psfile gmt psscale -Dx0.4i/-0.25i+w2.2i/0.1i+h -C${cptfile} -Bxa -By+l${unit} -O >> $psfile
gmt psconvert $psfile -A -TeG -E300 gmt psconvert $psfile -A -TEG -E300
# 删除临时文件 使用linux终端rm命令 # 删除临时文件 使用linux终端rm命令
rm $cptfile $psfile gmt.history gmt.conf rm $cptfile $psfile gmt.history gmt.conf
if [[ $plotgrad == 1 ]]; then if [[ $plotgrad == 1 ]]; then

2
sph_global.sh Normal file → Executable file
View File

@ -81,7 +81,7 @@ else
fi fi
#-C${cptfile}+Uk 使用km色标单位除1000 #-C${cptfile}+Uk 使用km色标单位除1000
gmt psscale -Dx0.5i/-0.3i+w2i/0.07i+h -C${cptfile} -Bxa -By+l${unit} -O >> $psfile gmt psscale -Dx0.5i/-0.3i+w2i/0.07i+h -C${cptfile} -Bxa -By+l${unit} -O >> $psfile
gmt psconvert $psfile -A -TeG -E300 gmt psconvert $psfile -A -TEG -E300
# 删除临时文件 使用linux终端rm命令 # 删除临时文件 使用linux终端rm命令
rm $cptfile $psfile gmt.history gmt.conf rm $cptfile $psfile gmt.history gmt.conf
if [[ $plotgrad == 1 ]]; then if [[ $plotgrad == 1 ]]; then

2
sph_global_dot.sh Normal file → Executable file
View File

@ -79,7 +79,7 @@ else
gmt psxy ${data} -i${cols} -Bxag+l"${labels[0]}" -B+ggrey -Bpya40g40+l"${labels[1]}" -JN0/3i -R${range} -C${cptfile} -Sc0.04c -Gblack -P -K > $psfile gmt psxy ${data} -i${cols} -Bxag+l"${labels[0]}" -B+ggrey -Bpya40g40+l"${labels[1]}" -JN0/3i -R${range} -C${cptfile} -Sc0.04c -Gblack -P -K > $psfile
#-C${cptfile}+Uk 使用km色标单位除1000 #-C${cptfile}+Uk 使用km色标单位除1000
gmt psscale -Dx0.5i/-0.3i+w2i/0.07i+h -C${cptfile} -Bxa -By+l${unit} -O >> $psfile gmt psscale -Dx0.5i/-0.3i+w2i/0.07i+h -C${cptfile} -Bxa -By+l${unit} -O >> $psfile
gmt psconvert $psfile -A -TeG -E300 gmt psconvert $psfile -A -TEG -E300
# 删除临时文件 使用linux终端rm命令 # 删除临时文件 使用linux终端rm命令
rm $cptfile $psfile gmt.history gmt.conf rm $cptfile $psfile gmt.history gmt.conf
# 在终端显示图像 此命令需要imgcat.sh脚本和iTerm终端 # 在终端显示图像 此命令需要imgcat.sh脚本和iTerm终端

17
sph_regional.sh Normal file → Executable file
View File

@ -13,7 +13,7 @@ labels=("longitude (degree)" "latitude (degree)")
plot_para=(0 0 0 0) plot_para=(0 0 0 0)
plotgrad=0 plotgrad=0
# 从命令行获取参数 # 从命令行获取参数
while getopts "hi:r:u:c:a:g" arg while getopts "hi:r:u:c:a:gv:" arg
do do
case $arg in case $arg in
h) h)
@ -74,28 +74,29 @@ else
fi fi
# 设置绘图参数 # 设置绘图参数
gmt gmtset \ gmt gmtset \
FONT_ANNOT_PRIMARY=6.5p,Times-Roman,black \ FONT_ANNOT_PRIMARY=8p,Times-Roman,black \
MAP_FRAME_PEN=thinnest,black \ MAP_FRAME_PEN=thinnest,black \
MAP_FRAME_WIDTH=1.5p \ MAP_FRAME_WIDTH=1.5p \
MAP_TICK_LENGTH_PRIMARY=1.5p/1p \ MAP_TICK_LENGTH_PRIMARY=1.5p/1p \
MAP_TICK_PEN_PRIMARY=thinnest,black \ MAP_TICK_PEN_PRIMARY=thinnest,black \
MAP_TITLE_OFFSET=6.5p \ MAP_TITLE_OFFSET=6.5p \
MAP_GRID_PEN_PRIMARY=thinnest,grey,-- \ MAP_GRID_PEN_PRIMARY=thinnest,grey,-- \
FONT_LABEL=6.5p,Times-Roman,black \ FONT_LABEL=8p,Times-Roman,black \
MAP_FRAME_AXES=WESnZ \ MAP_FRAME_AXES=WESnZ \
COLOR_NAN=black \
MAP_LABEL_OFFSET=2.5p MAP_LABEL_OFFSET=2.5p
gmt grd2cpt ${data} -R${range} -C${color} -Z -D > $cptfile gmt grd2cpt ${data} -R${range} -C${color} -Z -D -M > $cptfile
if [[ $plotgrad == 1 ]]; then if [[ $plotgrad == 1 ]]; then
gradfile=usergradient.nc gradfile=usergradient.nc
gmt grdgradient ${data} -G${gradfile} -Nt -A0/45 gmt grdgradient ${data} -G${gradfile} -Nt -A0/45
gmt grdimage ${data} -R${range} -C${cptfile} -I${gradfile} -Bxag+l"${labels[0]}" -Byag+l"${labels[1]}" -JL${plot_para[0]}/${plot_para[1]}/${plot_para[2]}/${plot_para[3]}/3i -K -P > $psfile gmt grdimage ${data} -R${range} -C${cptfile} -I${gradfile} -Bxag+l"${labels[0]}" -Byag+l"${labels[1]}" -JL${plot_para[0]}/${plot_para[1]}/${plot_para[2]}/${plot_para[3]}/2.5i -K -P > $psfile
else else
gmt grdimage ${data} -R${range} -C${cptfile} -Bxag+l"${labels[0]}" -Byag+l"${labels[1]}" -JL${plot_para[0]}/${plot_para[1]}/${plot_para[2]}/${plot_para[3]}/3i -K -P > $psfile gmt grdimage ${data} -R${range} -C${cptfile} -Bxag+l"${labels[0]}" -Byag+l"${labels[1]}" -JL${plot_para[0]}/${plot_para[1]}/${plot_para[2]}/${plot_para[3]}/2.5i -K -P > $psfile
fi fi
#-C${cptfile}+Uk 使用km色标单位除1000 #-C${cptfile}+Uk 使用km色标单位除1000
gmt psscale -Dx0.5i/-0.3i+w2i/0.07i+h -C${cptfile} -Bxa -By+l${unit} -O >> $psfile gmt psscale -Dx0.3i/-0.3i+w1.85i/0.08i+h -C${cptfile} -Bxa -By+l${unit} -O >> $psfile
gmt psconvert $psfile -A -TeG -E300 gmt psconvert $psfile -A -TEG -E300
# 删除临时文件 使用linux终端rm命令 # 删除临时文件 使用linux终端rm命令
rm $cptfile $psfile gmt.history gmt.conf rm $cptfile $psfile gmt.history gmt.conf
if [[ $plotgrad == 1 ]]; then if [[ $plotgrad == 1 ]]; then

4
xy_dot.sh Normal file → Executable file
View File

@ -72,9 +72,9 @@ else
MAP_LABEL_OFFSET=4p MAP_LABEL_OFFSET=4p
gmt makecpt -C${color} -T${valuerange} > $cptfile gmt makecpt -C${color} -T${valuerange} > $cptfile
gmt psxy ${data} -Bxag+l"${labels[0]}" -Byag+l"${labels[1]}" -JX5i/2.5i -R${range} -C${cptfile} -Sc0.05c -Gblack -P -K -Y6i > $psfile gmt psxy ${data} -Bxag+l"${labels[0]}" -Byag+l"${labels[1]}" -JX5i -R${range} -C${cptfile} -Sc0.05c -Gblack -P -K -Y6i > $psfile
gmt psscale -Dx0.5i/-0.6i+w4i/0.15i+h -C${cptfile} -Bxag -By+l${unit} -O >> $psfile gmt psscale -Dx0.5i/-0.6i+w4i/0.15i+h -C${cptfile} -Bxag -By+l${unit} -O >> $psfile
gmt psconvert $psfile -A -TeG -E300 gmt psconvert $psfile -A -TEG -E300
# 删除临时文件 使用linux终端rm命令 # 删除临时文件 使用linux终端rm命令
rm $cptfile $psfile gmt.history gmt.conf rm $cptfile $psfile gmt.history gmt.conf
# 在终端显示图像 此命令需要imgcat.sh脚本和iTerm终端 # 在终端显示图像 此命令需要imgcat.sh脚本和iTerm终端

2
xy_grid.sh Normal file → Executable file
View File

@ -79,7 +79,7 @@ else
gmt grdimage ${data} -R${range} -C${cptfile} -Bxag+l"${labels[0]}" -Byag+l"${labels[1]}" -JX3i -K -P > $psfile gmt grdimage ${data} -R${range} -C${cptfile} -Bxag+l"${labels[0]}" -Byag+l"${labels[1]}" -JX3i -K -P > $psfile
fi fi
gmt psscale -Dx3.2i/0.3i+w2.2i/0.1i -C${cptfile} -Bxa -By+l${unit} -O >> $psfile gmt psscale -Dx3.2i/0.3i+w2.2i/0.1i -C${cptfile} -Bxa -By+l${unit} -O >> $psfile
gmt psconvert $psfile -A -TeG -E300 gmt psconvert $psfile -A -TEG -E300
# 删除临时文件 使用linux终端rm命令 # 删除临时文件 使用linux终端rm命令
rm $cptfile $psfile gmt.history gmt.conf rm $cptfile $psfile gmt.history gmt.conf
if [[ $plotgrad == 1 ]]; then if [[ $plotgrad == 1 ]]; then