add dispOptions.sh
This commit is contained in:
33
gmtsph-JA.sh
33
gmtsph-JA.sh
@@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
# 包含GMT自带脚本文件 其中包含了一些有用的功能 比如获取网格文件的范围
|
||||
. gmt_shell_functions.sh
|
||||
# 包含dispOption脚本
|
||||
. dispOptions
|
||||
#GMT显示平面数据脚本,输入文件为网格文件,没有包含网格化语句因为网格化过程中的情况多样化,建议在其他脚本中个别添加再调用此脚本
|
||||
# 初始化参数
|
||||
data='null'
|
||||
@@ -22,21 +24,22 @@ while getopts "hi:r:u:c:a:v:G:l:p:gsn" arg
|
||||
do
|
||||
case $arg in
|
||||
h)
|
||||
printf "simple global wide data mapping using GMT script. The template accepts a grid (.nc .grid) file as input and outputs a .png and a .eps file. \
|
||||
For futher explanations, please look for GMT's manuscripts.\nAuthor: Yi Zhang (zhangyi.cugwuhan@gmail.com)\n"
|
||||
printf "usage: ${0##*/} -i<grid-data> [-r<xmin>/<xmax>/<ymin>/<ymax>] [-l<clon>/<clat>/<horizon>] [-u<unit>] [-c<cpt-file>] [-a<x-label>,<y-label>] [-v<c-tick>] [-g] [-s] [-G<grad-data>] [-p<polygon-file>]\n"
|
||||
printf "%s\t%s\n" "-i" "input grid file"
|
||||
printf "%s\t%s\n" "-r" "data range. The template will ditect the input data range automaticly, the use of this option will overwrite the range."
|
||||
printf "%s\t%s\n" "-l" "central longitude and latitude values of the plot, the default value is 0/0/115,180/0/115. "
|
||||
printf "%s\t%s\n" "-u" "data unit. The default is meter. use 'km+Uk' to append '+Uk' option to the psscale command"
|
||||
printf "%s\t%s\n" "-c" "color cpt. The default is 'rainbow -Z' in which '-Z' tells the grd2cpt to make a continuous cpt-file, remove it to disable the function."
|
||||
printf "%s\t%s\n" "-n" "disable the use of grd2cpt."
|
||||
printf "%s\t%s\n" "-s" "plot the day-night terminator. The default is false."
|
||||
printf "%s\t%s\n" "-a" "axis labels. The deafults are x (m) and y (m)."
|
||||
printf "%s\t%s\n" "-v" "intervals of color bar's labels. the script will set the intervals automatically if -v option is not set."
|
||||
printf "%s\t%s\n" "-g" "use grdgradient. The default is false."
|
||||
printf "%s\t%s\n" "-G" "provide a different input grid data for the use of grdgradient. This should be used with the '-g' option at the same time"
|
||||
printf "%s\t%s\n" "-p" "plot polygons via a file."
|
||||
dispTitle "${0##*/}" "simple global wide data mapping using GMT script. The template accepts a grid (.nc .grid) file as input and outputs a .png and a .eps file. \
|
||||
For futher explanations, please look for GMT's manuscripts."
|
||||
dispAuthorInfo "Yi Zhang (zhangyi.cugwuhan@gmail.com)"
|
||||
dispUsage "${0##*/} -i<grid-data> [-r<xmin>/<xmax>/<ymin>/<ymax>] [-l<clon>/<clat>/<horizon>] [-u<unit>] [-c<cpt-file>] [-a<x-label>,<y-label>] [-v<c-tick>] [-g] [-s] [-G<grad-data>] [-p<polygon-file>]"
|
||||
dispOptionShort "-i" "input grid file"
|
||||
dispOptionShort "-r" "data range. The template will ditect the input data range automaticly, the use of this option will overwrite the range."
|
||||
dispOptionShort "-l" "central longitude and latitude values of the plot, the default value is 0/0/115,180/0/115. "
|
||||
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 -Z' in which '-Z' tells the grd2cpt to make a continuous cpt-file, remove it to disable the function."
|
||||
dispOptionShort "-n" "disable the use of grd2cpt."
|
||||
dispOptionShort "-s" "plot the day-night terminator. The default is false."
|
||||
dispOptionShort "-a" "axis labels. The deafults are x (m) and y (m)."
|
||||
dispOptionShort "-v" "intervals of color bar's labels. the script will set the intervals automatically if -v option is not set."
|
||||
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 "-p" "plot polygons via a file."
|
||||
exit 0;;
|
||||
i)
|
||||
data=$OPTARG;;
|
||||
|
||||
Reference in New Issue
Block a user