tmp update

This commit is contained in:
张壹 2023-03-19 19:41:55 +08:00
parent 1bac935407
commit b00d094cfc
5 changed files with 13 additions and 9 deletions

View File

@ -2,7 +2,7 @@
# 包含GMT自带脚本文件 其中包含了一些有用的功能 比如获取网格文件的范围
. gmt_shell_functions.sh
# 包含dispOption脚本
. dispOptions
. dispOptions.sh
#GMT画一个色度条
# 初始化参数
data='null'

View File

@ -2,7 +2,7 @@
# 包含GMT自带脚本文件 其中包含了一些有用的功能 比如获取网格文件的范围
. gmt_shell_functions.sh
# 包含dispOption脚本
. dispOptions
. dispOptions.sh
#GMT显示平面数据脚本输入文件为网格文件没有包含网格化语句因为网格化过程中的情况多样化建议在其他脚本中个别添加再调用此脚本
# 初始化参数
data='null'

View File

@ -2,7 +2,7 @@
# 包含GMT自带脚本文件 其中包含了一些有用的功能 比如获取网格文件的范围
. gmt_shell_functions.sh
# 包含dispOption脚本
. dispOptions
. dispOptions.sh
#GMT显示平面数据脚本输入文件为网格文件没有包含网格化语句因为网格化过程中的情况多样化建议在其他脚本中个别添加再调用此脚本
# 初始化参数
data='null'
@ -16,8 +16,9 @@ labels=("longitude (degree)" "latitude (degree)")
plotgrad=0
clon=0
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
case $arg in
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 "-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 "-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 "-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"
@ -46,6 +48,8 @@ For futher explanations, please look for GMT's manuscripts."
overwriteRange=$OPTARG;;
l)
clon=$OPTARG;;
v)
bartick=$OPTARG;;
a)
labels=(${OPTARG//,/ });;
g)
@ -104,9 +108,9 @@ else
#-C${cptfile}+Uk 使用km色标单位除1000
#如果unit等于km则在cptfile后面添加+Uk
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
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
gmt psconvert $psfile -A -TEG -E300
# 删除临时文件 使用linux终端rm命令

View File

@ -2,8 +2,8 @@
# 包含GMT自带脚本文件 其中包含了一些有用的功能 比如获取网格文件的范围
. gmt_shell_functions.sh
# 包含dispOption脚本
. dispOptions
. generic_func
. dispOptions.sh
. generic_func.sh
# 定义一个函数 执行输入的语句或者将其显示在屏幕上
RunOrEcho()
{

View File

@ -2,7 +2,7 @@
# 包含GMT自带脚本文件 其中包含了一些有用的功能 比如获取网格文件的范围
. gmt_shell_functions.sh
# 包含dispOption脚本
. dispOptions
. dispOptions.sh
#GMT绘制纹理图层输入文件为网格文件
# 初始化参数
data='null'