tmp update
This commit is contained in:
parent
1bac935407
commit
b00d094cfc
@ -2,7 +2,7 @@
|
|||||||
# 包含GMT自带脚本文件 其中包含了一些有用的功能 比如获取网格文件的范围
|
# 包含GMT自带脚本文件 其中包含了一些有用的功能 比如获取网格文件的范围
|
||||||
. gmt_shell_functions.sh
|
. gmt_shell_functions.sh
|
||||||
# 包含dispOption脚本
|
# 包含dispOption脚本
|
||||||
. dispOptions
|
. dispOptions.sh
|
||||||
#GMT画一个色度条
|
#GMT画一个色度条
|
||||||
# 初始化参数
|
# 初始化参数
|
||||||
data='null'
|
data='null'
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# 包含GMT自带脚本文件 其中包含了一些有用的功能 比如获取网格文件的范围
|
# 包含GMT自带脚本文件 其中包含了一些有用的功能 比如获取网格文件的范围
|
||||||
. gmt_shell_functions.sh
|
. gmt_shell_functions.sh
|
||||||
# 包含dispOption脚本
|
# 包含dispOption脚本
|
||||||
. dispOptions
|
. dispOptions.sh
|
||||||
#GMT显示平面数据脚本,输入文件为网格文件,没有包含网格化语句因为网格化过程中的情况多样化,建议在其他脚本中个别添加再调用此脚本
|
#GMT显示平面数据脚本,输入文件为网格文件,没有包含网格化语句因为网格化过程中的情况多样化,建议在其他脚本中个别添加再调用此脚本
|
||||||
# 初始化参数
|
# 初始化参数
|
||||||
data='null'
|
data='null'
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# 包含GMT自带脚本文件 其中包含了一些有用的功能 比如获取网格文件的范围
|
# 包含GMT自带脚本文件 其中包含了一些有用的功能 比如获取网格文件的范围
|
||||||
. gmt_shell_functions.sh
|
. gmt_shell_functions.sh
|
||||||
# 包含dispOption脚本
|
# 包含dispOption脚本
|
||||||
. dispOptions
|
. dispOptions.sh
|
||||||
#GMT显示平面数据脚本,输入文件为网格文件,没有包含网格化语句因为网格化过程中的情况多样化,建议在其他脚本中个别添加再调用此脚本
|
#GMT显示平面数据脚本,输入文件为网格文件,没有包含网格化语句因为网格化过程中的情况多样化,建议在其他脚本中个别添加再调用此脚本
|
||||||
# 初始化参数
|
# 初始化参数
|
||||||
data='null'
|
data='null'
|
||||||
@ -16,8 +16,9 @@ labels=("longitude (degree)" "latitude (degree)")
|
|||||||
plotgrad=0
|
plotgrad=0
|
||||||
clon=0
|
clon=0
|
||||||
polyfile='null'
|
polyfile='null'
|
||||||
|
bartick="a" #色标轴标轴间隔 a表示自动
|
||||||
# 从命令行获取参数
|
# 从命令行获取参数
|
||||||
while getopts "hi:r:u:c:a:G:l:p:g" arg
|
while getopts "hi:r:u:c:a:G:l:p:v:g" arg
|
||||||
do
|
do
|
||||||
case $arg in
|
case $arg in
|
||||||
h)
|
h)
|
||||||
@ -30,6 +31,7 @@ For futher explanations, please look for GMT's manuscripts."
|
|||||||
dispOptionShort "-l" "central longitude value of the plot, the default value is 0"
|
dispOptionShort "-l" "central longitude value of the plot, the default value is 0"
|
||||||
dispOptionShort "-u" "data unit. The default is meter. use 'km+Uk' to append '+Uk' option to the psscale command"
|
dispOptionShort "-u" "data unit. The default is meter. use 'km+Uk' to append '+Uk' option to the psscale command"
|
||||||
dispOptionShort "-c" "color cpt. The default is rainbow."
|
dispOptionShort "-c" "color cpt. The default is rainbow."
|
||||||
|
dispOptionShort "-v" "intervals of color bar's labels. the script will set the intervals automatically if -v option is not set."
|
||||||
dispOptionShort "-a" "axis labels. The deafults are x (m) and y (m)."
|
dispOptionShort "-a" "axis labels. The deafults are x (m) and y (m)."
|
||||||
dispOptionShort "-g" "use grdgradient. The default is false."
|
dispOptionShort "-g" "use grdgradient. The default is false."
|
||||||
dispOptionShort "-G" "provide a different input grid data for the use of grdgradient. This should be used with the '-g' option at the same time"
|
dispOptionShort "-G" "provide a different input grid data for the use of grdgradient. This should be used with the '-g' option at the same time"
|
||||||
@ -46,6 +48,8 @@ For futher explanations, please look for GMT's manuscripts."
|
|||||||
overwriteRange=$OPTARG;;
|
overwriteRange=$OPTARG;;
|
||||||
l)
|
l)
|
||||||
clon=$OPTARG;;
|
clon=$OPTARG;;
|
||||||
|
v)
|
||||||
|
bartick=$OPTARG;;
|
||||||
a)
|
a)
|
||||||
labels=(${OPTARG//,/ });;
|
labels=(${OPTARG//,/ });;
|
||||||
g)
|
g)
|
||||||
@ -104,9 +108,9 @@ else
|
|||||||
#-C${cptfile}+Uk 使用km(色标单位除1000
|
#-C${cptfile}+Uk 使用km(色标单位除1000
|
||||||
#如果unit等于km则在cptfile后面添加+Uk
|
#如果unit等于km则在cptfile后面添加+Uk
|
||||||
if [[ ${unit} == 'km+Uk' ]]; then
|
if [[ ${unit} == 'km+Uk' ]]; then
|
||||||
gmt psscale -Dx0.4i/-0.3i+w1.2i/0.05i+h -C${cptfile}+Uk -Bxa -By+l"km" -O >> $psfile
|
gmt psscale -Dx0.4i/-0.3i+w1.2i/0.05i+h -C${cptfile}+Uk -Bx${bartick} -By+l"km" -O >> $psfile
|
||||||
else
|
else
|
||||||
gmt psscale -Dx0.4i/-0.3i+w1.2i/0.05i+h -C${cptfile} -Bxa -By+l${unit} -O >> $psfile
|
gmt psscale -Dx0.4i/-0.3i+w1.2i/0.05i+h -C${cptfile} -Bx${bartick} -By+l${unit} -O >> $psfile
|
||||||
fi
|
fi
|
||||||
gmt psconvert $psfile -A -TEG -E300
|
gmt psconvert $psfile -A -TEG -E300
|
||||||
# 删除临时文件 使用linux终端rm命令
|
# 删除临时文件 使用linux终端rm命令
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
# 包含GMT自带脚本文件 其中包含了一些有用的功能 比如获取网格文件的范围
|
# 包含GMT自带脚本文件 其中包含了一些有用的功能 比如获取网格文件的范围
|
||||||
. gmt_shell_functions.sh
|
. gmt_shell_functions.sh
|
||||||
# 包含dispOption脚本
|
# 包含dispOption脚本
|
||||||
. dispOptions
|
. dispOptions.sh
|
||||||
. generic_func
|
. generic_func.sh
|
||||||
# 定义一个函数 执行输入的语句或者将其显示在屏幕上
|
# 定义一个函数 执行输入的语句或者将其显示在屏幕上
|
||||||
RunOrEcho()
|
RunOrEcho()
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# 包含GMT自带脚本文件 其中包含了一些有用的功能 比如获取网格文件的范围
|
# 包含GMT自带脚本文件 其中包含了一些有用的功能 比如获取网格文件的范围
|
||||||
. gmt_shell_functions.sh
|
. gmt_shell_functions.sh
|
||||||
# 包含dispOption脚本
|
# 包含dispOption脚本
|
||||||
. dispOptions
|
. dispOptions.sh
|
||||||
#GMT绘制纹理图层,输入文件为网格文件
|
#GMT绘制纹理图层,输入文件为网格文件
|
||||||
# 初始化参数
|
# 初始化参数
|
||||||
data='null'
|
data='null'
|
||||||
|
Loading…
Reference in New Issue
Block a user