::::::::::::::
get.etopo1.data.sh
::::::::::::::
#!/bin/sh
wget http://www.ngdc.noaa.gov/mgg/global/relief/ETOPO1/data/ice_surface/grid_registered/xyz/ETOPO1_Ice_g_int.xyz.gz
NOTE:
[2016年 9月 15日 木曜日 12:25:10 JST]
[/work4/data/ETOPO1]
$ mv /work1/am/TEACHING/Outreach/141002.Nagasaki.Minami/Topography/ETOPO1_Ice_g_int.mean.0.25deg.xyz .
`/work1/am/TEACHING/Outreach/141002.Nagasaki.Minami/Topography/ETOPO1_Ice_g_int.mean.0.25deg.xyz' ->
`./ETOPO1_Ice_g_int.mean.0.25deg.xyz'
::::::::::::::
world.map.sh
::::::::::::::
#!/bin/bash
# Description:
#
# Author: am
#
# Host: aofd165.fish.nagasaki-u.ac.jp
# Directory: /work1/am/Teaching/Outreach/141002.Nagasaki.Minami
#
# Revision history:
# This file is created by /usr/local/mybin/ngmt.sh at 16:25 on 10-02-2014.
. ./gmtpar.sh
echo "Bash script $0 starts."
range=g
size=5
xanot=
yanot=
anot=${xanot}/${yanot}WSne
#in=""
#if [ ! -f $in ]; then
# echo Error in $0 : No such file, $in
# exit 1
#fi
figdir="./fig/"
if [ ! -d ${figdir} ];then
mkdir -p $figdir
fi
out=${figdir}$(basename $0 .sh).ps
echo Input : $in
echo Output : $out
pscoast -Rg -JN7 -Bwsne -Dc -A10000 -Wthinnest -Gwhite -Sdodgerblue1 ¥
-P -X1 -Y5 -K > $out
xoffset=
yoffset=4
comment=
. ./note.sh
echo "Done $0.sh"
::::::::::::::
world.bathymetry.sh
::::::::::::::
#!/bin/bash
# Description:
#
# Author: am
#
# Host: aofd165.fish.nagasaki-u.ac.jp
# Directory: /work1/am/Teaching/Outreach/141002.Nagasaki.Minami
#
# Revision history:
# This file is created by /usr/local/mybin/ngmt.sh at 16:25 on 10-02-2014.
. ./gmtpar.sh
echo "Bash script $0 starts."
range=g
size=5
xanot=
yanot=
anot=${xanot}/${yanot}WSne
in=ETOPO1_Ice_g_int.xyz
if [ ! -f $in ]; then
echo Error in $0 : No such file, $in
exit 1
fi
figdir="./fig/"
if [ ! -d ${figdir} ];then
mkdir -p $figdir
fi
out=${figdir}$(basename $0 .sh).ps
echo Input : $in
echo Output : $out
reso=0.25
mean=$(basename $in .xyz).mean.${reso}deg.xyz
# blockmean $in -Rg -I$reso -V > $mean
grd=$(basename $in .xyz).grd
# surface $mean -Rg -I1 -T1 -G$grd -V
cpt=$(basename $0 .sh).cpt
#makecpt -Cdrywet -I -T-8000/8000/500 > $cpt
grdimage $grd -JN7 -C$cpt -Rg -P -X1 -Y5 -K > $out
pscoast -Rg -JN -Bwsne -Dc -W1 ¥
-O -K >> $out
psscale -D3.5/-0.5/5/0.2h -C$cpt -Ba8000f2000/:"m": -E -O -K >> $out
xoffset=
yoffset=4
comment=
. ./note.sh
rm -vf # $cpt # $grd
echo "Done $0.sh"
::::::::::::::
gmtpar.sh
::::::::::::::
#
# GMTのパラメータの設定 (version 4以上対象)
#
# 長さの単位はインチとする
gmtset MEASURE_UNIT INCH
gmtset LABEL_FONT_SIZE 18
gmtset HEADER_FONT_SIZE 20
gmtset ANOT_FONT_SIZE 18
gmtset TICK_PEN 4
# 地図の縦横軸に縞々を使わない
gmtset BASEMAP_TYPE PLAIN
# 紙のサイズはA4
gmtset PAPER_MEDIA A4
# 地図の°の記号
gmtset DEGREE_SYMBOL = degree # Available for ver. 4 or later
# 空白文字の設定
sp="¥040" # White space
# =の記号
eq="¥075" # equal
# 温度の°の記号
deg="¥260" #deg="¥312" # degree symbol
# 色のRGB値を設定 (線や点に色をつけるときRGB値を直接指定するより分かりやすい)
red="255/0/0"
orenge="255/165/0"
pink="255/192/203"
green="0/255/0"
blue="0/0/255"
midnightblue="25/25/112"
yellow="255/255/0"
gold="255/215/0"
purple="160/32/240"
magenta="255/0/255"
white="255/255/255"
# 線種を指定
dash="t15_5:15"
dot="t5_5:5"
dotdash="t12_5_5_5:5"
#その他の線種の例
# -W5t20_5:5
# -W5t15_5:5
# -W5t20_5_5_5_5_5:5
# -W5t30_5_5_5:5
# -W5t20_5_10_5:5
# 数字の出力フォーマット(project, grd2xzy等で使う)
gmtset D_FORMAT %lg #デフォルト(規定値)
# 桁数を指定(例:123.45678)
#gmtset D_FORMAT %12.6f
# 状況に応じて
#gmtset D_FORMAT %12.5g
::::::::::::::
note.sh
::::::::::::::
# Print time, current working directory and output filename
export LANG=C
currentdir=`pwd`
if [ ${#currentdir} -gt 90 ]; then
curdir1=${currentdir:1:90}
curdir2=${currentdir:91}
else
curdir1=$currentdir
curdir2="¥ "
fi
now=`date`
host=`hostname`
#comment=" "
time1=$(ls -l $in | awk '{print $6, $7, $8}')
pstext -JX6/1.2 -R0/1/0/1.2 -N -X${xoffset:-0} -Y${yoffset:-0} << EOF -O >> $out
0 1.1 9 0 1 LM $0 $@
0 0.95 9 0 1 LM ${now}
0 0.80 9 0 1 LM ${host}
0 0.65 9 0 1 LM ${curdir1}
0 0.50 9 0 1 LM ${curdir2}
0 0.35 9 0 1 LM Input: ${in} (${time1})
0 0.1 9 0 1 LM ${comment:-""}
EOF
# Output: ${out}